Commit 3dca8b4b authored by 赵文静's avatar 赵文静

增加日志

parent bae36f65
Pipeline #5199 passed with stage
in 0 seconds
......@@ -270,7 +270,7 @@ type ResponseBody struct {
} `json:"header"`
ResponseText string `json:"response_text"`
AsrRecongize string `json:"asr_recongize"`
ListItems []map[string]interface{} `json:"listItems"`
ListItems []map[string]interface{} `json:"listItems,omitempty"`
}
type SDKExtend struct {
......
......@@ -51,6 +51,7 @@ func baseParse(params *model.SpeechDomainParams) (*model.ResponseBody, error) {
//result.Header.Semantic.SkillId = result.Header.Semantic.Domain + "." + result.Header.Semantic.Intent
result.ResponseText = params.SpeechWsResp.Dm.Nlg
result.AsrRecongize = params.SpeechWsResp.Dm.Input
//result.ListItems = make([]map[string]interface{}, 0)
if !params.SpeechWsResp.Dm.ShouldEndSession {
fmt.Println("保存:", params.SpeechWsResp.SessionId)
UpdateSession(params.Mac, params.SpeechWsResp.SessionId)
......
......@@ -76,6 +76,10 @@ func SpeechNlpWsReq(data *model.SemanticReq, sessionId string) *SpeechWsData {
req.SessionId = sessionId
req.RefText = data.Query
log.Printf("请求的sessionId: %s", req.SessionId)
global.Logger.WithFields(logger.Fields{
"req": req,
"sessionId": sessionId,
}).Error("SpeechNlpWsReq")
return req
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment