OpenAi.Config (OpenAI REST API Client v0.2.1)

Module responsible for managing the configuration of the OpenAI API client.

Summary

Functions

Returns the API key for the OpenAI API.

Returns the base URL for the OpenAI API. Defaults to "https://api.openai.com/v1/".

Returns the HTTP client module to use for making requests. Defaults to HTTPoison.

Returns the HTTP headers to include in the request.

Functions

Returns the API key for the OpenAI API.

This is required for making requests to the API. find it at https://platform.openai.com/account/api-keys

Returns the base URL for the OpenAI API. Defaults to "https://api.openai.com/v1/".

Returns the HTTP client module to use for making requests. Defaults to HTTPoison.

This is useful for testing, where you might want to use a mock HTTP client.

Link to this function

http_headers!()

Returns the HTTP headers to include in the request.

Will throw if the headers are not a list.