【发布时间】:2018-08-11 06:29:10
【问题描述】:
如何将我的 Google Action 语言链接到我的 Dialogflow 语言?
我的 Google Action 未通过认证,因为我的法语 Google Action 正在调用我的英语 Dialogflow。我认为 Dialogflow 足够聪明,可以从我的请求的 json 中读取 "locale": "fr-FR",并将请求路由到我的 Dialogflow 的法语版本,但显然不是因为它响应的是英语版本。
有没有办法将我的 Google Action 中的每种语言与 Dialogflow 中的对应语言进行映射?
这是我使用模拟器看到的:
请求:
{
"user": {
"user_id": "blah",
"access_token": "blahblah",
"permissions": [],
"locale": "fr-FR",
"last_seen": {
"seconds": 1519777910
},
"package_entitlements": []
},
"conversation": {
"conversation_id": "1519777935448",
"type": 1
},
"inputs": [
{
"intent": "assistant.intent.action.MAIN",
"raw_inputs": [
{
"input_type": 2,
"query": "Parler avec Déclencher CMD",
"annotation_sets": []
}
],
"arguments": []
}
],
"surface": {
"capabilities": [
{
"name": "actions.capability.SCREEN_OUTPUT"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.WEB_BROWSER"
},
{
"name": "actions.capability.MEDIA_RESPONSE_AUDIO"
}
]
},
"is_in_sandbox": true,
"available_surfaces": [
{
"capabilities": [
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
}
]
}
]
}
回复:
{
"response_metadata": {
"status": {},
"query_match_info": {
"query_matched": true,
"intent": "Default Welcome Intent"
}
},
"conversation_token": "[]",
"expect_user_response": true,
"expected_inputs": [
{
"input_prompt": {
"rich_initial_prompt": {
"items": [
{
"simple_response": {
"text_to_speech": "Say something like, run calculator on laptop."
}
}
]
},
"no_match_prompts": [],
"no_input_prompts": []
},
"possible_intents": [
{
"intent": "assistant.intent.action.TEXT"
}
]
}
]
}
【问题讨论】:
-
您是否使用服务器进行回复?
标签: actions-on-google dialogflow-es google-home google-assistant-sdk