Commit cb5ccbf5 by JustSong

fix: fix /v1/models not working (close #66)

parent 0821cd6b
......@@ -112,7 +112,7 @@ func TokenAuth() func(c *gin.Context) {
c.Set("token_id", token.Id)
requestURL := c.Request.URL.String()
consumeQuota := !token.UnlimitedQuota
if strings.HasPrefix(requestURL, "/models") {
if strings.HasPrefix(requestURL, "/v1/models") {
consumeQuota = false
}
c.Set("consume_quota", consumeQuota)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment