SAMVectorstore

smarter.models.sam.vectorstore

SAM model of the Vectorstore kind, generated from the Smarter platform’s JSON Schema.

Do not edit: run scripts/generate_sam_models.py. See smarter.models.sam.

class smarter.models.sam.vectorstore.SAMDependency

Bases: smarter.models.sam.base.SAMModel

A resource that depends on the resource that a manifest describes.

kind: str

Kind[String]: The SAM kind of the resource that depends on this resource, e.g. LLMClient.

Read only.

name: str

Name[String]: The name of the resource that depends on this resource.

Read only.

class smarter.models.sam.vectorstore.SAMVectorstoreEmbeddings

Bases: smarter.models.sam.base.SAMModel

Vectorstore.spec.embeddings: how documents and queries are turned into vectors.

batchSize: Optional

Vectorstore.__init__.embeddings.batchSize: chunks per embeddings request and upsert.

chunkOverlap: Optional

Vectorstore.__init__.embeddings.chunkOverlap: characters shared by consecutive chunks.

chunkSize: Optional

Vectorstore.__init__.embeddings.chunkSize: characters per chunk.

dimensions: Optional

Vectorstore.__init__.embeddings.dimensions: ask the model for vectors of this size, if it supports it, e.g. text-embedding-3.

It must equal index.dimension.

model: str

Vectorstore.__init__.embeddings.model: the embeddings model, e.g. text-embedding-3-small.

provider: str

Vectorstore.__init__.embeddings.provider: a Provider with an OpenAI-compatible embeddings API, e.g. openai.

class smarter.models.sam.vectorstore.Metric

Bases: enum.Enum

Vectorstore.__init__.index.metric: the distance metric.

class smarter.models.sam.vectorstore.SAMVectorstoreIndex

Bases: smarter.models.sam.base.SAMModel

Vectorstore.spec.index: the index (Pinecone), or collection (Qdrant), of the database.

deletionProtection: bool | None

Vectorstore.__init__.index.deletionProtection: refuse to destroy the database.

dimension: int

Vectorstore.__init__.index.dimension: of the embeddings model’s vectors.

metric: smarter.models.sam.vectorstore.Metric | None

Vectorstore.__init__.index.metric: the distance metric.

name: Optional

Vectorstore.__init__.index.name: the index or collection’s name, in lowercase letters, digits and hyphens.

Defaults to the manifest’s name, with the account number for a managed service.

class smarter.models.sam.vectorstore.SAMVectorstoreMaintenance

Bases: smarter.models.sam.base.SAMModel

Vectorstore.spec.maintenance: what Celery Beat does, besides checking its status.

snapshotIntervalHours: Optional

Vectorstore.__init__.maintenance.snapshotIntervalHours: how often.

snapshotRetention: Optional

Vectorstore.__init__.maintenance.snapshotRetention: how many are kept.

Older ones are deleted.

snapshots: bool | None

Vectorstore.__init__.maintenance.snapshots: take Qdrant snapshots, or Pinecone backups.

class smarter.models.sam.vectorstore.SAMVectorstoreMetadata

Bases: smarter.models.sam.base.SAMModel

Smarter API Vectorstore Manifest - Metadata class.

annotations: None | list[dict[str, str | int | float | bool | datetime.date | datetime.datetime | Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern='^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$')] | uuid.UUID | bytes | list | dict[str, Any]]]

The manifest annotations.

Used for storing arbitrary metadata as

key-value pairs. Example: [{‘smarter.sh/test-manifest/project-name’: ‘Scooby dooby do’}]. The key should be a valid url-friendly string. The value accepts multi-line string values (YAML block scalars) and various scalar types including str, int, float, bool, datetime.date, datetime.datetime, decimal.Decimal, uuid.UUID, bytes, list, dict.

description: str | None

The description for this resource.

Be brief. Keep it under 255 characters.

name: str

The camelCase name of the manifest resource.

tags: list[str] | None

The tags of the manifest.

Used for generic resource categorization and search. Example: [‘tag1’, ‘tag2’]

version: str | None

The semantic version of the manifest.

Example: 0.1.0

class smarter.models.sam.vectorstore.Cloud

Bases: enum.Enum

Vectorstore.__init__.pinecone.cloud.

class smarter.models.sam.vectorstore.SAMVectorstorePinecone

Bases: smarter.models.sam.base.SAMModel

Vectorstore.spec.pinecone: where Pinecone runs a serverless index.

cloud: smarter.models.sam.vectorstore.Cloud | None

Vectorstore.__init__.pinecone.cloud.

region: Optional

Vectorstore.__init__.pinecone.region.

class smarter.models.sam.vectorstore.SAMVectorstoreSelfHosted

Bases: smarter.models.sam.base.SAMModel

Vectorstore.spec.selfHosted: the Qdrant server that Smarter runs on Kubernetes.

cpu: str | None

Vectorstore.__init__.selfHosted.cpu: requested, e.g. 500m.

image: str | None

Vectorstore.__init__.selfHosted.image: the Qdrant image.

memory: str | None

Vectorstore.__init__.selfHosted.memory: requested, e.g. 1Gi.

storage: str | None

Vectorstore.__init__.selfHosted.storage: the size of its volume, e.g. 10Gi.

storageClass: str | None

Vectorstore.__init__.selfHosted.storageClass: of its volume.

Defaults to the cluster’s.

class smarter.models.sam.vectorstore.Backend

Bases: enum.Enum

Vectorstore.__init__.backend: qdrant or pinecone.

class smarter.models.sam.vectorstore.Hosting

Bases: enum.Enum

Vectorstore.__init__.hosting: self_hosted, run by Smarter on Kubernetes (qdrant only), or managed, a service reached through the ApiConnection in connection.

class smarter.models.sam.vectorstore.SAMVectorstoreSpec

Bases: smarter.models.sam.base.SAMModel

Smarter API Vectorstore Manifest Vectorstore.spec.

backend: Backend

Vectorstore.__init__.backend: qdrant or pinecone.

connection: str | None

Vectorstore.__init__.connection: managed only.

The name of an ApiConnection with the service’s URL and API key Secret, e.g. https://api.pinecone.io, or a Qdrant Cloud cluster’s URL.

embeddings: SAMVectorstoreEmbeddings

Vectorstore.__init__.embeddings.

hosting: smarter.models.sam.vectorstore.Hosting | None

Vectorstore.__init__.hosting: self_hosted, run by Smarter on Kubernetes (qdrant only), or managed, a service reached through the ApiConnection in connection.

index: SAMVectorstoreIndex

Vectorstore.__init__.index.

isActive: bool | None

Vectorstore.__init__.isActive: whether it may be used.

maintenance: smarter.models.sam.vectorstore.SAMVectorstoreMaintenance | None

Vectorstore.__init__.maintenance.

pinecone: smarter.models.sam.vectorstore.SAMVectorstorePinecone | None

Vectorstore.__init__.pinecone: pinecone only.

selfHosted: smarter.models.sam.vectorstore.SAMVectorstoreSelfHosted | None

Vectorstore.__init__.selfHosted: self_hosted only.

class smarter.models.sam.vectorstore.SAMVectorstoreStatus

Bases: smarter.models.sam.base.SAMModel

Smarter API Vectorstore Manifest - Status class.

Read only.

accountNumber: str

Vectorstore.status.accountNumber: the owner’s account.

Read only.

apiKeySecret: str | None

Vectorstore.status.apiKeySecret: the Secret with a self-hosted database’s API key.

created: datetime

The date in which this resource was created.

Read only.

dependencies: list[smarter.models.sam.vectorstore.SAMDependency] | None

Dependencies[List]: The resources that depend on this resource, and that must be deleted, or stop referring to it, before it can be deleted.

Lists only the resources that you can read. Read only.

deployedAt: datetime.datetime | None
documentCount: int | None

Vectorstore.status.documentCount: its documents.

endpoint: str | None

Vectorstore.status.endpoint: where it is reached.

indexName: str | None

Vectorstore.status.indexName: the Pinecone index, or Qdrant collection.

lastCheckedAt: datetime.datetime | None
lastMaintenanceAt: datetime.datetime | None
lastSnapshotAt: datetime.datetime | None
message: str | None

Vectorstore.status.message: why, if it failed.

modified: datetime

The date in which this resource was most recently changed.

Read only.

recordLocator: str

RecordLocator[String]: An optional identifier used to locate the resource record associated with this manifest.

Read only.

snapshotCount: int | None

Vectorstore.status.snapshotCount: its snapshots, or backups.

username: str

Vectorstore.status.username: the owner.

Read only.

vectorCount: int | None

Vectorstore.status.vectorCount: as of lastCheckedAt.

vectorstoreStatus: str

Vectorstore.status.vectorstoreStatus: pending, provisioning, ready, stopped, failed or deleting.

class smarter.models.sam.vectorstore.SAMVectorstore

Bases: smarter.models.sam.base.SAMModel

Smarter API Manifest - Vectorstore.

apiVersion: str

ApiVersion[String]: Required.

The API version of the AbstractSAMBase.

kind: str

Kind[String]: Required.

The kind of resource described by the manifest.

metadata: SAMVectorstoreMetadata

Vectorstore.metadata[obj]: Required, the Vectorstore metadata.

spec: SAMVectorstoreSpec

Vectorstore.spec[obj]: Required, the Vectorstore specification.

status: smarter.models.sam.vectorstore.SAMVectorstoreStatus | None

Vectorstore.status[obj]: Optional, Read-only.

Stateful status information about the Vectorstore.