mirror of
https://github.com/alibaba/higress.git
synced 2026-04-22 20:47:36 +08:00
Supports completions API & support config openai baseUrl through openaiCustomUrl (#1765)
This commit is contained in:
@@ -270,6 +270,9 @@ func checkStream(ctx wrapper.HttpContext, log wrapper.Log) {
|
||||
|
||||
func getApiName(path string) provider.ApiName {
|
||||
// openai style
|
||||
if strings.HasSuffix(path, "/v1/completions") {
|
||||
return provider.ApiNameCompletion
|
||||
}
|
||||
if strings.HasSuffix(path, "/v1/chat/completions") {
|
||||
return provider.ApiNameChatCompletion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user