ExLLM.Infrastructure.ConfigProvider.Static (ex_llm v0.8.1)

View Source

Static configuration provider for testing and library usage.

Usage

config = %{
  openai: %{api_key: "sk-test", model: "gpt-4"},
  anthropic: %{api_key: "api-test", model: "claude-3"}
}
{:ok, provider} = ExLLM.Infrastructure.ConfigProvider.Static.start_link(config)
ExLLM.OpenAI.chat(messages, config_provider: provider)

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(config)