我是这个话题的新手,因此我只是尝试了这个脚本。然后它完美地工作。
但问题在于对话/上下文。
现在机器人只能完美地处理用户的最后一条消息。但它不知道较早的消息是什么,因此无法维持对话,因为我不知道如何以正确的方式检索上一个/最后一个消息。
我的机器人现在的行为(示例)
User: Hi, nice to meet you. Blah blah...
Bot: Sorry i don't understand you. Please key-in the Item Code to see details:
User: A1234
Bot: Item Details: xxx xxxx xxxxx xxxxx
Bot: Which "color" you want to order?
User: Blue
Bot: Sorry i don't understand you, Please key-in the Item Code to see details:
如您所见(在消息的最后部分),Bot 在用户的后续回复后丢失了上下文(对话)。无法链接到上一条消息。
请问如何解决这个问题?