Document Models
DocumentInsert
Used to create or update documents:DocumentResponse
Returned when retrieving documents:Document Methods
create()
Create a new document:get_all()
Retrieve all documents:get_one()
Get a specific document by database ID:update()
Update an existing document:delete()
Delete a document:embed()
Embed an existing document:create_from_ess()
Create a document from an existing ESS entry:create_from_sequence()
Create a document from an existing sequence:Complete Example
Document Status
Documents have a status field that indicates their processing state:- Status changes based on embedding and processing operations
- Check the status to determine if a document is ready for retrieval
- Use the
embedparameter during creation for automatic embedding
Use Cases
- Knowledge base - Store documentation and reference material
- RAG (Retrieval Augmented Generation) - Enable semantic search over documents
- Context storage - Store contextual information for sequences and ESS
- Audit trails - Document state changes and events