Learn R Programming

tidyllm (version 0.3.4)

df_llm_message: Convert a Data Frame to an LLMMessage Object

Description

This function converts a data frame into an LLMMessage object representing a conversation history. The data frame must have specific columns (role and content), with each row representing a message.

Usage

df_llm_message(.df)

Value

An LLMMessage object representing the structured conversation.

Arguments

.df

A data frame with at least two rows and columns role and content. The role column should contain "user", "assistant", or "system". The content column should contain the corresponding message text.

See Also

llm_message()

Other Message Creation Utilities: llm_message()