from langchain.chat_models import ChatOpenAI
from langchain.agents import initialize_agent
from langchain.chains.conversation.memory import ConversationBufferMemory
from llama_hub.file.unstructured.base import UnstructuredReader
from llama_index.tools import QueryEngineTool
from llama_index.agent import OpenAIAgent
...
agent_executor = initialize_agent(
[query_engine_tool.to_langchain_tool], llm, agent="conversational-react-description", memory=memory
)
Traceback (most recent call last):
File "D:\Documendz\code-python\LLM chat app\speechtt.py", line 74, in <module>
agent_executor = initialize_agent(
File "D:\Documendz\code-python\LLM chat app\aienv\lib\site-packages\langchain\agents\initialize.py", line 58, in initialize_agent
agent_obj = agent_cls.from_llm_and_tools(
File "D:\Documendz\code-python\LLM chat app\aienv\lib\site-packages\langchain\agents\conversational\base.py", line 107, in from_llm_and_tools
cls._validate_tools(tools)
File "D:\Documendz\code-python\LLM chat app\aienv\lib\site-packages\langchain\agents\conversational\base.py", line 89, in _validate_tools
validate_tools_single_input(cls.__name__, tools)
File "D:\Documendz\code-python\LLM chat app\aienv\lib\site-packages\langchain\agents\utils.py", line 9, in validate_tools_single_input
if not tool.is_single_input:
AttributeError: 'function' object has no attribute 'is_single_input'
why am i getting this error