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

Upsertion endpoint #51

Closed
skks1212 opened this issue Apr 19, 2023 · 1 comment · Fixed by #58
Closed

Upsertion endpoint #51

skks1212 opened this issue Apr 19, 2023 · 1 comment · Fixed by #58
Assignees
Labels

Comments

@skks1212
Copy link
Member

skks1212 commented Apr 19, 2023

Currently we are upserting data through python manage.py upsert. Let us create an endpoint to upsert.

First, create a new Project model, that will contain title, description and user. Inherit from Base Model. Now create relevant serializers and viewset for CRUD operations.

Create a Document model. A Document belongs to a Project (many to one). It should contain title, description and file. Create relevant serializers and viewsets for CRUD. Make sure that the POST method accepts formdata. File cannot be updated, only title and description can.

the url should look like /projects/<project_id>/documents/<document_id>

Now once a file gets uploaded, perform the same upsert logic as present, but use the external_id of the Project as the namespace for Pinecone.

@siddnikh siddnikh self-assigned this Apr 19, 2023
@skks1212
Copy link
Member Author

@siddnikh what's the status on this?

@siddnikh siddnikh removed their assignment Apr 22, 2023
@ishanExtreme ishanExtreme self-assigned this Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants