ractogateway._models.embedding
Typed input / output models for embedding calls.
- class ractogateway._models.embedding.EmbeddingConfig(**data)[source]
Bases:
BaseModelValidated input for
embed/aembedcalls.Example:
config = EmbeddingConfig(texts=["Hello world", "Goodbye world"]) response = kit.embed(config)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ractogateway._models.embedding.EmbeddingVector(**data)[source]
Bases:
BaseModelA single embedding result.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- index: int
- text: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ractogateway._models.embedding.EmbeddingResponse(**data)[source]
Bases:
BaseModelUnified response from an embedding call.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- vectors: list[EmbeddingVector]
- model: str
- raw: Any
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].