feat(新功能):
fix(修复bug): docs(文档变更): refactor(重构): test(增加测试): 机器人数据库搜索功能测试 代码回溯
This commit is contained in:
@@ -283,7 +283,7 @@ def call_with_messages(message, gender):
|
|||||||
elif assistant_output.tool_calls[0]['function']['name'] == 'get_image_from_vector_db':
|
elif assistant_output.tool_calls[0]['function']['name'] == 'get_image_from_vector_db':
|
||||||
content = json.loads(assistant_output.tool_calls[0]['function']['arguments'])
|
content = json.loads(assistant_output.tool_calls[0]['function']['arguments'])
|
||||||
tool_info = {"name": "get_image_from_vector_db", "role": "tool",
|
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
|
flag = False
|
||||||
result_content = tool_info['content']
|
result_content = tool_info['content']
|
||||||
response_type = "image"
|
response_type = "image"
|
||||||
|
|||||||
Reference in New Issue
Block a user