feat: support cohere (close #195)

This commit is contained in:
CaIon
2024-04-24 18:49:56 +08:00
parent 3f448ba4fc
commit bfcaccc2e3
11 changed files with 322 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ import (
"one-api/relay/channel/aws"
"one-api/relay/channel/baidu"
"one-api/relay/channel/claude"
"one-api/relay/channel/cohere"
"one-api/relay/channel/gemini"
"one-api/relay/channel/ollama"
"one-api/relay/channel/openai"
@@ -48,6 +49,8 @@ func GetAdaptor(apiType int) channel.Adaptor {
return &perplexity.Adaptor{}
case constant.APITypeAws:
return &aws.Adaptor{}
case constant.APITypeCohere:
return &cohere.Adaptor{}
}
return nil
}