Skip to main content

Classes

CLASS ChatFormatter

Formatter used by Legacy backends to format Contexts as Messages.
Methods:

FUNC to_chat_messages

to_chat_messages(self, cs: list[Component | CBlock]) -> list[Message]
Helper method that converts a linearized chat history into a list of messages. The purpose of this helper is to prepare a sequence of Messages for input to a chat endpoint.