You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 containtitle
,description
andfile
. Create relevant serializers and viewsets for CRUD. Make sure that thePOST
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.The text was updated successfully, but these errors were encountered: