-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Introduce a ChatRole enum for message history while preserving backward compatibility with string role inputs.
Level: Beginner
Current State
ChatMessage.roleis currently a plainstrinredisvl/extensions/message_history/schema.py.- Role handling is split between schema and base history validation logic.
Proposed Change
- Add a
ChatRoleenum (user,assistant,system,tool). - Update
ChatMessageto accept enum values and coerce valid strings. - Align checks in
redisvl/extensions/message_history/base_history.py. - Export the enum from the message history module.
Definition of Done
- Enum-based role validation is in place.
- Existing string-based behavior remains valid (non-breaking).
- Unit tests cover valid coercion and invalid role errors.
make format,make check-types, and tests pass.
Out of Scope
- Redesigning message history schemas beyond the role type.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
In Progress