set_chatlog {TheOpenAIR}R 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

[Package TheOpenAIR version 0.1.0 Index]