Skip to content
Discussion options

You must be logged in to vote

To resolve the AttributeError: 'RecursiveRetriever' object has no attribute 'query' error, you need to ensure that the RecursiveRetriever is correctly wrapped in a QueryEngineTool before being passed to the RouterQueryEngine. The RouterQueryEngine expects a sequence of QueryEngineTool objects, which have a query method.

Here's an example of how you can wrap your RecursiveRetriever in a QueryEngineTool and use it with the RouterQueryEngine:

import os
import pandas as pd
from llama_index.core import VectorStoreIndex, Settings
from llama_index.experimental.query_engine import PandasQueryEngine
from llama_index.core.schema import IndexNode
from llama_index.llms.openai import OpenAI, OpenAIEm…

Replies: 6 comments 19 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@dosubot
Comment options

@mraguth
Comment options

@dosubot
Comment options

Comment options

You must be logged in to vote
13 replies
@dosubot
Comment options

@mraguth
Comment options

@dosubot
Comment options

@mraguth
Comment options

@dosubot
Comment options

Comment options

You must be logged in to vote
3 replies
@dosubot
Comment options

Answer selected by mraguth
@FaizanRafique2303005KHIDEG
Comment options

@dosubot
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants