mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-05 17:08:33 +00:00
chore: tighten malformed tool-call guard wording
This commit is contained in:
parent
8248d075db
commit
7dc45ff94e
@ -952,7 +952,7 @@ class AgentRunner:
|
|||||||
retry_messages = list(messages)
|
retry_messages = list(messages)
|
||||||
note = (
|
note = (
|
||||||
"The previous model response attempted to call tools, but every tool call "
|
"The previous model response attempted to call tools, but every tool call "
|
||||||
"was malformed: the tool_use blocks had missing/non-string name, id, or input. "
|
"was malformed: the tool_use blocks had missing or non-string tool names. "
|
||||||
"Do not answer with a promise to use tools. Either call the required tools again "
|
"Do not answer with a promise to use tools. Either call the required tools again "
|
||||||
"using valid tool names from the provided tool list and JSON object inputs, or give "
|
"using valid tool names from the provided tool list and JSON object inputs, or give "
|
||||||
"a final answer only if no tool is required."
|
"a final answer only if no tool is required."
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"""Tests for tool hint formatting (nanobot.utils.tool_hints)."""
|
"""Tests for tool hint formatting (nanobot.utils.tool_hints)."""
|
||||||
|
|
||||||
from nanobot.utils.tool_hints import format_tool_hints
|
|
||||||
from nanobot.providers.base import ToolCallRequest
|
from nanobot.providers.base import ToolCallRequest
|
||||||
|
from nanobot.utils.tool_hints import format_tool_hints
|
||||||
|
|
||||||
|
|
||||||
def _tc(name: str, args) -> ToolCallRequest:
|
def _tc(name: str, args) -> ToolCallRequest:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user