diff --git a/CHANGELOG.md b/CHANGELOG.md index a753fab97b577e70ce77c6e66f31688c68193f9a..94c609df548b3fc1e6207ec7ce86d74215246cee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # 更新日志 +## [0.0.1-beta.4] - 2025.6.26 +### Changed +- 修改历史上的今天,修改限制判断 + ## [0.0.1-beta.4] - 2025.6.24 ### Changed - 增加音乐专辑字段 diff --git a/c2c.http b/c2c.http index 2c4bba12f9be15d5644271c6ada2943158116ce0..805ac38b02521043c2bd3d39fcb337adc72172e1 100644 --- a/c2c.http +++ b/c2c.http @@ -10,7 +10,7 @@ Content-Type: application/json }, "nluRet": { "asr_recongize": "", - "text": "换一首歌" + "text": "几点了几点了几点了" } }, "version": "v0" @@ -24,8 +24,8 @@ X-AppKey: 391b50b5ed634fc49a3db7cfd6bc40db { "ip": "14.215.222.17", "mac": "ece154a865eb", - "mid": "11011", - "query":"换个故事", + "mid": "10f05", + "query":"历史上的今天", "requestId": "123456111" } @@ -38,8 +38,8 @@ X-AppKey: 391b50b5ed634fc49a3db7cfd6bc40db { "ip": "14.215.222.17", "mac": "ece154a865eb", - "mid": "11011", - "query":"换个故事", + "mid": "10f05", + "query":"历史上的今天", "requestId": "123456111" } @@ -60,7 +60,7 @@ Content-Type: application/json "trafficParameter": "mode=childxxx;macWifi=28b77c218ed1;mid=10f05;vender=7e000025;macVoice=testyuntiancloud;ver=3.0;scenario=smarthome;filterName=nlu;req_nlu_length=1;returnType=json;fullDuplex=true;appendLength=1;additionalService=geli_nlu2;version=0.5;filterUrl=https://testnlu.gree.com:443/semantic/unisoundc2c/querys;" }, "nluRet": { - "text": "哈萨克斯坦的全称" + "text": "几点了伦敦" }, "postProc": {} } @@ -101,7 +101,7 @@ Content-Type: application/json "trafficParameter": "mode=childxx;macWifi=ece154a73d38;mid=11011;macVoice=testyuntiancloud;ver=3.0;scenario=smarthome;filterName=nlu;req_nlu_length=1;returnType=json;fullDuplex=true;appendLength=1;additionalService=geli_nlu2;version=0.5;filterUrl=https://testnlu.gree.com:443/semantic/unisoundc2c/querys;" }, "nluRet": { - "text": "换一首歌" + "text": "播放治愈" }, "postProc": {} } diff --git a/service/speechNlu/domain.go b/service/speechNlu/domain.go index 8f579b3c6d44bf262dfbb51f5a9e5f69e7cdc2c4..1d42153228d389b95c36c451ff5fc98297cd53c2 100644 --- a/service/speechNlu/domain.go +++ b/service/speechNlu/domain.go @@ -127,7 +127,7 @@ func calendarDomain(params *model.SpeechDomainParams) []byte { var l int //var resStrb string - if len(sliceData) < global.GetLimitedSetting(params.Mid).HistoryNum { + if len(sliceData) < global.GetLimitedSetting(params.Mid).HistoryNum || global.GetLimitedSetting(params.Mid).HistoryNum < 0 { l = len(sliceData) } else { // 使用限制的条数 l = global.GetLimitedSetting(params.Mid).HistoryNum @@ -824,9 +824,7 @@ func musicDomain(params *model.SpeechDomainParams) []byte { } query := params.SpeechWsResp.Dm.Input - if !params.CheckDmCommand() { - return replyWithChat(error_reply, "doudi") - } else { + if params.CheckDmCommand() { if params.SpeechWsResp.Dm.Command.Api != "" { switch params.SpeechWsResp.Dm.Command.Api { case "DUI.MediaController.Pause": @@ -839,6 +837,8 @@ func musicDomain(params *model.SpeechDomainParams) []byte { return transformGreeProtocolReply(query, "PlayControl", "control_next", nil) case "DUI.MediaController.Prev": return transformGreeProtocolReply(query, "PlayControl", "control_previous", nil) + case "DUI.MediaController.SetPlayMode": + return transformGreeProtocolReply(query, "PlayControl", "control_previous", nil) } } }