Skip to contents

This function takes a data frame and converts it into an LLMMessage object representing a conversation history. The data frame should contain specific columns (role and content) with each row representing a message in the conversation.

Usage

df_llm_message(.df)

Arguments

.df

A data frame with at least two rows and columns role and content. The column role should contain values from "user", "assistant", or "system", and content should be of type character.

Value

An LLMMessage object containing the structured messages as per the input data frame.