Documentation
¶
Index ¶
- Constants
- func Factory(cfg Config) (litellm.Provider, error)
- func NewClient(cfg Config, opts ...litellm.ClientOption) (*litellm.Client, error)
- func SigningTransport(credentials CredentialsProvider, region string, base http.RoundTripper) http.RoundTripper
- type Config
- type Credentials
- type CredentialsProvider
- 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) Stream(ctx context.Context, req *litellm.Request) (litellm.Stream, error)
Constants ¶
View Source
const ProviderOptionCacheRetention = "cache_retention"
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
NewClient builds the provider from cfg and wraps it in a ready *litellm.Client. It is a convenience for the common single-provider case. It calls New(cfg) and then litellm.New(provider, opts...).
func SigningTransport ¶
func SigningTransport(credentials CredentialsProvider, region string, base http.RoundTripper) http.RoundTripper
Types ¶
type Config ¶
type Config struct {
Region string
BaseURL string
ControlPlaneBaseURL string
Credentials CredentialsProvider
HTTPClient HTTPClient
Transport http.RoundTripper
Retry *retry.Policy
}
type Credentials ¶
type CredentialsProvider ¶
type CredentialsProvider interface {
Credentials(context.Context) (Credentials, error)
}
func StaticCredentials ¶
func StaticCredentials(accessKeyID, secretAccessKey, sessionToken string) CredentialsProvider
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 ¶
Click to show internal directories.
Click to hide internal directories.