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: SmarterCamelCaseSerializer

A document of a vectorstore, without its content.

class smarter.apps.vectorstore.serializers.VectorstoreSerializer(*args, **kwargs)[source]

Bases: MetaDataWithOwnershipModelSerializer

A vectorstore, as the web console and the REST API show it.

Read only.

get_document_count(obj)[source]
Return type:

int

get_fields()[source]

Return the dict of field names -> field instances that should be used for self.fields when instantiating the serializer.

get_manifest_url(obj)[source]

The URL of the vectorstore’s detail view, which renders its manifest.

Return type:

str

get_snapshot_count(obj)[source]
Return type:

int

class smarter.apps.vectorstore.serializers.VectorstoreSnapshotSerializer(*args, **kwargs)[source]

Bases: SmarterCamelCaseSerializer

A Qdrant snapshot, or Pinecone backup, of a vectorstore.