更改提示服务器端

Change prompt server sided

我开始致力于 aog。我现在只使用 SDK 和 WebSimulator。我想要实现的是更改我之前设置的提示,例如因为我有可用的新信息。我尝试了以下但失败了:

let inputPrompt = assistant.buildInputPrompt(true, '<speak>1+1=3 Agree?</speak>',['I didn\'t hear a number', 'If you\'re still there, what\'s the number?', 'What is the number?']);
assistant.ask(inputPrompt);
let inputPrompt2 = assistant.buildInputPrompt(true, '<speak>Sorry! 1+1=2 Agree?</speak>',['I didn\'t hear a number', 'If you\'re still there, what\'s the number?', 'What is the number?']);
assistant.ask(inputPrompt2);

仅显示第一个提示,然后 - 仅在用户响应后 - 显示第二个提示。

是否可以更改提示服务器端?如何做呢?还是有解决方法?

assistant.ask()方法会向用户发送提示然后等待响应

如果您尝试向用户发送内容,然后在他们回复之前发送其他内容,您当前无法使用操作执行此操作。那更像是一个通知或异步操作。