Documentation
¶
Index ¶
- Constants
- func Factory(cfg Config) (litellm.Provider, error)
- func NewClient(cfg Config, opts ...litellm.ClientOption) (*litellm.Client, error)
- type Config
- type HTTPClient
- type Provider
- func (p *Provider) Capabilities(model string) litellm.Capabilities
- func (p *Provider) Chat(ctx context.Context, req *litellm.Request) (*litellm.Response, error)
- func (p *Provider) ListModels(ctx context.Context) ([]litellm.ModelInfo, error)
- func (p *Provider) Name() string
- func (p *Provider) Responses(ctx context.Context, req *ResponsesRequest) (*litellm.Response, error)
- func (p *Provider) ResponsesStream(ctx context.Context, req *ResponsesRequest) (litellm.Stream, error)
- func (p *Provider) Stream(ctx context.Context, req *litellm.Request) (litellm.Stream, error)
- type ResponsesRequest
- type ResponsesStreamOptions
- type ResponsesTool
Constants ¶
View Source
const ( ProviderOptionFrequencyPenalty = "frequency_penalty" ProviderOptionPresencePenalty = "presence_penalty" ProviderOptionLogitBias = "logit_bias" ProviderOptionN = "n" ProviderOptionLogprobs = "logprobs" ProviderOptionTopLogprobs = "top_logprobs" ProviderOptionStore = "store" ProviderOptionModeration = "moderation" ProviderOptionStreamOptions = "stream_options" ProviderOptionPromptCacheKey = "prompt_cache_key" ProviderOptionPromptCacheRetention = "prompt_cache_retention" ProviderOptionPrediction = "prediction" ProviderOptionMetadata = "metadata" ProviderOptionModalities = "modalities" ProviderOptionAudio = "audio" ProviderOptionServiceTier = "service_tier" ProviderOptionSafetyIdentifier = "safety_identifier" ProviderOptionUser = "user" ProviderOptionVerbosity = "verbosity" ProviderOptionWebSearchOptions = "web_search_options" ProviderOptionParallelToolCalls = "parallel_tool_calls" ProviderOptionSeed = "seed" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) Capabilities ¶ added in v1.8.1
func (p *Provider) Capabilities(model string) litellm.Capabilities
func (*Provider) ListModels ¶
func (*Provider) ResponsesStream ¶
type ResponsesRequest ¶
type ResponsesRequest struct {
Model string
Messages []litellm.Message
Input any
Instructions string
Conversation any
PreviousResponseID string
ContextManagement []map[string]any
MaxOutputTokens *int
MaxToolCalls *int
Include []string
TopLogprobs *int
Temperature *float64
TopP *float64
ResponseFormat *litellm.ResponseFormat
TextVerbosity string
Truncation string
Tools []litellm.Tool
OpenAITools []ResponsesTool
ToolChoice any
ParallelToolCalls *bool
ReasoningEffort string
ReasoningSummary string
Thinking *litellm.Thinking
PromptCacheKey string
PromptCacheRetention string
Metadata map[string]string
SafetyIdentifier string
ServiceTier string
Background *bool
Store *bool
StreamOptions *ResponsesStreamOptions
Prompt map[string]any
CaptureRawResponse bool
}
type ResponsesStreamOptions ¶
type ResponsesStreamOptions struct {
IncludeObfuscation *bool `json:"include_obfuscation,omitempty"`
}
type ResponsesTool ¶
Click to show internal directories.
Click to hide internal directories.