Pydantic Models

Smarter API LLMHost Manifest Constants.

Smarter API Manifest - LLMHost.metadata.

class smarter.apps.llmhost.manifest.models.llmhost.metadata.SAMLLMHostMetadata(*, 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 LLMHost Manifest - Metadata class.

class_identifier: ClassVar[str] = 'LLMHost.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.

Pydantic manifest spec for the LLMHost SAM (Smarter API Manifest) resource.

class smarter.apps.llmhost.manifest.models.llmhost.spec.SAMLLMHostCharacteristicsConfig(**data)[source]

Bases: BaseModel

Model capability metadata.

contextWindow: int | None
embeddingDimensions: int | None
model_config: ClassVar[ConfigDict] = {}

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

parameterCount: int | None
quantization: Quantization
supportsFunctionCalling: bool
supportsStreaming: bool
supportsVision: bool
class smarter.apps.llmhost.manifest.models.llmhost.spec.SAMLLMHostHealthCheckConfig(**data)[source]

Bases: BaseModel

Optional health check wiring.

healthCheckUrl: HttpUrl | None
model_config: ClassVar[ConfigDict] = {}

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

class smarter.apps.llmhost.manifest.models.llmhost.spec.SAMLLMHostInfrastructureConfig(**data)[source]

Bases: BaseModel

Where and on what hardware this LLM is deployed.

cloudProvider: CloudProvider | None
costPerHour: Decimal | None
deploymentType: DeploymentType
gpuCount: int
gpuType: str | None
instanceType: str | None
model_config: ClassVar[ConfigDict] = {}

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

region: str | None
validate_cloud_fields()[source]
Return type:

SAMLLMHostInfrastructureConfig

vramRequiredGb: int | None
class smarter.apps.llmhost.manifest.models.llmhost.spec.SAMLLMHostProvenanceConfig(**data)[source]

Bases: BaseModel

Where the model weights came from.

huggingfaceRepoId: str | None
huggingfaceRevision: str | None
license: str | None
modelArchitecture: str | None
model_config: ClassVar[ConfigDict] = {}

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

class smarter.apps.llmhost.manifest.models.llmhost.spec.SAMLLMHostServingConfig(**data)[source]

Bases: BaseModel

The inference server this LLM is exposed through.

apiFormat: ApiFormat
apiKey: str | None
endpointUrl: HttpUrl
engineConfig: dict[str, Any]
inferenceEngine: InferenceEngine
model_config: ClassVar[ConfigDict] = {}

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

class smarter.apps.llmhost.manifest.models.llmhost.spec.SAMLLMHostSpec(*, config: SAMLLMHostSpecConfig)[source]

Bases: AbstractSAMSpecBase

Smarter API LLMClient Manifest LLMClient.spec.

class_identifier: ClassVar[str] = 'LLMClient.spec'
config: SAMLLMHostSpecConfig
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 - LLMHost.status.

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

Bases: AbstractSAMStatusBase

Smarter API LLMHost Manifest - Status class.

accountNumber: str
class_identifier: ClassVar[str] = 'LLMHost.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 LLMHost Manifest.

class smarter.apps.llmhost.manifest.models.llmhost.model.SAMLLMHost(*, apiVersion: str, kind: str, metadata: SAMLLMHostMetadata, spec: SAMLLMHostSpec, status: SAMLLMHostStatus | None = None)[source]

Bases: AbstractSAMBase

Smarter API Manifest - LLMHost.

class_identifier: ClassVar[str] = 'LLMHost'
metadata: SAMLLMHostMetadata
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: SAMLLMHostSpec
status: SAMLLMHostStatus | None