ractogateway.redis._models
Pydantic configuration models for the Redis infrastructure layer.
- class ractogateway.redis._models.RateLimitConfig(**data)[source]
Bases:
BaseModelConfiguration for
RedisRateLimiter.- Parameters:
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.
- max_tokens_per_minute: int
- key_prefix: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ractogateway.redis._models.ChatMemoryConfig(**data)[source]
Bases:
BaseModelConfiguration for
RedisChatMemory.- Parameters:
max_turns (int) – Maximum number of conversation turns to retain. Each turn consists of one user message and one assistant message, so up to
max_turns * 2raw messages are stored per conversation.ttl_seconds (float | None) – Optional TTL. Every
append()call refreshes the expiry on the underlying Redis list.Nonedisables expiry.key_prefix (str) – Redis key namespace. Each conversation is stored at
"{key_prefix}:{conversation_id}".
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.
- max_turns: int
- key_prefix: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].