Documentation
¶
Overview ¶
Package claude holds the Claude request mapping shared by the Anthropic and Bedrock adapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToolUseID ¶
ToolUseID returns id in a form both Claude protocols accept: Anthropic allows [a-zA-Z0-9_-]+ and Bedrock Converse at most 64 characters. A conforming id is returned unchanged; any other is rewritten deterministically, with a hash of the original appended so distinct ids stay distinct. Apply it to tool calls and tool results alike.
Types ¶
type ThinkingConfig ¶
type ThinkingConfig struct {
Type string `json:"type"`
BudgetTokens *int `json:"budget_tokens,omitempty"`
Display string `json:"display,omitempty"`
Effort string `json:"-"`
}
ThinkingConfig is Claude's thinking object; Effort travels separately in output_config.
func Thinking ¶
func Thinking(t *litellm.Thinking) *ThinkingConfig
Thinking maps t: a budget selects "enabled" with budget_tokens, otherwise "adaptive". Values are sent as given. It returns nil when t is nil.