mirror of
https://github.com/coaidev/coai.git
synced 2025-05-20 05:20:15 +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{
|
var VisionModels = []string{
|
||||||
GPT4VisionPreview, GPT41106VisionPreview, GPT4O, GPT4O20240513, // openai
|
GPT4VisionPreview, GPT41106VisionPreview, GPT4Turbo, GPT4Turbo20240409, GPT4O, GPT4O20240513, // openai
|
||||||
GeminiProVision, // gemini
|
GeminiProVision, Gemini15ProLatest, Gemini15FlashLatest, // gemini
|
||||||
Claude3, // anthropic
|
Claude3, // anthropic
|
||||||
ZhiPuChatGLM4Vision, // chatglm
|
ZhiPuChatGLM4Vision, // chatglm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var VisionSkipModels = []string{
|
||||||
|
GPT4TurboPreview,
|
||||||
|
}
|
||||||
|
|
||||||
func in(value string, slice []string) bool {
|
func in(value string, slice []string) bool {
|
||||||
for _, item := range slice {
|
for _, item := range slice {
|
||||||
if item == value || strings.Contains(value, item) {
|
if item == value || strings.Contains(value, item) {
|
||||||
@ -165,5 +169,6 @@ func IsOpenAIDalleModel(model string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func IsVisionModel(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