Skip to content

message ¤

This module defines data structures for representing messages exchanged in a conversation with a language model (LLM).

Message ¤

Bases: TypedDict

A TypedDict that represents a message in a conversation with an LLM.

Attributes:

  • role (Literal['user', 'assistant', 'system', 'tool']) –

    The role of the message sender.

  • content (str) –

    The content of the message.