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

增加星座运势

parent 296dcdb6
Pipeline #5452 passed with stage
in 0 seconds
# 更新日志
## [0.0.1-beta.3] - 2025.6.19
### Changed
- 增加音乐兜底
- 增加星座运势
## [0.0.1-beta.3] - 2025.6.6-6.14
### Changed
- 更改为redis存储sessionId
......
......@@ -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":"谁是你爸",
"query":"r",
"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": {}
}
......@@ -57,7 +57,7 @@ Content-Type: application/json
},
"nluRet": {
"asr_recongize": "",
"text": "谁是你爸"
"text": "打开列表循环"
}
},
"version": "v0"
......@@ -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": {}
}
......
......@@ -15,6 +15,7 @@ require (
github.com/json-iterator/go v1.1.12
github.com/parnurzeal/gorequest v0.2.16
github.com/rabbitmq/amqp091-go v1.10.0
github.com/soheilhy/cmux v0.1.5
github.com/spf13/viper v1.16.0
github.com/tidwall/gjson v1.14.4
go.uber.org/zap v1.24.0
......@@ -60,7 +61,6 @@ require (
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/smartystreets/goconvey v1.8.0 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
......
......@@ -89,9 +89,10 @@ const (
CONVERT = "单位换算"
HOLIDAY = "节假日查询"
//SLEEPMUSIC = "声音博物馆"
RELATION = "亲戚关系计算"
WASTESORTING = "垃圾分类"
FOOD = "食物营养查询"
RELATION = "亲戚关系计算"
WASTESORTING = "垃圾分类"
FOOD = "食物营养查询"
ASTRO_FORTUNE = "星座运势"
SOUND = "sound"
ALMANAC = "almanac"
......
......@@ -1073,6 +1073,25 @@ func childMusicDomain(params *model.SpeechDomainParams) []byte {
return Marshal(params, res)
}
func astroFortuneDomain(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("astroFortuneDomain baseParse error.")
return replyWithChat(error_reply, "doudi")
}
res.Header.Semantic.Domain = "astro"
res.Header.Semantic.Intent = "search_fastfate"
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"
......
......@@ -52,6 +52,7 @@ func register() {
DomainRegister(RELATION, speechOtherDomain)
DomainRegister(WASTESORTING, speechOtherDomain)
DomainRegister(FOOD, speechOtherDomain)
DomainRegister(ASTRO_FORTUNE, astroFortuneDomain)
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