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

Converting add_texts_and_embeddings to async #778

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ThomasRochefortB
Copy link

This PR converts the VectorStore.add_texts_and_embeddings functions to async as discussed in #776

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request labels Dec 23, 2024
@jamesbraza
Copy link
Collaborator

Thanks for doing this @ThomasRochefortB, I triggered CI for this. Please forgive us for the bad contributor experience at the moment

That being said, locally testing your code I still get this error:

paperqa/docs.py: note: In member "_build_texts_index" of class "Docs":
paperqa/docs.py:519:9: error: Value of type "Coroutine[Any, Any, None]" must be
used  [unused-coroutine]
            self.texts_index.add_texts_and_embeddings(texts)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
paperqa/docs.py:519:9: note: Are you missing an await?

Can you add an await there in Docs._build_texts_index?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants