mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-27 21:56:39 +08:00
The GetAdaptor function in the Adaptor struct has been updated to use the actual model name instead of the origin model name. This change ensures that the correct adaptor is retrieved for processing the response.
20 lines
886 B
Go
20 lines
886 B
Go
package vertexai
|
|
|
|
import "github.com/songquanpeng/one-api/relay/adaptor/anthropic"
|
|
|
|
type Request struct {
|
|
// AnthropicVersion must be "vertex-2023-10-16"
|
|
AnthropicVersion string `json:"anthropic_version"`
|
|
// Model string `json:"model"`
|
|
Messages []anthropic.Message `json:"messages"`
|
|
System string `json:"system,omitempty"`
|
|
MaxTokens int `json:"max_tokens,omitempty"`
|
|
StopSequences []string `json:"stop_sequences,omitempty"`
|
|
Stream bool `json:"stream,omitempty"`
|
|
Temperature float64 `json:"temperature,omitempty"`
|
|
TopP float64 `json:"top_p,omitempty"`
|
|
TopK int `json:"top_k,omitempty"`
|
|
Tools []anthropic.Tool `json:"tools,omitempty"`
|
|
ToolChoice any `json:"tool_choice,omitempty"`
|
|
}
|