Documentation
¶
Index ¶
- Constants
- func ConvertAIChatToUIChat(aiChat uctypes.AIChat) (*uctypes.UIChat, error)
- func ConvertAIMessageToAnthropicChatMessage(aiMsg uctypes.AIMessage) (*anthropicChatMessage, error)
- func ConvertToolResultsToAnthropicChatMessage(toolResults []uctypes.AIToolResult) (*anthropicChatMessage, error)
- func GetFunctionCallInputByToolCallId(aiChat uctypes.AIChat, toolCallId string) *uctypes.AIFunctionCallInput
- func RemoveToolUseCall(chatId string, toolCallId string) error
- func RunAnthropicChatStep(ctx context.Context, sse *sse.SSEHandlerCh, chatOpts uctypes.WaveChatOpts, ...) (*uctypes.WaveStopReason, *anthropicChatMessage, *uctypes.RateLimitInfo, error)
- func UpdateToolUseData(chatId string, toolCallId string, toolUseData uctypes.UIMessageDataToolUse) error
Constants ¶
View Source
const ( AnthropicDefaultAPIVersion = "2023-06-01" AnthropicDefaultMaxTokens = 4096 AnthropicThinkingBudget = 1024 AnthropicMinThinkingBudget = 1024 ProviderMetadataThinkingSignatureKey = "anthropic:signature" )
Variables ¶
This section is empty.
Functions ¶
func ConvertAIChatToUIChat ¶
ConvertAIChatToUIChat converts an AIChat to a UIChat for Anthropic
func ConvertAIMessageToAnthropicChatMessage ¶
convertAIMessageToAnthropicChatMessage converts an AIMessage to anthropicChatMessage These messages are ALWAYS role "user"
func ConvertToolResultsToAnthropicChatMessage ¶
func ConvertToolResultsToAnthropicChatMessage(toolResults []uctypes.AIToolResult) (*anthropicChatMessage, error)
ConvertToolResultsToAnthropicChatMessage converts AIToolResult slice to anthropicChatMessage
func GetFunctionCallInputByToolCallId ¶ added in v0.14.2
func GetFunctionCallInputByToolCallId(aiChat uctypes.AIChat, toolCallId string) *uctypes.AIFunctionCallInput
func RemoveToolUseCall ¶ added in v0.14.2
func RunAnthropicChatStep ¶
func RunAnthropicChatStep( ctx context.Context, sse *sse.SSEHandlerCh, chatOpts uctypes.WaveChatOpts, cont *uctypes.WaveContinueResponse, ) (*uctypes.WaveStopReason, *anthropicChatMessage, *uctypes.RateLimitInfo, error)
func UpdateToolUseData ¶ added in v0.14.2
func UpdateToolUseData(chatId string, toolCallId string, toolUseData uctypes.UIMessageDataToolUse) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.