如何将控制权交给另一个 amazon Lex 机器人来回答之前 lex 机器人的对话?
How to give control to another amazon Lex bot to answer the conversation from a previous lex bot?
我希望能够将一个 lex bot 的控制权交给另一个。他们将成为某些工作的专门聊天机器人。我希望能够在服务需求完成后切换机器人。
基本上你需要有一个 program/code/lambda-function 来处理检查正在进行的进程以及接下来要调用哪个机器人的过程。
您可以保留所有必需的信息,并使用该信息决定调用哪个机器人。
下面是调用 Lex bot 的代码:
response = client.post_text(
botName='name_of_bot_you_want_to_call',
botAlias='alias_of_that_bot',
userId='string',
sessionAttributes={
'string': 'string',
'string': 'string;,
},
requestAttributes={
'string': 'string'
},
inputText='text_query_you_want_to_pass'
)
希望对您有所帮助。
我希望能够将一个 lex bot 的控制权交给另一个。他们将成为某些工作的专门聊天机器人。我希望能够在服务需求完成后切换机器人。
基本上你需要有一个 program/code/lambda-function 来处理检查正在进行的进程以及接下来要调用哪个机器人的过程。
您可以保留所有必需的信息,并使用该信息决定调用哪个机器人。
下面是调用 Lex bot 的代码:
response = client.post_text(
botName='name_of_bot_you_want_to_call',
botAlias='alias_of_that_bot',
userId='string',
sessionAttributes={
'string': 'string',
'string': 'string;,
},
requestAttributes={
'string': 'string'
},
inputText='text_query_you_want_to_pass'
)
希望对您有所帮助。