set_chatlog: Set up a new chatlog

View source: R/set_chatlog.R

set_chatlogR Documentation

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
)

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.

Value

A new chatlog object

Examples

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

TheOpenAIR documentation built on April 27, 2023, 5:10 p.m.