weaviate_agents.classes
Subpackages
weaviate_agents.classes.personalization
- pydantic model weaviate_agents.classes.personalization.Persona[source]
Bases:
BaseModelCreate 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.
- field persona_id: UUID [Required]
- field properties: Dict[str, Any] [Required]
- pydantic model weaviate_agents.classes.personalization.PersonaInteraction[source]
Bases:
BaseModelInteraction between a persona and an item.
If replace_previous_interactions is True, the interaction history for that specific item and persona pair will be replaced with the new interaction.
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.
- field created_at: datetime | None = None
- field item_id: UUID [Required]
- field persona_id: UUID [Required]
- field replace_previous_interactions: bool = False
- field weight: float [Required]
- pydantic model weaviate_agents.classes.personalization.PersonaInteractionResponse[source]
Bases:
BaseModelResponse model for persona interactions when retrieving them.
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.
- field created_at: str [Required] (alias 'createdAt')
- field item_id: UUID [Required] (alias 'uuid')
- field weight: float [Required]
- pydantic model weaviate_agents.classes.personalization.PersonalizationAgentGetObjectsResponse[source]
Bases:
BaseModelCreate 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.
- field objects: list[PersonalizedObject] [Required]
- field ranking_rationale: str | None = None
- pydantic model weaviate_agents.classes.personalization.PersonalizedObject[source]
Bases:
BaseModelCreate 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.
- field original_rank: int [Required]
- field personalized_rank: int | None [Required]
- field properties: Dict[str, Any] [Required]
- field uuid: UUID [Required]
- model_dump(**kwargs)[source]
Usage docs: https://docs.pydantic.dev/2.8/concepts/serialization/#modelmodel_dump
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- pydantic model weaviate_agents.classes.personalization.PersonalizedQueryResponse[source]
Bases:
BaseModel,QueryReturnCreate 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.
- pydantic model weaviate_agents.classes.personalization.Usage[source]
Bases:
BaseModelCreate 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.
- field details: Dict[str, int] | Dict[str, str] | None = None
- field request_tokens: int | str | None = None
- field requests: int | str = 0
- field response_tokens: int | str | None = None
- field total_tokens: int | str | None = None