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

Add push_documents method to Compass client for asynchronous document processing #15

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

javier-cohere
Copy link
Contributor

We added a new endpoint to Compass that allows to send file bytes for their parsing and indexing using barckground jobs in the server:

/v2/indexes/{index_name}/documents

This PR is to add a function to the SDK that allows to send files to that endpoint. Function parse_and_insert_doc gets a filename and opens the document, gets its bytes, generates a file id if necessary, and sends the bytes to Compass.

@javier-cohere javier-cohere requested a review from a team as a code owner September 12, 2024 14:56
Copy link

cla-assistant bot commented Sep 12, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

cla-assistant bot commented Sep 12, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


javier-cohere seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@javier-cohere javier-cohere reopened this Sep 12, 2024
@javier-cohere javier-cohere marked this pull request as draft September 12, 2024 15:49
@javier-cohere javier-cohere marked this pull request as ready for review September 13, 2024 15:38
ankush-cohere
ankush-cohere previously approved these changes Sep 19, 2024
Copy link
Contributor

@benrules3 benrules3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one nit on documentation - can you DM me when resolved and I'll approve? Approval has to be on most recent push... Then we should be good to merge.

compass_sdk/compass.py Show resolved Hide resolved
@artemiyatcohere artemiyatcohere force-pushed the javi/compass-batch-parsing branch from 3e0adf6 to 6fa245e Compare September 23, 2024 13:44
@artemiyatcohere artemiyatcohere changed the title Add function to send files for batch parsing in Compass Add push_documents method to Compass client for asynchronous document processing Sep 23, 2024
… processing

Introduced the `push_documents` method, allowing the Compass client to push a list of documents for asynchronous processing. Documents will be available for search once the processing is completed.
@artemiyatcohere artemiyatcohere force-pushed the javi/compass-batch-parsing branch from 6fa245e to 44bb632 Compare September 23, 2024 15:52
@artemiyatcohere artemiyatcohere merged commit 21c1690 into main Sep 23, 2024
4 checks passed
@artemiyatcohere artemiyatcohere deleted the javi/compass-batch-parsing branch September 23, 2024 15:56
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

Successfully merging this pull request may close these issues.

4 participants