Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements llm.Provider for the OpenAI Chat Completions API. Compatible with any OpenAI-format endpoint (OpenAI, Azure OpenAI, vLLM, LiteLLM).
func NewWithBaseURL ¶
NewWithBaseURL creates a client with a custom base URL (for Azure, vLLM, etc.).
func NewWithHTTPClient ¶
NewWithHTTPClient creates a client with a custom HTTP client (for testing).
func (*Client) ChatCompletion ¶
func (c *Client) ChatCompletion(ctx context.Context, req llm.ChatRequest) (*llm.ChatResponse, error)
func (*Client) ListModels ¶ added in v0.15.1
ListModels returns available model IDs from the OpenAI-compatible API.
func (*Client) SupportsStreaming ¶ added in v0.16.9
SupportsStreaming implements llm.StreamingProvider.
Click to show internal directories.
Click to hide internal directories.