Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


TheOpenAIR (version 0.1.0)

set_chatlog: Set up a new chatlog

Description

This function sets up a new chatlog object for a conversation.

Usage

set_chatlog(
  initial_role = "system",
  initial_content = "You are a helpful assistant.",
  chatlog_id = NULL
)

Value

A new chatlog object

Arguments

initial_role

A character string representing the role issueing the initial content (per default: "system")

initial_content

A character string representing the initial message from the system

chatlog_id

A character string representing the ID of this conversation. Per default, this will be set automatically.

Examples

Run this code
chat <- set_chatlog("Welcome to our chat!")
is_chatlog(chat)
chat

Run the code above in your browser using DataLab