agentscope-ai / agentscope-ai/agentscope

[Bug]: WARNING | _dashscope_formatter:_format:373 - Unsupported block type thinking in the message, skipped.

未關閉
#1,067 9 則留言 0 個 reaction 已指派 1 人 已被 @qbc2016 認領 在 GitHub 檢視
主要語言
Python
星號
31.5k
分支
3.5k
平均合併
1 天 23 小時
30 天內合併 PR
95

描述

**AgentScope is an open-source project. To involve a broader community, we recommend asking your questions in English.**

**Describe the bug**
流式打印思考模式的ReActAgent时,报Unsupported block type thinking in the message, skipped.,导致当前thinking输出被中断,last提前为true。

**To Reproduce**
Steps to reproduce the behavior:

1.新创建一个ReActAgent,带思考模式,有个当前系统时间的工具,
2.采用stream_printing_messages函数进行流式打印的时候
3.注册工具:toolkit.register_tool_function(cur_datetime)
def cur_datetime():
"""{当前系统时间函数}"""
return ToolResponse(content=[TextBlock(type="text", text=f"当前时间:{datetime.now().strftime('%Y-%m-%d %H:%M:%S')},地理位置:中国",),],)

**Expected behavior**
当前thinking输出被中断,last提前为true。之后输出一次新的thinking过程并完整打印思考过程。

**Error messages**
Detailed error messages.

**Environment (please complete the following information):**

- AgentScope Version: [1.0.9]
- Python Version: [3.9]
- OS: [windows]

**Additional context**
Add any other context about the problem here.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。