Documentation
¶
Overview ¶
Package openai is an Engine that speaks the OpenAI chat-completions wire format, which OpenAI, Azure OpenAI, Ollama, vLLM, LM Studio, and most gateways accept.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is an OpenAI-compatible chat-completions engine.
func New ¶
New builds an engine for baseURL (e.g. "https://api.openai.com/v1") using model as the default when a Request does not name one.
type Option ¶
type Option func(*Engine)
Option configures an Engine.
func WithAPIKey ¶
WithAPIKey sets the bearer token. Local servers (Ollama, LM Studio) run keyless, so it may be empty.
func WithHTTPClient ¶
WithHTTPClient replaces the default client (for a custom timeout or transport).
Click to show internal directories.
Click to hide internal directories.