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

Issues in examples (notebook 2) usage of langchain and qdrant use #8

Open
pmanlukas opened this issue Nov 26, 2023 · 0 comments
Open

Comments

@pmanlukas
Copy link

Hi, when I did the Notebook 2 (search) of the bootcamp I ran into several errors that seem to come from API changes in the used python packages of langchain and qdrant.

langchain issues:

Screenshot 2023-11-26 at 16 35 40

When trying the proposed cells that show how to do the embeddings with langchain, I receive an value error. The solution has the same cells. When I reviewed the current langchain documentation of Embeddings with Luminous, there appears to be a parameter missing in the AlephAlphaSymmetricSemanticEmbedding() constructor.

Changing it to AlephAlphaSymmetricSemanticEmbedding(normalize=True, compress_to_size=128) fixes the issue

Qdrant issues:

Screenshot 2023-11-26 at 16 43 58

When I wanted to run the cell at step 5 (search and answer) I also had a similar issue, getting an error. The filter and top parameters seem not to exist for the qdrant client any more, as the interface has changed (limit instead of top).

Changing the code for the search query from:

search_result = q_client.search(
        collection_name="test_collection",
        query_vector=embedded_question,
        filter=None,
        top=1,
    )


to:

search_result = q_client.search(
        collection_name="test_collection",
        query_vector=embedded_question,
        limit=1
    )

Solved the issue for me.

I guess there will be more sections of the bootcamp affected by these changes and would recommend to either lock in the notebooks to a certain version of the used dependencies or to update the code accordingly.

@MarkusSchmitz FYI, I would do the PR but would rather suggest you to decide for a stable version of the dependencies used

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