support dall-e

This commit is contained in:
Sakurasan
2023-11-23 18:03:15 +08:00
parent e8ed9aaa78
commit c838e7be16
6 changed files with 188 additions and 5 deletions

View File

@@ -486,6 +486,11 @@ func HandleProy(c *gin.Context) {
return
}
if c.Request.URL.Path == "/v1/images/generations" {
oai.DalleHandler(c)
return
}
if c.Request.URL.Path == "/v1/chat/completions" && localuser {
if store.KeysCache.ItemCount() == 0 {
c.JSON(http.StatusBadGateway, gin.H{"error": gin.H{