Find answers from the community

Home
Members
betermagne
b
betermagne
Offline, last seen 2 months ago
Joined September 25, 2024
does the agent class have support for all types of llms or only the openai ones? if so can it be extended to other llms in the future?
1 comment
L
https://pastebin.com/c5GhBHh1

can anyone help figure out this exception just using the context here
4 comments
b
L
is this interop between langchain and llama index and openai tools not possible?
2 comments
b
L

Plain Text
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
11 comments
k
b
Without all the generative fluff
2 comments
b
L