Commit c3e78176 authored by 赵文静's avatar 赵文静

增加黄历查询

parent b6f8f363
Pipeline #5455 passed with stage
in 0 seconds
......@@ -3,6 +3,7 @@
### Changed
- 增加音乐兜底
- 增加星座运势
- 增加黄历查询
## [0.0.1-beta.3] - 2025.6.6-6.14
### Changed
......
......@@ -5,7 +5,7 @@ Content-Type: application/json
"ip": "14.215.222.17",
"mac": "ece154a865eb",
"mid": "11011",
"query":"播放时政热点",
"query":"水瓶座今年的运势咋样",
"requestId": "123456111"
}
......@@ -17,7 +17,7 @@ Content-Type: application/json
"ip": "14.215.222.17",
"mac": "ece154a865eb",
"mid": "11011",
"query":"r",
"query":"二十四节气",
"requestId": "123456111"
}
......@@ -38,7 +38,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": {}
}
......@@ -79,7 +79,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": {}
}
......
......@@ -93,9 +93,9 @@ const (
WASTESORTING = "垃圾分类"
FOOD = "食物营养查询"
ASTRO_FORTUNE = "星座运势"
ALMANAC = "黄历查询"
SOUND = "sound"
ALMANAC = "almanac"
SOUND = "sound"
GENERALQA = "general_question_answering"
COMMONQA = "common_qa"
......
......@@ -1092,6 +1092,25 @@ func astroFortuneDomain(params *model.SpeechDomainParams) []byte {
return Marshal(params, res)
}
func almanacDomain(params *model.SpeechDomainParams) []byte {
res, err := baseParse(params)
if err != nil {
global.Logger.WithFields(logger.Fields{
"requestId": params.RequestId,
"mac": params.Mac,
"mid": params.Mid,
"vender": params.MidType,
}).Error("almanacDomain baseParse error.")
return replyWithChat(error_reply, "doudi")
}
res.Header.Semantic.Domain = "almanac"
res.Header.Semantic.Intent = "search_almanactime"
res.Header.Semantic.SkillId = res.Header.Semantic.Domain + "." + res.Header.Semantic.Intent
return Marshal(params, res)
}
func Marshal(params *model.SpeechDomainParams, res *model.ResponseBody) []byte {
if res.Header.Semantic.Domain == "" {
res.Header.Semantic.Domain = "chat"
......
......@@ -53,6 +53,7 @@ func register() {
DomainRegister(WASTESORTING, speechOtherDomain)
DomainRegister(FOOD, speechOtherDomain)
DomainRegister(ASTRO_FORTUNE, astroFortuneDomain)
DomainRegister(ALMANAC, almanacDomain)
DomainRegister("", speechOtherDomain)
//
......
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