feat: publish sanitized custom.97 source
This commit is contained in:
1022 files changed
+69903
-19207
No files matched your search
@@ -156,7 +156,7 @@ func handleCozeEvent(c *gin.Context, event string, data string, responseText *st
|
||||
var chatData CozeChatResponseData
|
||||
err := json.Unmarshal([]byte(data), &chatData)
|
||||
if err != nil {
|
||||
common.SysLog("error_unmarshalling_stream_response: " + err.Error())
|
||||
common.SysLog(common.LogText("error_unmarshalling_stream_response: %s", err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -173,14 +173,14 @@ func handleCozeEvent(c *gin.Context, event string, data string, responseText *st
|
||||
var messageData CozeChatV3MessageDetail
|
||||
err := json.Unmarshal([]byte(data), &messageData)
|
||||
if err != nil {
|
||||
common.SysLog("error_unmarshalling_stream_response: " + err.Error())
|
||||
common.SysLog(common.LogText("error_unmarshalling_stream_response: %s", err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
var content string
|
||||
err = json.Unmarshal(messageData.Content, &content)
|
||||
if err != nil {
|
||||
common.SysLog("error_unmarshalling_stream_response: " + err.Error())
|
||||
common.SysLog(common.LogText("error_unmarshalling_stream_response: %s", err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -205,11 +205,11 @@ func handleCozeEvent(c *gin.Context, event string, data string, responseText *st
|
||||
var errorData CozeError
|
||||
err := json.Unmarshal([]byte(data), &errorData)
|
||||
if err != nil {
|
||||
common.SysLog("error_unmarshalling_stream_response: " + err.Error())
|
||||
common.SysLog(common.LogText("error_unmarshalling_stream_response: %s", err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
common.SysLog(fmt.Sprintf("stream event error: %v %v", errorData.Code, errorData.Message))
|
||||
common.SysLog(common.LogText("stream event error: %v %v", errorData.Code, errorData.Message))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user