chat_history Module

Classes

ChatHistory

This class holds the history of chat messages from a chat conversation.

Note: the system_message is added to the messages as a ChatMessageContent instance with role=AuthorRole.SYSTEM, but updating it will not update the messages list.

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.