mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-03 08:15:53 +00:00
fix(tools): strip <think> blocks from message tool content (#2621)
This commit is contained in:
parent
c41ab9e52e
commit
9a468ab69b
@ -84,6 +84,9 @@ class MessageTool(Tool):
|
|||||||
media: list[str] | None = None,
|
media: list[str] | None = None,
|
||||||
**kwargs: Any
|
**kwargs: Any
|
||||||
) -> str:
|
) -> str:
|
||||||
|
from nanobot.utils.helpers import strip_think
|
||||||
|
content = strip_think(content)
|
||||||
|
|
||||||
channel = channel or self._default_channel
|
channel = channel or self._default_channel
|
||||||
chat_id = chat_id or self._default_chat_id
|
chat_id = chat_id or self._default_chat_id
|
||||||
message_id = message_id or self._default_message_id
|
message_id = message_id or self._default_message_id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user