mirror of
https://github.com/coaidev/coai.git
synced 2025-05-19 13:00:14 +09:00
fix: variables and VisionSkipModels
This commit is contained in:
parent
e60326292a
commit
135def8bb0
@ -144,12 +144,16 @@ var OpenAIDalleModels = []string{
|
||||
}
|
||||
|
||||
var VisionModels = []string{
|
||||
GPT4VisionPreview, GPT41106VisionPreview, GPT4O, GPT4O20240513, // openai
|
||||
GeminiProVision, // gemini
|
||||
GPT4VisionPreview, GPT41106VisionPreview, GPT4Turbo, GPT4Turbo20240409, GPT4O, GPT4O20240513, // openai
|
||||
GeminiProVision, Gemini15ProLatest, Gemini15FlashLatest, // gemini
|
||||
Claude3, // anthropic
|
||||
ZhiPuChatGLM4Vision, // chatglm
|
||||
}
|
||||
|
||||
var VisionSkipModels = []string{
|
||||
GPT4TurboPreview,
|
||||
}
|
||||
|
||||
func in(value string, slice []string) bool {
|
||||
for _, item := range slice {
|
||||
if item == value || strings.Contains(value, item) {
|
||||
@ -165,5 +169,6 @@ func IsOpenAIDalleModel(model string) bool {
|
||||
}
|
||||
|
||||
func IsVisionModel(model string) bool {
|
||||
return in(model, VisionModels)
|
||||
return in(model, VisionModels) && !in(model, VisionSkipModels)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user