Commit 42091f61 authored by 赵文静's avatar 赵文静

修改历史上的今天

parent ee5e9986
# 更新日志
## [0.0.1-beta.4] - 2025.6.26
### Changed
- 修改历史上的今天,修改限制判断
## [0.0.1-beta.4] - 2025.6.24
### Changed
- 增加音乐专辑字段
......
......@@ -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": {}
}
......
......@@ -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)
}
}
}
......
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