feat: support aws claude

This commit is contained in:
CaIon
2024-04-23 11:44:40 +08:00
parent 6b97842f78
commit 9294127686
17 changed files with 464 additions and 81 deletions

14
relay/channel/aws/dto.go Normal file
View File

@@ -0,0 +1,14 @@
package aws
import "one-api/relay/channel/claude"
type AwsClaudeRequest struct {
// AnthropicVersion should be "bedrock-2023-05-31"
AnthropicVersion string `json:"anthropic_version"`
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"`
}