Documentation
¶
Index ¶
- func ApplyProviderDefaults(cfg *config.Config)
- func DefaultModelsForConfig(cfg config.Config) []string
- func IsContextLimit(err error) bool
- func StreamStarted(err error) bool
- func ValidateModelForConfig(cfg config.Config, modelID string) error
- type ChunkHandler
- type CircuitStatus
- type Error
- type ModelCatalogRequest
- type OpenAICompatible
- type Provider
- type RetryEvent
- type RetryPolicy
- type Router
- type RouterConfig
- type RouterState
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyProviderDefaults ¶ added in v0.12.1
func DefaultModelsForConfig ¶ added in v0.12.1
func IsContextLimit ¶
func StreamStarted ¶
Types ¶
type ChunkHandler ¶
type CircuitStatus ¶
type ModelCatalogRequest ¶
func ModelCatalogForConfig ¶
func ModelCatalogForConfig(cfg config.Config) (ModelCatalogRequest, bool)
type OpenAICompatible ¶
type RetryPolicy ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter(cfg RouterConfig) (*Router, error)
func (*Router) PreferFallbackAfter ¶ added in v0.14.2
type RouterConfig ¶
type RouterConfig struct {
Targets []Target
Retry RetryPolicy
CircuitFailureThreshold int
CircuitOpenDuration time.Duration
State *RouterState
OnRetry func(RetryEvent)
}
type RouterState ¶
type RouterState struct {
// contains filtered or unexported fields
}
func NewRouterState ¶
func NewRouterState() *RouterState
func (*RouterState) Status ¶
func (s *RouterState) Status() map[string]CircuitStatus
Click to show internal directories.
Click to hide internal directories.