Documentation
¶
Overview ¶
Package provider talks to LLM backends over HTTP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAuth means the provider rejected the credentials (401, 403). ErrAuth = errors.New("authentification refusée par le fournisseur") // ErrContextLength means the prompt exceeds the model context window. ErrContextLength = errors.New("contexte trop long pour le modèle") // ErrIncomplete means the stream ended without a completion marker. ErrIncomplete = errors.New("flux interrompu avant la fin de la réponse") ErrUnavailable = errors.New("fournisseur indisponible") )
Functions ¶
This section is empty.
Types ¶
type OpenAICompat ¶
type OpenAICompat struct {
// contains filtered or unexported fields
}
OpenAICompat implements Provider for OpenAI-compatible chat completions.
func NewOpenAICompat ¶
func NewOpenAICompat(info llm.ProviderInfo, apiKey string, opts ...Option) *OpenAICompat
NewOpenAICompat builds a provider for info.BaseURL.
func (*OpenAICompat) Info ¶
func (o *OpenAICompat) Info() llm.ProviderInfo
Info returns the provider description.
type Option ¶
type Option func(*OpenAICompat)
Option configures an OpenAICompat provider.
func WithHTTPClient ¶
WithHTTPClient sets the HTTP client.
Click to show internal directories.
Click to hide internal directories.