GenerationMessage is used in the ChatGeneration class to represent a message.

Attributes

template
str

The template of the message prompt.

formatted
str

The formatted version of the template.

role
str

The role of the message, such as “system”, “assistant” or “user”.

name
str

Only used for OpenAI’s function message.

template_format
str

The format of the template, defaults to “f-string”.