Vectorstore Serializers
Serializers of the vectorstore app.
Field names are camelCase in JSON. Related objects are given by name, and a Secret’s value is never serialized.
- class smarter.apps.vectorstore.serializers.VectorstoreDocumentSerializer(*args, **kwargs)[source]
Bases:
SmarterCamelCaseSerializerA document of a vectorstore, without its content.
- class smarter.apps.vectorstore.serializers.VectorstoreSerializer(*args, **kwargs)[source]
Bases:
MetaDataWithOwnershipModelSerializerA vectorstore, as the web console and the REST API show it.
Read only.
- get_document_count(obj)[source]
Return the number of the vectorstore’s documents.
- Parameters:
obj (
VectorstoreMeta) – The vectorstore.- Return type:
- get_manifest_url(obj)[source]
The URL of the vectorstore’s detail view, which renders its manifest.
- Return type:
- get_snapshot_count(obj)[source]
Return the number of the vectorstore’s snapshots.
- Parameters:
obj (
VectorstoreMeta) – The vectorstore.- Return type:
- class smarter.apps.vectorstore.serializers.VectorstoreSnapshotSerializer(*args, **kwargs)[source]
Bases:
SmarterCamelCaseSerializerA Qdrant snapshot, or Pinecone backup, of a vectorstore.