SAMVectorstore
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(*, kind: str, name: str, **extra_data: Any)[source]
Bases:
SAMModelA 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.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.vectorstore.SAMVectorstoreEmbeddings(*, batchSize: Annotated[int, None, Interval(gt=None, ge=1, lt=None, le=1000), None] | None = 64, chunkOverlap: Annotated[int, None, Interval(gt=None, ge=0, lt=None, le=2000), None] | None = 200, chunkSize: Annotated[int, None, Interval(gt=None, ge=100, lt=None, le=8000), None] | None = 1000, dimensions: Annotated[int, None, Interval(gt=None, ge=1, lt=None, le=20000), None] | None = None, model: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)], provider: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)], **extra_data: Any)[source]
Bases:
SAMModelVectorstore.spec.embeddings: how documents and queries are turned into vectors.
- batchSize: conint(ge=1, le=1000) | None
Vectorstore.__init__.embeddings.batchSize: chunks per embeddings request and upsert.
- chunkOverlap: conint(ge=0, le=2000) | None
Vectorstore.__init__.embeddings.chunkOverlap: characters shared by consecutive chunks.
- chunkSize: conint(ge=100, le=8000) | None
Vectorstore.__init__.embeddings.chunkSize: characters per chunk.
- dimensions: conint(ge=1, le=20000) | None
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: constr(min_length=1)
Vectorstore.__init__.embeddings.model: the embeddings model, e.g. text-embedding-3-small.
- provider: constr(min_length=1)
Vectorstore.__init__.embeddings.provider: a Provider with an OpenAI-compatible embeddings API, e.g. openai.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.vectorstore.Metric(*values)[source]
Bases:
EnumVectorstore.__init__.index.metric: the distance metric.
- class smarter.models.sam.vectorstore.SAMVectorstoreIndex(*, deletionProtection: bool | None = False, dimension: Annotated[int, None, Interval(gt=None, ge=1, lt=None, le=20000), None], metric: Metric | None = 'cosine', name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=45, pattern=None, ascii_only=None)] | None = None, **extra_data: Any)[source]
Bases:
SAMModelVectorstore.spec.index: the index (Pinecone), or collection (Qdrant), of the database.
- deletionProtection: bool | None
Vectorstore.__init__.index.deletionProtection: refuse to destroy the database.
- dimension: conint(ge=1, le=20000)
Vectorstore.__init__.index.dimension: of the embeddings model’s vectors.
- name: constr(max_length=45) | None
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.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.vectorstore.SAMVectorstoreMaintenance(*, snapshotIntervalHours: Annotated[int, None, Interval(gt=None, ge=1, lt=None, le=720), None] | None = 24, snapshotRetention: Annotated[int, None, Interval(gt=None, ge=1, lt=None, le=100), None] | None = 7, snapshots: bool | None = True, **extra_data: Any)[source]
Bases:
SAMModelVectorstore.spec.maintenance: what Celery Beat does, besides checking its status.
- snapshotIntervalHours: conint(ge=1, le=720) | None
Vectorstore.__init__.maintenance.snapshotIntervalHours: how often.
- snapshotRetention: conint(ge=1, le=100) | None
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.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.vectorstore.SAMVectorstoreMetadata(*, annotations: None | list[dict[str, str | int | float | bool | date | datetime | UUID | bytes | list | dict[str, Any]]] = None, description: str | None, name: str, tags: list[str] | None = None, version: str | None, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Vectorstore Manifest - Metadata class.
- annotations: None | list[dict[str, str | int | float | bool | date | datetime | 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.
- tags: list[str] | None
The tags of the manifest.
Used for generic resource categorization and search. Example: [‘tag1’, ‘tag2’]
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.vectorstore.Cloud(*values)[source]
Bases:
EnumVectorstore.__init__.pinecone.cloud.
- class smarter.models.sam.vectorstore.SAMVectorstorePinecone(*, cloud: Cloud | None = 'aws', region: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)] | None = 'us-east-1', **extra_data: Any)[source]
Bases:
SAMModelVectorstore.spec.pinecone: where Pinecone runs a serverless index.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.vectorstore.SAMVectorstoreSelfHosted(*, cpu: str | None = '500m', image: str | None = 'qdrant/qdrant:v1.19.1', memory: str | None = '1Gi', storage: str | None = '10Gi', storageClass: str | None = None, **extra_data: Any)[source]
Bases:
SAMModelVectorstore.spec.selfHosted: the Qdrant server that Smarter runs on Kubernetes.
- storageClass: str | None
Vectorstore.__init__.selfHosted.storageClass: of its volume.
Defaults to the cluster’s.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- class smarter.models.sam.vectorstore.Backend(*values)[source]
Bases:
EnumVectorstore.__init__.backend: qdrant or pinecone.
- class smarter.models.sam.vectorstore.Hosting(*values)[source]
Bases:
EnumVectorstore.__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(*, backend: Backend, connection: str | None = None, embeddings: SAMVectorstoreEmbeddings, hosting: Hosting | None = 'managed', index: SAMVectorstoreIndex, isActive: bool | None = True, maintenance: SAMVectorstoreMaintenance | None = None, pinecone: SAMVectorstorePinecone | None = None, selfHosted: SAMVectorstoreSelfHosted | None = None, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Vectorstore Manifest Vectorstore.spec.
- 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.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- hosting: 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.
- maintenance: SAMVectorstoreMaintenance | None
Vectorstore.__init__.maintenance.
- pinecone: SAMVectorstorePinecone | None
Vectorstore.__init__.pinecone: pinecone only.
- selfHosted: SAMVectorstoreSelfHosted | None
Vectorstore.__init__.selfHosted: self_hosted only.
- class smarter.models.sam.vectorstore.SAMVectorstoreStatus(*, accountNumber: str, apiKeySecret: str | None = None, created: datetime, dependencies: list[SAMDependency] | None = None, deployedAt: datetime | None = None, documentCount: int | None = 0, endpoint: str | None = None, indexName: str | None = None, lastCheckedAt: datetime | None = None, lastMaintenanceAt: datetime | None = None, lastSnapshotAt: datetime | None = None, message: str | None = None, modified: datetime, recordLocator: str, snapshotCount: int | None = 0, username: str, vectorCount: int | None = 0, vectorstoreStatus: str, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Vectorstore Manifest - Status class.
Read only.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- 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[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.
- modified: datetime
The date in which this resource was most recently changed.
Read only.
- class smarter.models.sam.vectorstore.SAMVectorstore(*, apiVersion: str, kind: str, metadata: SAMVectorstoreMetadata, spec: SAMVectorstoreSpec, status: SAMVectorstoreStatus | None = None, **extra_data: Any)[source]
Bases:
SAMModelSmarter API Manifest - Vectorstore.
- model_config = {'extra': 'allow', 'populate_by_name': True, 'protected_namespaces': (), 'regex_engine': 'python-re', 'use_attribute_docstrings': True}
Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
- metadata: SAMVectorstoreMetadata
Vectorstore.metadata[obj]: Required, the Vectorstore metadata.
- spec: SAMVectorstoreSpec
Vectorstore.spec[obj]: Required, the Vectorstore specification.
- status: SAMVectorstoreStatus | None
Vectorstore.status[obj]: Optional, Read-only.
Stateful status information about the Vectorstore.