ai-gateway/relay/adaptor/openai/compatible.go

51 lines
1.4 KiB
Go
Raw Normal View History

2024-03-10 06:09:44 +00:00
package openai
import (
"github.com/songquanpeng/one-api/relay/adaptor/ai360"
"github.com/songquanpeng/one-api/relay/adaptor/baichuan"
"github.com/songquanpeng/one-api/relay/adaptor/groq"
"github.com/songquanpeng/one-api/relay/adaptor/lingyiwanwu"
"github.com/songquanpeng/one-api/relay/adaptor/minimax"
"github.com/songquanpeng/one-api/relay/adaptor/mistral"
"github.com/songquanpeng/one-api/relay/adaptor/moonshot"
"github.com/songquanpeng/one-api/relay/adaptor/stepfun"
"github.com/songquanpeng/one-api/relay/channeltype"
2024-03-10 06:09:44 +00:00
)
var CompatibleChannels = []int{
channeltype.Azure,
channeltype.AI360,
channeltype.Moonshot,
channeltype.Baichuan,
channeltype.Minimax,
channeltype.Mistral,
channeltype.Groq,
channeltype.LingYiWanWu,
channeltype.StepFun,
2024-03-10 06:09:44 +00:00
}
func GetCompatibleChannelMeta(channelType int) (string, []string) {
switch channelType {
case channeltype.Azure:
2024-03-10 06:09:44 +00:00
return "azure", ModelList
case channeltype.AI360:
2024-03-10 06:09:44 +00:00
return "360", ai360.ModelList
case channeltype.Moonshot:
2024-03-10 06:09:44 +00:00
return "moonshot", moonshot.ModelList
case channeltype.Baichuan:
2024-03-10 06:09:44 +00:00
return "baichuan", baichuan.ModelList
case channeltype.Minimax:
2024-03-10 06:09:44 +00:00
return "minimax", minimax.ModelList
case channeltype.Mistral:
2024-03-10 06:09:44 +00:00
return "mistralai", mistral.ModelList
case channeltype.Groq:
2024-03-10 06:09:44 +00:00
return "groq", groq.ModelList
case channeltype.LingYiWanWu:
2024-03-14 15:11:36 +00:00
return "lingyiwanwu", lingyiwanwu.ModelList
case channeltype.StepFun:
2024-04-05 04:32:05 +00:00
return "stepfun", stepfun.ModelList
2024-03-10 06:09:44 +00:00
default:
return "openai", ModelList
}
}