Documentation
¶
Index ¶
- func NewClient(cfg Config, spec Spec, opts ...litellm.ClientOption) (*litellm.Client, error)
- type AuthSpec
- type Config
- type EndpointSpec
- type FeatureSpec
- type HTTPClient
- type HeaderSpec
- type MessageMapper
- type Provider
- type ProviderOptionsMapper
- type RequestSpec
- type ResponseFormatMapper
- type ResponseSpec
- type SchemaMapper
- type Spec
- type StreamSpec
- type StrictToolMode
- type ThinkingMapper
- type ToolMapper
- type WarningMapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
APIKey string
APIKeyFunc func(context.Context) (string, error)
BaseURL string
HTTPClient HTTPClient
Transport http.RoundTripper
Retry *retry.Policy
UserAgent string
Headers map[string]string
// AllowUnknownProviderOptions copies unknown request ProviderOptions into
// the JSON body. The default remains strict; applications that expose an
// explicit extra_body escape hatch can opt in.
AllowUnknownProviderOptions bool
}
type EndpointSpec ¶
type FeatureSpec ¶
type FeatureSpec struct {
StrictTools StrictToolMode
APIKeyRequired bool
}
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) ListModels ¶
type ProviderOptionsMapper ¶
type RequestSpec ¶
type RequestSpec struct {
MaxTokensField string
OmitStop bool
MaxStopSequences int
EmitEmptyAssistantContentWithToolCalls bool
SupportsJSONSchema bool
JSONSchemaToPrompt bool
Thinking ThinkingMapper
ResponseFormat ResponseFormatMapper
CleanSchema SchemaMapper
ProviderOptions ProviderOptionsMapper
Warnings WarningMapper
Messages MessageMapper
Tools ToolMapper
AllowUnknownProviderOptions bool
AllowedProviderOptions map[string]struct{}
}
type ResponseFormatMapper ¶
type ResponseFormatMapper func(*litellm.ResponseFormat) (any, error)
type ResponseSpec ¶
type Spec ¶
type Spec struct {
Name string
Endpoint EndpointSpec
Auth AuthSpec
Headers HeaderSpec
Request RequestSpec
Response ResponseSpec
Stream StreamSpec
Features FeatureSpec
}
type StreamSpec ¶
type StrictToolMode ¶
type StrictToolMode int
const ( StrictToolsOmit StrictToolMode = iota StrictToolsForward StrictToolsRequireAll )
Click to show internal directories.
Click to hide internal directories.