Find answers from the community

Updated 2 months ago

VectorIndexRetreiver

Hi, I have been using llamaindex for long time now. My code was working well and after updating llamaindex and openai, the same code have stopped working. I have fixed most of it by updating the code. But now when I am using vector store index as chat engine or query engine then I am getting unsupported protocol error : request url is missing. It works fine if I use vector store index as retriever. Can anyone help me fix this as I need it urgently. Thanks
S
W
6 comments
Have resolved the error but I am getting issue while using sub questions query engine, now the error is VectorIndexRetreiver object has no attribute query
Are you retrieving like this?
data = retriever.query()

Correct way would be:
data = retriever.retrieve()
No I am using sub questions query engine which is failing internally. I have used retriever.asQueryEngine() which is working when used directly but not through sub question query engine
Do you mind sharing the code?
Query Engines are working directly but not working when I am using sub question query engine. I cannot share code as it's being used for project work
Attachment
rn_image_picker_lib_temp_f03de8c4-0017-4671-aca7-85a9745e18b0.jpg
For some reason, Your retriever object is being passed and being used to do .query() whereas based on the requirement it should be a QueryEngine object.

see this line: https://github.com/run-llama/llama_index/blob/74e8e6660a19738403cd3a180494226454e22947/llama_index/query_engine/sub_question_query_engine.py#L249
Add a reply
Sign up and join the conversation on Discord