mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 02:03:42 +08:00
feat: add env var to set log level
This commit is contained in:
@@ -57,7 +57,7 @@ func (h *ConfigHandler) Update(c *gin.Context) {
|
||||
resp.ERROR(c, "Failed to update config cache: "+err.Error())
|
||||
return
|
||||
}
|
||||
logger.Infof("Update AppServer's config successfully: %v", config.Config)
|
||||
logger.Debugf("Update AppServer's config successfully: %v", config.Config)
|
||||
}
|
||||
|
||||
resp.SUCCESS(c, config)
|
||||
|
||||
@@ -205,9 +205,7 @@ func (h *ChatHandler) sendMessage(ctx context.Context, session types.ChatSession
|
||||
}
|
||||
}
|
||||
|
||||
if h.App.Debug { // 调试打印聊天上下文
|
||||
logger.Info("聊天上下文:", chatCtx)
|
||||
}
|
||||
logger.Debugf("聊天上下文:%+v", chatCtx)
|
||||
}
|
||||
reqMgs := make([]interface{}, 0)
|
||||
for _, m := range chatCtx {
|
||||
@@ -312,7 +310,6 @@ func (h *ChatHandler) sendMessage(ctx context.Context, session types.ChatSession
|
||||
logger.Info(functionName)
|
||||
logger.Info(arguments)
|
||||
f := h.App.Functions[functionName]
|
||||
// TODO 调用函数完成任务
|
||||
data, err := f.Invoke(arguments)
|
||||
if err != nil {
|
||||
msg := "调用函数出错:" + err.Error()
|
||||
|
||||
Reference in New Issue
Block a user