anthropic

package
v0.12.0-beta.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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

func ConvertAIChatToUIChat(aiChat uctypes.AIChat) (*uctypes.UIChat, error)

ConvertAIChatToUIChat converts an AIChat to a UIChat for Anthropic

func ConvertAIMessageToAnthropicChatMessage

func ConvertAIMessageToAnthropicChatMessage(aiMsg uctypes.AIMessage) (*anthropicChatMessage, error)

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 RunAnthropicChatStep

func RunAnthropicChatStep(
	ctx context.Context,
	sse *sse.SSEHandlerCh,
	chatOpts uctypes.WaveChatOpts,
	cont *uctypes.WaveContinueResponse,
) (*uctypes.WaveStopReason, *anthropicChatMessage, *uctypes.RateLimitInfo, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL