Documentation
¶
Index ¶
- func IsSupportedType(name string) bool
- func NewModelFactory(models *Models, clientOpts ...litellm.ClientOption) func(ModelSpec) (agentcore.Model, error)
- func Thinking(effort string) *litellm.Thinking
- func ThinkingLevels(client *litellm.Client, reasoning *bool) []string
- func ValidEffort(effort string) bool
- func WithCacheKey(model agentcore.Model, key string) agentcore.Model
- type ModelSpec
- type Models
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSupportedType ¶
IsSupportedType defers to litellm rather than keeping its own list. Type "gateway" reaches a litellm gateway that holds the keys and makes the calls, so codebot can run where keys must not live, such as a sandbox.
func NewModelFactory ¶
func NewModelFactory(models *Models, clientOpts ...litellm.ClientOption) func(ModelSpec) (agentcore.Model, error)
NewModelFactory names each provider as configured, so replay state goes back only to the endpoint that issued it.
func ThinkingLevels ¶
ThinkingLevels returns the efforts a user may pick. reasoning comes from the model list and is nil when unknown. "" is always offered; the others only if the model may reason and the provider can send that setting. Which efforts a reasoning model accepts is left to the vendor.
func ValidEffort ¶
Types ¶
type ModelSpec ¶
type ModelSpec struct {
// Type is the litellm provider that Provider speaks; they differ for
// custom providers.
Provider string
Type string
Model string
Conn llmprovider.Config
}
type Models ¶
type Models struct {
// contains filtered or unexported fields
}
Models serves the built-in snapshot until Refresh loads a current list.