View Source ExOpenAi.Config (ex_open_ai v0.1.7)

Stores the configuration for the ExOpenAi client.

All settings also accept {:system, "ENV_VAR_NAME"} to read their values from environment variables at runtime

Link to this section Summary

Functions

Returns the api_key, set it in mix.exs

A wrapper around Application.get_env/2, providing automatic support for {:system, "VARIABLE"}.

Returns the organization, set it in mix.exs

Returns the timeout, set it in mix.exs Defaults to 25_000

Link to this section Functions

Returns the api_key, set it in mix.exs

config :ex_open_ai, api_key: "API_KEY"

Link to this function

from_env(app, key, default \\ nil)

View Source

A wrapper around Application.get_env/2, providing automatic support for {:system, "VARIABLE"}.

Returns the organization, set it in mix.exs

config :ex_open_ai, organization: "ORGANIZATION"

Returns the timeout, set it in mix.exs Defaults to 25_000

config :ex_open_ai, timeout: 10_000