sunnysavita10 / Automated-MCQ-Generator-Using-Langchain-OpenAI-API

35 stars 63 forks source link

Getting error with as_retriever() function #6

Closed heena60034117 closed 1 month ago

heena60034117 commented 1 month ago

I am able to execute the similar search with updated code: query_results1 = index.query( namespace="real", vector=search_query, top_k=3, include_values=True )

but on "query_results1.as_retriever()" I am getting error TypeError: 'NoneType' object is not callable.

I had checked if query_results1 is None. But I am getting data inside query_results1 in vector format: {'matches': [{'id': '702', 'score': 0.868104219, 'values': [-0.0101173585, 0.00764723448, Screenshot 2024-05-26 145545

                     -0.00121222192,
                     -0.00441915402,
                     -0.00418567657,
                     0.00526170339,
                     -0.0270969253, .....
                     0.00939473696,
                     -0.0136890961]}],

'namespace': 'real', 'usage': {'read_units': 6}}

Kindly guide here what wrong I am doing?

heena60034117 commented 1 month ago

Hello Fox's,

I resolved this issue, you can find the working code on below URL: https://github.com/heena60034117/Q-A-App-with-Pinecone-VectorDb-Langchain

Thanks 👍