Pydantic Models

Smarter API Vectorsearch Manifest Constants.

Smarter API Manifest - Vectorsearch.metadata.

class smarter.apps.vectorsearch.manifest.models.vectorsearch.metadata.SAMVectorsearchMetadata(*, name: str, description: str | None, version: str | None, tags: List[str] | None = <factory>, annotations: List[dict[str, str | int | float | bool | ~datetime.date | ~datetime.datetime | ~decimal.Decimal | ~uuid.UUID | bytes | list | dict]] | None=<factory>)[source]

Bases: AbstractSAMMetadataBase

Smarter API Vectorsearch Manifest - Metadata class.

class_identifier: ClassVar[str] = 'Vectorsearch.metadata'
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

Smarter API Manifest - Vectorsearch.spec.

class smarter.apps.vectorsearch.manifest.models.vectorsearch.spec.SAMVectorsearchSpec(*, config: SAMVectorsearchSpecConfig)[source]

Bases: AbstractSAMSpecBase

Smarter API Vectorsearch Manifest Vectorsearch.spec.

class_identifier: ClassVar[str] = 'Vectorsearch.spec'
config: SAMVectorsearchSpecConfig
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

class smarter.apps.vectorsearch.manifest.models.vectorsearch.spec.SAMVectorsearchSpecConfig(*, vectorstore_name: str, auth_secret_name: str | None = None, search_type: VectorsearchSearchType = VectorsearchSearchType.SIMILARITY, k: Annotated[int, Gt(gt=0)] = 4, score_threshold: Annotated[float | None, Ge(ge=0.0), Le(le=1.0)] = None, fetch_k: Annotated[int | None, Gt(gt=0)] = None, lambda_mult: Annotated[float | None, Ge(ge=0.0), Le(le=1.0)] = None, metadata_filter: dict | None = None, is_enabled: bool = True)[source]

Bases: AbstractSAMSpecBase

Smarter API Vectorsearch Manifest Vectorsearch.spec.config.

auth_secret_name: str | None
class_identifier: ClassVar[str] = 'Vectorsearch.spec.configuration'
fetch_k: int | None
is_enabled: bool
k: int
lambda_mult: float | None
metadata_filter: dict | None
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

score_threshold: float | None
search_type: VectorsearchSearchType
classmethod strip_and_validate_name(value)[source]
Return type:

Optional[str]

validate_search_type_constraints()[source]
Return type:

SAMVectorsearchSpecConfig

vectorstore_name: str

Smarter API Manifest - Vectorsearch.status.

class smarter.apps.vectorsearch.manifest.models.vectorsearch.status.SAMVectorsearchStatus(*, recordLocator: str, created: datetime, modified: datetime, accountNumber: str, username: str)[source]

Bases: AbstractSAMStatusBase

Smarter API Vectorsearch Manifest - Status class.

accountNumber: str
class_identifier: ClassVar[str] = 'Vectorsearch.status'
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

username: str

Smarter API Vectorsearch Manifest.

class smarter.apps.vectorsearch.manifest.models.vectorsearch.model.SAMVectorsearch(*, apiVersion: str, kind: str, metadata: SAMVectorsearchMetadata, spec: SAMVectorsearchSpec, status: SAMVectorsearchStatus | None = None)[source]

Bases: AbstractSAMBase

Smarter API Manifest - Vectorsearch.

class_identifier: ClassVar[str] = 'Vectorsearch'
metadata: SAMVectorsearchMetadata
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self – The BaseModel instance.

  • context – The context.

spec: SAMVectorsearchSpec
status: SAMVectorsearchStatus | None