Skip to content

Commit

Permalink
fix: 调整一些调试日志info->debug
Browse files Browse the repository at this point in the history
  • Loading branch information
liuhuapiaoyuan committed Jan 28, 2024
1 parent 8e69482 commit bb9d470
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backend-api/backend-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ func AttachGPT4Mobile(ctx g.Ctx, response *http.Response) error {
func CreateConversation(ctx g.Ctx, userId int, chatgptId int, AccessToken string, userAgent string, conversationPath string) {
// 提取 /backend-api/conversation/gen_title/{id}
id := strings.Split(conversationPath, "/")[4]


UpStream := config.CHATPROXY(ctx)
// 请求后端接口
Expand Down Expand Up @@ -209,14 +208,14 @@ func CreateConversation(ctx g.Ctx, userId int, chatgptId int, AccessToken string
func RemoveCreateConversation(ctx g.Ctx, response *http.Response, conversationPath string) {
g.Log().Debug(ctx, "RemoveCreateConversation", conversationPath)
id := strings.Split(conversationPath, "/")[3]
g.Log().Info(ctx, "提取出的ID", id)
g.Log().Debug(ctx, "提取出的ID", id)

originalBody, shouldReturn, err := loadRespString(response)
if err != nil || shouldReturn {
return
}
resJson := gjson.New(string(originalBody))
g.Log().Info(ctx, "conversation will removed", resJson)
g.Log().Debug(ctx, "conversation will removed", resJson)
if resJson.Get("success").Bool() {
cool.DBM(model.NewChatgptHistory()).Where("conversation_id", id).Delete()
}
Expand Down

0 comments on commit bb9d470

Please sign in to comment.