Skip to content

Invalid tool call parsing in thinking token for hermes format in tool_parser.py in agent_loop from experiment folder. #4757

@chetandhembre

Description

@chetandhembre

Hello
in HermesToolParser class.. extract_tool_calls function does eliminate content from <think>..</think> tags for searching for tool call signature..
this lead to case where tool call syntax used in thinking tokens consider as valid tool call.
example (Formatting for readability purposes)

<think> 
this is just my reasoning.. let me call tool A 
<tool_call>{"name": "A", "arguments": {}}</tool_call> 
it will give me result which i will in my analysis
</think>
<tool_call>{"name": "A", "arguments": {}}</tool_call>

in above dummy example tool_call is used in side thinking token and out side also.. parser will consider this as two tool call..
I am wondering is it correct behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions