fix: merge latest change from remote

This commit is contained in:
ckt1031
2023-07-15 21:12:55 +08:00
parent 8f0799d909
commit 256d290507
11 changed files with 129 additions and 26 deletions

View File

@@ -74,6 +74,11 @@ func Distribute() func(c *gin.Context) {
modelRequest.Model = "text-moderation-stable"
}
}
if strings.HasSuffix(c.Request.URL.Path, "embeddings") {
if modelRequest.Model == "" {
modelRequest.Model = c.Param("model")
}
}
if strings.HasPrefix(c.Request.URL.Path, "/v1/images/generations") {
if modelRequest.Model == "" {
modelRequest.Model = "dall-e"