适配6.10

This commit is contained in:
liuchunk 2024-02-27 13:36:11 +08:00
parent b0f40b239c
commit 1114a498ce
4 changed files with 5 additions and 11 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ build
logs
data
/web/node_modules
/.history

View File

@ -2,6 +2,9 @@ package controller
import (
"fmt"
"net/http"
"strconv"
"github.com/gin-gonic/gin"
"github.com/songquanpeng/one-api/common/config"
"github.com/songquanpeng/one-api/common/helper"
@ -10,8 +13,6 @@ import (
"github.com/songquanpeng/one-api/relay/controller"
"github.com/songquanpeng/one-api/relay/model"
"github.com/songquanpeng/one-api/relay/util"
"net/http"
"strconv"
)
// https://platform.openai.com/docs/api-reference/chat
@ -45,9 +46,7 @@ func Relay(c *gin.Context) {
err.Error.Message = "当前分组上游负载已饱和,请稍后再试"
}
err.Error.Message = common.MessageWithRequestId("Request From https://api.adamchatbot.chat Error", requestId)
err.Error.Message = helper.MessageWithRequestId("Request From https://api.adamchatbot.chat Error", requestId)
c.JSON(err.StatusCode, gin.H{
"error": err.Error,

View File

@ -3,10 +3,6 @@ package model
import (
"errors"
"fmt"
"one-api/common"
"github.com/songquanpeng/one-api/common"
"github.com/songquanpeng/one-api/common/config"
"github.com/songquanpeng/one-api/common/helper"

View File

@ -2,8 +2,6 @@ package router
import (
"one-api/controller"
"one-api/middleware"
"github.com/gin-contrib/gzip"
"github.com/gin-gonic/gin"