AI.Providers.OpenAICompatible.Provider (AI SDK v0.0.1-rc.0)

View Source

Provider implementation for OpenAI-compatible APIs.

This provider can be used to interact with any API that is compatible with the OpenAI API, such as Ollama, LMStudio, and others.

Summary

Functions

Creates a new OpenAI-compatible provider with the given options.

Functions

new(opts)

Creates a new OpenAI-compatible provider with the given options.

Options

  • :base_url - The base URL of the API (required)
  • :name - The name of the provider (default: "openai-compatible")
  • :api_key - The API key to use for authentication (optional)
  • :headers - Additional headers to include in requests (optional)