Find answers from the community

Updated 10 months ago

llama_index/llama_index/agent/react/outp...

Hello, I'm getting an intermittent exception raised by /agent/react/step.py for this message_content: Thought: blah blah.
it seems to be raised by https://github.com/run-llama/llama_index/blob/main/llama_index/agent/react/output_parser.py#L101 because it doesn't enter any of the if cases. any idea how we can handle the case when message_content contains Thought:?
s
L
3 comments
@Logan M it works fine if the Thought message is something like "I need to use a tool..." but if the Thought message is something like "I need to provide a definition for <question asked>" then it exits from the exception. Is there a way for the agent to just return the response in that case instead of exiting?
I don't think there is a way to do that currently. But if you are up for it, I'm always willing to review/merge community PRs ❤️
Thank you for always being responsive to questions! Really appreciate it!
Add a reply
Sign up and join the conversation on Discord