Layered configuration resolution for LangEx.
Resolution order (first non-nil wins):
- Explicit opts passed to function calls
- Application environment (
config :lang_ex, :openai, api_key: "...") - System environment variables (
OPENAI_API_KEY,ANTHROPIC_API_KEY)
Custom providers can be registered via application config:
config :lang_ex, :providers,
groq: %{env_key: "GROQ_API_KEY", default_model: "llama-3.3-70b"}
Summary
Functions
Resolves the API key for a given provider.
Resolves the API key, raising if not found.
Resolves the model name for a provider.
Returns the provider defaults map, merging built-in with user-configured.
Functions
Resolves the API key for a given provider.
Resolves the API key, raising if not found.
Resolves the model name for a provider.
Returns the provider defaults map, merging built-in with user-configured.