Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
speech_nlu_parse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵文静
speech_nlu_parse
Commits
782c412e
Commit
782c412e
authored
May 19, 2025
by
赵文静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改兜底
parent
d957c603
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
service/speechNlu/domain.go
service/speechNlu/domain.go
+15
-5
No files found.
service/speechNlu/domain.go
View file @
782c412e
...
...
@@ -116,7 +116,7 @@ func calendarDomain(params *model.SpeechDomainParams) []byte {
"vender"
:
params
.
MidType
,
})
.
Error
(
"params.SpeechWsResp.Dm.Widget.Extra.Result不是数组类型"
)
if
res
.
ResponseText
!=
""
{
return
replyWithChat
(
res
.
ResponseText
,
"
doudi
"
)
return
replyWithChat
(
res
.
ResponseText
,
"
chat
"
)
}
return
replyWithChat
(
error_reply
,
"doudi"
)
}
...
...
@@ -200,7 +200,7 @@ func newsDomain(params *model.SpeechDomainParams) []byte {
"vender"
:
params
.
MidType
,
})
.
Error
(
"params.SpeechWsResp.Dm.Widget.Content不是数组类型"
)
if
res
.
ResponseText
!=
""
{
return
replyWithChat
(
res
.
ResponseText
,
"
doudi
"
)
return
replyWithChat
(
res
.
ResponseText
,
"
chat
"
)
}
return
replyWithChat
(
error_reply
,
"doudi"
)
}
...
...
@@ -254,6 +254,10 @@ func ancientpoemDomain(params *model.SpeechDomainParams) []byte {
})
res
.
Header
.
Semantic
.
SkillId
=
res
.
Header
.
Semantic
.
Domain
+
"."
+
res
.
Header
.
Semantic
.
Intent
return
Marshal
(
params
,
res
)
}
else
if
params
.
SpeechWsResp
.
Dm
.
IntentName
==
"查询诗句"
{
res
.
Header
.
Semantic
.
Intent
=
"search_ancientpoem_chains"
res
.
Header
.
Semantic
.
SkillId
=
res
.
Header
.
Semantic
.
Domain
+
"."
+
res
.
Header
.
Semantic
.
Intent
return
Marshal
(
params
,
res
)
}
res
.
ListItems
=
make
([]
map
[
string
]
interface
{},
0
)
...
...
@@ -266,6 +270,9 @@ func ancientpoemDomain(params *model.SpeechDomainParams) []byte {
"mid"
:
params
.
Mid
,
"vender"
:
params
.
MidType
,
})
.
Error
(
"params.SpeechWsResp.Dm.Widget.Content不是数组类型"
)
if
res
.
ResponseText
!=
""
{
return
replyWithChat
(
res
.
ResponseText
,
"chat"
)
}
return
replyWithChat
(
error_reply
,
"doudi"
)
}
else
{
for
_
,
item
:=
range
sliceData
{
...
...
@@ -337,6 +344,9 @@ func jokeDomain(params *model.SpeechDomainParams) []byte {
"mid"
:
params
.
Mid
,
"vender"
:
params
.
MidType
,
})
.
Error
(
"params.SpeechWsResp.Dm.Widget.Content不是数组类型"
)
if
res
.
ResponseText
!=
""
{
return
replyWithChat
(
res
.
ResponseText
,
"chat"
)
}
return
replyWithChat
(
error_reply
,
"doudi"
)
}
...
...
@@ -652,7 +662,7 @@ func fmDomain(params *model.SpeechDomainParams) []byte {
"vender"
:
params
.
MidType
,
})
.
Error
(
"params.SpeechWsResp.Dm.Widget.Content不是数组类型"
)
if
res
.
ResponseText
!=
""
{
return
replyWithChat
(
res
.
ResponseText
,
"
doudi
"
)
return
replyWithChat
(
res
.
ResponseText
,
"
chat
"
)
}
return
replyWithChat
(
error_reply
,
"doudi"
)
}
...
...
@@ -667,7 +677,7 @@ func fmDomain(params *model.SpeechDomainParams) []byte {
"mid"
:
params
.
Mid
,
"vender"
:
params
.
MidType
,
})
.
Errorf
(
"json.Unmarshal元素解析失败: %v"
,
err
)
return
replyWithChat
(
error_reply
,
"doudi"
)
return
replyWithChat
(
params
.
SpeechWsResp
.
Dm
.
Nlg
,
"doudi"
)
}
res
.
ListItems
=
append
(
res
.
ListItems
,
map
[
string
]
interface
{}{
"url"
:
con
.
LinkUrl
,
...
...
@@ -856,7 +866,7 @@ func sleepMusicDomain(params *model.SpeechDomainParams) []byte {
"vender"
:
params
.
MidType
,
})
.
Error
(
"params.SpeechWsResp.Dm.Widget.Content不是数组类型"
)
if
res
.
ResponseText
!=
""
{
return
replyWithChat
(
res
.
ResponseText
,
"
doudi
"
)
return
replyWithChat
(
res
.
ResponseText
,
"
chat
"
)
}
return
replyWithChat
(
error_reply
,
"doudi"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment