Hello! When I'm trying to use an agent with QueryEngineTool to look for answer in the context, there is an exception and I see some inconsistence.
Despite the method is called "chat" for the agent, it doesn't accept engine created with "as_chat_engine" method:
query_engine = index.as_chat_engine(chat_mode='condense_plus_context',
similarity_top_k=similarity_top_k,
llm=llm_engine,
system_prompt=prepared_system_prompt)
query_tool = QueryEngineTool(
query_engine=query_engine,
metadata=ToolMetadata(
name="query_tool",
description=self.query_description,
),
)
tools.append(query_tool)
agent = OpenAIAgent.from_tools(
tools, llm=llm_engine,
verbose=True,
system_prompt=self.system_prompt
)
response = agent.chat(query_text, chat_history=chat_history) # <====== Exception
The exception is "Got output: Error: 'CondensePlusContextChatEngine' object has no attribute 'query'"