|
|
|
@ -57,19 +57,27 @@ streaming = true
|
|
|
|
|
```
|
|
|
|
|
## TestCase
|
|
|
|
|
参考[main.py](main.py)
|
|
|
|
|
1. 多轮对话
|
|
|
|
|
```python
|
|
|
|
|
dsr = ChatAgent()
|
|
|
|
|
dsr.multi_with_stream('你是什么模型', 1)
|
|
|
|
|
dsr.multi_with_stream('你能做什么', 1)
|
|
|
|
|
dsr.multi_with_stream('我的上一个问题是什么?请直接返回问题,不要有多余输出及思考过程', 1)
|
|
|
|
|
dsr.multi_with_stream('我的第一个问题是什么?请直接返回问题,不要有多余输出及思考过程', 1)
|
|
|
|
|
```
|
|
|
|
|
2. 多轮对话并调用工具
|
|
|
|
|
```python
|
|
|
|
|
dsr = ChatAgent()
|
|
|
|
|
dsr.multi_with_tool_call_stream('播放南卡口相机', 1)
|
|
|
|
|
dsr.multi_with_tool_call_stream('1', 1)
|
|
|
|
|
from llmagent.llm_agent import ChatAgent
|
|
|
|
|
|
|
|
|
|
dsr = ChatAgent()
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
# 1.参数提取
|
|
|
|
|
dsr.multi_with_tool_call_stream('播放北卡口入境1号道录像,从今天凌晨1点到2点', 1)
|
|
|
|
|
# dsr.multi_with_tool_call_stream('查看成都天府k00航班2004年1月1日入境预报航班人员明细', 1)
|
|
|
|
|
# 2.参数修正
|
|
|
|
|
# dsr.multi_with_tool_call_stream('将大屏切换为-1分屏', 1)
|
|
|
|
|
|
|
|
|
|
# 3.多轮对话(只有对话)
|
|
|
|
|
# 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('播放南卡口相机', 2)
|
|
|
|
|
# dsr.multi_with_tool_call_stream('1', 2)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## TODO
|
|
|
|
|