From e5a42133339e47df7d77cdec8a8339df09861140 Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Fri, 21 Feb 2025 10:00:40 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=88=E6=96=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=89:=20fix=EF=BC=88=E4=BF=AE=E5=A4=8Dbug=EF=BC=89:=20docs?= =?UTF-8?q?=EF=BC=88=E6=96=87=E6=A1=A3=E5=8F=98=E6=9B=B4=EF=BC=89:=20refac?= =?UTF-8?q?tor=EF=BC=88=E9=87=8D=E6=9E=84=EF=BC=89:=20test(=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=B5=8B=E8=AF=95):=20=E6=9C=BA=E5=99=A8=E4=BA=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 代码回溯 --- app/service/chat_robot/script/service/CallQWen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/service/chat_robot/script/service/CallQWen.py b/app/service/chat_robot/script/service/CallQWen.py index 9e9f1a5..d2f28a0 100644 --- a/app/service/chat_robot/script/service/CallQWen.py +++ b/app/service/chat_robot/script/service/CallQWen.py @@ -283,7 +283,7 @@ def call_with_messages(message, gender): elif assistant_output.tool_calls[0]['function']['name'] == 'get_image_from_vector_db': content = json.loads(assistant_output.tool_calls[0]['function']['arguments']) tool_info = {"name": "get_image_from_vector_db", "role": "tool", - 'content': get_image_from_vector_db(gender, content['parameters']['content'])} + 'content': get_image_from_vector_db(gender, content['parameters']['content'] if "parameters" in content.keys() else content['content'])} flag = False result_content = tool_info['content'] response_type = "image"