|
2024-07-02 10:13:31,961 - split_query.py - 82 - INFO - Extracted info from query: {"information": ["一只东北虎
2024-07-02 10:13:33,892 - memory.py - 113 - INFO - {"keywords_zh": ["东北虎", "一只"], "keywords_en": ["Siberian tiger", "one"], "text": "一只东北虎"}
2024-07-02 10:13:33,893 - simple_doc_parser.py - 326 - INFO - Start parsing showImage.docx...
2024-07-02 10:13:33,933 - simple_doc_parser.py - 365 - INFO - Finished parsing showImage.docx. Time spent: 0.03966975212097168 seconds.
2024-07-02 10:13:33,934 - doc_parser.py - 114 - INFO - Start chunking showImage.docx (showImage.docx)...
2024-07-02 10:13:33,934 - doc_parser.py - 132 - INFO - Finished chunking showImage.docx (showImage.docx). Time spent: 5.602836608886719e-05 seconds.
2024-07-02 10:13:33,935 - base_search.py - 55 - INFO - all tokens: 222
2024-07-02 10:13:33,936 - base_search.py - 58 - INFO - use full ref
机器人响应:
[ { 'content': '',
'function_call': {'arguments': '', 'name': 'my_image_gen'},
'role': 'assistant'}]
机器人响应:
[ { 'content': '',
'function_call': {'arguments': '{"prompt":"一只', 'name': 'my_image_gen'},
'role': 'assistant'}]
机器人响应:
[ { 'content': '',
'function_call': { 'arguments': '{"prompt":"一只东北虎"}',
'name': 'my_image_gen'},
'role': 'assistant'}]
。。。。。。
机器人响应:
[ { 'content': '',
'function_call': { 'arguments': '{"prompt":"一只东北虎"}',
'name': 'my_image_gen'},
'role': 'assistant'},
{ 'content': '{image_url: '
'"https://image.pollinations.ai/prompt/%E4%B8%80%E5%8F%AA%E4%B8%9C%E5%8C%97%E8%99%8E"}',
'name': 'my_image_gen',
'role': 'function'},
{ 'content': '',
'function_call': { 'arguments': '```py\n'
'import requests\n'
'from PIL import Image\n'
'import matplotlib.pyplot as plt\n'
'import io\n'
'\n'
'# 获取图像URL\n'
'image_url = '
'"https://image.pollinations.ai/prompt/%E4%B8%80%E5%8F%AA%E4%B8%9C%E5%8C%97%E8%99%8E"\n'
'\n'
'# 发送 GET 请求下载图片\n'
'response = requests.get(image_url)\n'
'\n'
'# 确保请求成功\n'
'if response.status_code == 200:\n'
' # 使用 BytesIO 来创建一个可读的字节流\n'
' image_stream = '
'io.BytesIO(response.content)\n'
' # 打开图片\n'
' image = Image.open(image_stream)\n'
' # 显示图像\n'
' plt.imshow(image)\n'
" plt.axis('off') # 关闭坐标轴显示\n"
' plt.show()\n'
'else:\n'
' print(f"Failed to download image, '
'status code: {response.status_code}")\n'
'```',
'name': 'code_interpreter'},
'role': 'assistant'},
{ 'content': '',
'name': 'code_interpreter',
'role': 'function'},
{'content': '上图是一只东北虎的图像。', 'role': 'assistant'}]
|