CouncilEx.Providers.Instructor (CouncilEx v0.1.0)

Copy Markdown View Source

Adapter-dispatching provider. Reads :adapter from config opts to select the per-provider request/response handling module (e.g., CouncilEx.Provider.Adapters.OpenAI or Anthropic).

See CouncilEx.Provider.Adapter for the behaviour, and the modules under CouncilEx.Provider.Adapters.* for stock implementations.

Summary

Functions

Resolve {:system, var} or static api key strings.

Validate the dispatcher config. Delegates to the configured :adapter so each adapter owns its own option schema.

Functions

resolve_api_key(static)

@spec resolve_api_key(String.t() | {:system, String.t()}) :: String.t()

Resolve {:system, var} or static api key strings.

Kept as a public helper for v0.1 compatibility. In v0.3 the adapter resolves api keys internally inside build_*_request/2.

validate_config(opts)

@spec validate_config(keyword()) :: :ok | {:error, term()}

Validate the dispatcher config. Delegates to the configured :adapter so each adapter owns its own option schema.