RoboWaiter/robowaiter/scene/tasks/GQA.py

32 lines
1.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
具身多轮对话 GQA
点餐order的对话咖啡厅服务员可以为客人NPC完成点餐基本对话
场景对话GQA结合场景询问卫生间、附近娱乐场所数据来源自主定义
开始条件顾客NPC发出点餐指令
结束条件顾客NPC发出指令表示不再需要服务
"""
# todo: 使用大模型进行对话,获得指令信息,适时结束对话
# order = {...}
from robowaiter.scene.scene import Scene
class SceneGQA(Scene):
def __init__(self, robot):
super().__init__(robot)
def _reset(self):
self.add_walker(1085, 2630, 220)
self.control_walker([self.walker_control_generator(0, False, 100, 755, 1900, 180)])
def _run(self):
pass
def _step(self):
if int(self.time)% 5 == 0:
print("顾客说:请问你们这里有哪些咖啡")
self.chat_bubble('顾客说:请问你们这里有哪些咖啡')
self.state['chat_list'].append('请问你们这里有哪些咖啡')