|
|
|
@ -11,6 +11,17 @@ from llmagent.llm_agent import ChatAgent
|
|
|
|
|
dsr = ChatAgent()
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
########## 测试 多轮对话 #########
|
|
|
|
|
dsr.multi_with_stream('你是什么模型', 1)
|
|
|
|
|
dsr.multi_with_stream('你能做什么', 1)
|
|
|
|
|
dsr.multi_with_stream('我的上一个问题是什么?请直接返回问题,不要有多余输出及思考过程', 1)
|
|
|
|
|
dsr.multi_with_stream('我的第一个问题是什么?请直接返回问题,不要有多余输出及思考过程', 1)
|
|
|
|
|
|
|
|
|
|
########## 测试 多轮对话-相机选择 #########
|
|
|
|
|
dsr.multi_with_tool_call_stream('播放南卡口相机', 1)
|
|
|
|
|
dsr.multi_with_tool_call_stream('1', 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# print(dsr.invoke_with_tool_call('今天昆明天怎么样'))
|
|
|
|
|
########## 测试 function call #########
|
|
|
|
|
# print(dsr.invoke_with_tool_call('播放南卡口相机'))
|
|
|
|
@ -33,12 +44,3 @@ if __name__ == '__main__':
|
|
|
|
|
# print(dsr.invoke_with_tool_call('查看成都天府k00航班2004年1月1日入境预报航班人员明细'))
|
|
|
|
|
## [{'name': 'view_flight_details', 'args': {'airport_name': '成都天府机场', 'flight_code': 'K00', 'flight_date': '2004-01-01', 'ie_type': '入境'}, 'id': 'call_igummeorjq4r2pqjyr9tq6xq', 'type': 'tool_call'}]
|
|
|
|
|
|
|
|
|
|
########## 测试 多轮对话 #########
|
|
|
|
|
# dsr.multi_with_stream('你是什么模型', 1)
|
|
|
|
|
# dsr.multi_with_stream('你能做什么', 1)
|
|
|
|
|
# dsr.multi_with_stream('我的上一个问题是什么?请直接返回问题,不要有多余输出及思考过程', 1)
|
|
|
|
|
# dsr.multi_with_stream('我的第一个问题是什么?请直接返回问题,不要有多余输出及思考过程', 1)
|
|
|
|
|
|
|
|
|
|
########## 测试 多轮对话-相机选择 #########
|
|
|
|
|
dsr.multi_with_tool_call_stream('播放南卡口相机', 1)
|
|
|
|
|
dsr.multi_with_tool_call_stream('1', 1)
|
|
|
|
|