Find answers from the community

n
nana
Offline, last seen 3 months ago
Joined September 25, 2024
Hi, I have agent_response = agent.chat(question). Does anyone know why there are differences between agent_response.response and agent_response.sources[0].content? Is agent_response.sources[0].content the agent's output after using the tools given whereas agent_response.response is the agent's output without restricting its reasoning to the tools?
2 comments
n
L
Why am I getting AttributeError: 'str' object has no attribute 'chat' after agent.chat("A question") ? If I do print(type(agent)) I get 'llama_index.agent.react.base.ReActAgent' . I am following this https://gpt-index.readthedocs.io/en/latest/core_modules/agent_modules/agents/usage_pattern.html#query-engine-tools (with my data).
6 comments
n
L
e