Learn R Programming

tidyprompt (version 0.0.1)

chat_history.character: Method for chat_history() when the input is a single string

Description

Creates a chat_history object from a single string.

Usage

# S3 method for character
chat_history(chat_history)

Value

A valid chat history data.frame (of class chat_history), with the 'role' set to 'user' and the 'content' set to the input string

Arguments

chat_history

A single string