mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-10 02:23:43 +08:00
refactor: Refactor: Consolidate Anthropic model requests into GeneralOpenAIRequest
- Refactor Anthropic adapter to work with the new Anthropic API and model requests - Remove the default value for `MaxTokensToSample` - Set `MaxTokens` to 500 instead of 1000000 - Use `system` messages as the system prompt instead of the first message
This commit is contained in:
@@ -3,7 +3,7 @@ package helper
|
||||
import (
|
||||
"github.com/songquanpeng/one-api/relay/channel"
|
||||
"github.com/songquanpeng/one-api/relay/channel/aiproxy"
|
||||
// "github.com/songquanpeng/one-api/relay/channel/anthropic"
|
||||
"github.com/songquanpeng/one-api/relay/channel/anthropic"
|
||||
"github.com/songquanpeng/one-api/relay/channel/gemini"
|
||||
"github.com/songquanpeng/one-api/relay/channel/openai"
|
||||
"github.com/songquanpeng/one-api/relay/channel/palm"
|
||||
@@ -17,8 +17,7 @@ func GetAdaptor(apiType int) channel.Adaptor {
|
||||
// case constant.APITypeAli:
|
||||
// return &ali.Adaptor{}
|
||||
case constant.APITypeAnthropic:
|
||||
// return &anthropic.Adaptor{}
|
||||
return &openai.Adaptor{}
|
||||
return &anthropic.Adaptor{}
|
||||
// case constant.APITypeBaidu:
|
||||
// return &baidu.Adaptor{}
|
||||
case constant.APITypeGemini:
|
||||
|
||||
Reference in New Issue
Block a user