添加spark日志输出

This commit is contained in:
junleea 2025-03-24 15:22:43 +08:00
parent d26e208ad6
commit f4f197fa8c
1 changed files with 3 additions and 1 deletions

View File

@ -106,6 +106,8 @@ type SparkResponse struct {
/***************** Spark响应结构 ***********************/ /***************** Spark响应结构 ***********************/
func Spark(modelParam proto.ModelParam, question, channel string, SessionID, UserID int) { func Spark(modelParam proto.ModelParam, question, channel string, SessionID, UserID int) {
log.Println("spark model param:", modelParam)
log.Println("spark question:", question)
//建立websocket连接 //建立websocket连接
dialer := websocket.Dialer{ dialer := websocket.Dialer{
HandshakeTimeout: 5 * time.Second, HandshakeTimeout: 5 * time.Second,
@ -152,7 +154,7 @@ func Spark(modelParam proto.ModelParam, question, channel string, SessionID, Use
} }
if data.Header.Code != 0 { if data.Header.Code != 0 {
log.Println("Error response:", data.Header.Message) log.Println("Error response:", data.Header.Message, msg)
break break
} }
if data.Header.Status == 2 { if data.Header.Status == 2 {