Gaunt Sloth Assistant
    Preparing search index...

    Function postModelHook

    • There's something off with calling server tools with ReAct agent, the tool is not added in react_agent_executor because it is not Runnable, but the tool_node explodes because LLM reports calling non-existing tool. This method removes tool calls from messages, leaving the resulting content. This method seems unnecessary with OpenAI, but is needed for Anthropic, OpenAI does not need a name on the tool and does not seem to return server_tool_use.

      Parameters

      • state: StateType<StateDefinition>

      Returns StateType<StateDefinition>