From da6678ea95e6545589dbdccd168a82e2da8832d2 Mon Sep 17 00:00:00 2001 From: Su Yang Date: Wed, 31 Jan 2024 10:25:13 +0800 Subject: [PATCH] fix: fix query api version --- models/azure/proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/azure/proxy.go b/models/azure/proxy.go index a250771..35c5bd8 100644 --- a/models/azure/proxy.go +++ b/models/azure/proxy.go @@ -49,7 +49,7 @@ func ModelProxy(c *gin.Context) { for _, deployment := range ModelConfig { go func(deployment define.ModelConfig) { // Create the request - req, err := http.NewRequest(http.MethodGet, deployment.Endpoint+"/openai/deployments?api-version=2022-12-01", nil) + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/openai/deployments?api-version=%s", deployment.Endpoint, deployment.Version), nil) if err != nil { log.Printf("error parsing response body for deployment %s: %v", deployment.Name, err) results <- nil