mirror of
https://github.com/alibaba/higress.git
synced 2026-04-20 19:47:29 +08:00
fix openai embedding path (#1881)
This commit is contained in:
@@ -18,7 +18,7 @@ const (
|
||||
defaultOpenaiDomain = "api.openai.com"
|
||||
defaultOpenaiChatCompletionPath = "/v1/chat/completions"
|
||||
defaultOpenaiCompletionPath = "/v1/completions"
|
||||
defaultOpenaiEmbeddingsPath = "/v1/chat/embeddings"
|
||||
defaultOpenaiEmbeddingsPath = "/v1/embeddings"
|
||||
defaultOpenaiAudioSpeech = "/v1/audio/speech"
|
||||
defaultOpenaiImageGeneration = "/v1/images/generations"
|
||||
)
|
||||
@@ -42,7 +42,7 @@ func (m *openaiProviderInitializer) DefaultCapabilities() map[string]string {
|
||||
|
||||
func isDirectPath(path string) bool {
|
||||
return strings.HasSuffix(path, "/completions") ||
|
||||
strings.HasSuffix(path, "/chat/embeddings") ||
|
||||
strings.HasSuffix(path, "/embeddings") ||
|
||||
strings.HasSuffix(path, "/audio/speech") ||
|
||||
strings.HasSuffix(path, "/images/generations")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user