2024-04-23 11:44:40 +08:00
|
|
|
package aws
|
|
|
|
|
|
2024-10-24 00:19:08 +08:00
|
|
|
import (
|
|
|
|
|
"one-api/relay/channel/claude"
|
|
|
|
|
)
|
2024-04-23 11:44:40 +08:00
|
|
|
|
|
|
|
|
type AwsClaudeRequest struct {
|
|
|
|
|
// AnthropicVersion should be "bedrock-2023-05-31"
|
|
|
|
|
AnthropicVersion string `json:"anthropic_version"`
|
2024-04-29 00:06:25 +08:00
|
|
|
System string `json:"system"`
|
2024-04-23 11:44:40 +08:00
|
|
|
Messages []claude.ClaudeMessage `json:"messages"`
|
|
|
|
|
MaxTokens int `json:"max_tokens,omitempty"`
|
|
|
|
|
Temperature float64 `json:"temperature,omitempty"`
|
|
|
|
|
TopP float64 `json:"top_p,omitempty"`
|
|
|
|
|
TopK int `json:"top_k,omitempty"`
|
|
|
|
|
StopSequences []string `json:"stop_sequences,omitempty"`
|
2024-10-24 00:19:08 +08:00
|
|
|
Tools []claude.Tool `json:"tools,omitempty"`
|
|
|
|
|
ToolChoice any `json:"tool_choice,omitempty"`
|
2024-04-23 11:44:40 +08:00
|
|
|
}
|