fix: remove the dot in model name (#57)

This commit is contained in:
JustSong
2023-05-13 12:24:49 +08:00
parent da9ccb528d
commit 73aa53f536
3 changed files with 3 additions and 2 deletions

View File

@@ -100,6 +100,7 @@ func relayHelper(c *gin.Context) error {
baseURL = c.GetString("base_url")
task := strings.TrimPrefix(requestURL, "/v1/")
model_ := textRequest.Model
model_ = strings.Replace(model_, ".", "", -1)
fullRequestURL = fmt.Sprintf("%s/openai/deployments/%s/%s", baseURL, model_, task)
}
req, err := http.NewRequest(c.Request.Method, fullRequestURL, c.Request.Body)