File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ func GetConfiguredChatProviders() []ChatProvider {
82
82
})
83
83
}
84
84
85
- if len (OpenAICompatibleAPIKey ) > 0 && len (OpenAICompatibleEndpoint ) > 0 {
85
+ if len (OpenAICompatibleAPIKey ) > 0 && len (OpenAICompatibleEndpoint ) > 0 && len ( CustomModels ) > 0 {
86
86
providers = append (providers , ChatProvider {
87
87
Type : "OpenAI-Compatible" ,
88
88
APIKey : OpenAICompatibleAPIKey ,
@@ -134,7 +134,7 @@ func GetOpenAIEndpoint() string {
134
134
}
135
135
136
136
func GetOpenAICompatibleEndpoint () string {
137
- if OpenAICompatibleEndpoint != "" && OpenAICompatibleAPIKey != "" {
137
+ if OpenAICompatibleEndpoint != "" && OpenAICompatibleAPIKey != "" && len ( CustomModels ) > 0 {
138
138
return OpenAICompatibleEndpoint
139
139
}
140
140
return "https://api.openai.com/v1"
You can’t perform that action at this time.
0 commit comments