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

Error: string indices must be integers, not 'str' When agent attempts to use LlamaIndexTool.from_query_engine #97

Open
CaelanAlonge opened this issue Aug 29, 2024 · 1 comment

Comments

@CaelanAlonge
Copy link

    # Attempt to initialize query_tool
    query_tool = LlamaIndexTool.from_query_engine(
        query_engine,
        name="Knowledge Graph Tool",
        description="Use this tool to answer the user query.",
    )
    
    chatAgent = Agent(
     ... other config ...
      tools=[query_tool]
)

2024-08-29T13:32:02.389-04:00
Action: Knowledge Graph Tool

2024-08-29T13:32:03.132-04:00
Action Input: {"query": "bhp343"}�

2024-08-29T13:32:03.132-04:00
I encountered an error while trying to use the tool. This was the error: string indices must be integers, not 'str'.

The agent works correctly without setting the tool. When i add the tool list to the agent config with the llamaindex tool it gives this error and does not use the tool.

@CaelanAlonge
Copy link
Author

llama-index==0.10.58
crewai==0.41.1
crewai_tools==0.4.26
langchain_aws==0.1.13

I rolled back crewai, crewai_tools, langchain_aws, and llama-index a few versions and was able to get the tool to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant