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