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

RAG with OpenAI and Qdrant example is not up to date #23

Open
katopz opened this issue Dec 20, 2023 · 1 comment
Open

RAG with OpenAI and Qdrant example is not up to date #23

katopz opened this issue Dec 20, 2023 · 1 comment

Comments

@katopz
Copy link

katopz commented Dec 20, 2023

For an example https://github.com/qdrant/examples/blob/06fd19db652bcd9f88e35c8e178a114b5791e8c9/rag-openai-qdrant/rag-openai-qdrant.ipynb still use query_text.

image
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[9], [line 1](vscode-notebook-cell:?execution_count=9&line=1)
----> [1](vscode-notebook-cell:?execution_count=9&line=1) results = client.search(
      [2](vscode-notebook-cell:?execution_count=9&line=2)     collection_name="knowledge-base",
      [3](vscode-notebook-cell:?execution_count=9&line=3)     query_text=prompt,
      [4](vscode-notebook-cell:?execution_count=9&line=4)     limit=3,
      [5](vscode-notebook-cell:?execution_count=9&line=5) )
      [6](vscode-notebook-cell:?execution_count=9&line=6) results

TypeError: QdrantClient.search() missing 1 required positional argument: 'query_vector'

And document just use a random number for query_vector which not reflect real life use.

@katopz
Copy link
Author

katopz commented Dec 20, 2023

UPDATE: It seem like I can use client.query instead of client.search maybe this is a way to fix this?

results = client.query(
    collection_name="knowledge-base",
    query_text=prompt,
    limit=3,
)
results

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