Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken VectorStoreRouterAgent cannot use tool #1547

Closed
Arron-Clague opened this issue Mar 21, 2024 · 4 comments
Closed

Broken VectorStoreRouterAgent cannot use tool #1547

Arron-Clague opened this issue Mar 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Arron-Clague
Copy link

Arron-Clague commented Mar 21, 2024

I have three ChromaDB vector stores, each with its own VectorStoreInfo, Connected to a VectorStoreRouterTookit.

The VectorStoreRouterAgent cannot run the tool, even though it clearly defined :

Terminal output

Entering new AgentExecutor chain...
Sure! I'm ready to help you with your question.

Question: Which is the cheapest Kyocera printer?

Thought: To answer this question, I need to research the prices of different Kyocera printers.

Action: I will use the Kyocera tool to find the information.

Action Input: I will input the query "Kyocera printer prices" into the tool.

Observation: I will use the Kyocera tool to find the information. is not a valid tool, try one of [Kyocera, ricoh, xerox].

Copy link

dosubot bot commented Mar 21, 2024

Based on the context provided, it seems like the issue you're encountering is related to the VectorStoreRouterAgent not recognizing the Kyocera tool as a valid tool. However, from the information available in the langflow codebase, it's not clear how the VectorStoreRouterAgent handles the tools it's supposed to use, like the Kyocera tool.

The VectorStoreRouterAgent is implemented as a custom component named VectorStoreRouterAgentComponent and it uses the VectorStoreRouterToolkit for the vector store router functionality. The VectorStoreRouterToolkit is designed to route between different Vector Stores and it takes a list of VectorStoreInfo objects and a BaseLanguageModel object as inputs.

The error message you're seeing suggests that the Kyocera tool is not recognized as a valid tool. This could be due to a number of reasons, such as the Kyocera tool not being properly registered or configured in the system, or the VectorStoreRouterAgent not being able to access or use the Kyocera tool due to some internal logic or condition.

Unfortunately, without more information about how the Kyocera tool is implemented in the langflow codebase and how the VectorStoreRouterAgent handles the tools it's supposed to use, it's difficult to provide a definitive solution to your issue.

Could you provide more details about the Kyocera tool and how it's supposed to interact with the VectorStoreRouterAgent? Specifically, it would be helpful to know how the Kyocera tool is defined and registered in the system, and how the VectorStoreRouterAgent is supposed to use this tool. This information could help identify the cause of the issue and suggest potential solutions.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the bug Something isn't working label Mar 21, 2024
@Arron-Clague
Copy link
Author

in the terminal, the tool name is null for some reason.

@Arron-Clague
Copy link
Author

@dosu-bot in the terminal, the tool name is null for some reason :

<function VectorStoreRouterAgentComponent.build at
0x7f0d81134040>
-> <langflow.utils.validate.VectorStoreRouterAgentComponent object at 0x7f0d812a9090>
File "", line 19, in build
File
"/home/koni/.local/lib/python3.10/site-packages/langchain/agents/agent_toolkits/vectorstore/base.py",
line 81, in create_vectorstore_router_agent
tools = toolkit.get_tools()
-> [VectorStoreQATool(name='Kyocera', description='Useful for when you need to answer
questions about Kyocera. Whenever you need...

                         AttributeError: 'list' object has no attribute 'get_tools'

Copy link

dosubot bot commented Mar 21, 2024

Based on the error message you provided, it seems like the get_tools method is being called on a list object, which is causing an AttributeError. This is likely because the create_vectorstore_router_agent function in the langchain.agents module is expecting an instance of VectorStoreRouterToolkit as its second argument, but it's receiving a list instead.

The VectorStoreRouterAgentComponent's build method is responsible for calling create_vectorstore_router_agent, and it's supposed to pass an instance of VectorStoreRouterToolkit as the second argument. If a list is being passed instead, it suggests that there might be an issue with how the vectorstoreroutertoolkit is being provided or processed within the build method.

Unfortunately, without more information about the VectorStoreRouterToolkit class and the create_vectorstore_router_agent function, it's difficult to provide a more specific solution. It would be helpful to know the implementation of the get_tools method in the VectorStoreRouterToolkit class and what type of object it returns. Similarly, knowing the exact implementation of the create_vectorstore_router_agent function would also be beneficial.

If you have access to these details, could you please provide them? This would help in understanding why the get_tools method is being called on a list object and how to fix the issue. If you don't have this information, you might need to check the code where the vectorstoreroutertoolkit is being created or obtained, and ensure that it's an instance of VectorStoreRouterToolkit and not a list.

For more details, you can refer to the VectorStoreRouterAgentComponent in the langflow codebase.

I hope this helps! If you have any more questions or need further clarification, feel free to ask.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the stale label Jun 20, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2024
@dosubot dosubot bot removed the stale label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant