Learn R Programming

oaii (version 0.5.0)

dialog_df: Create dialog data.frame

Description

Create dialog data.frame

Usage

dialog_df(content, role = "user", finish_reason = "stop")

Value

A one-row data.frame with columns: `content`, `role` and `finish_reason`

Arguments

content

string, message content

role

string, message role ("owner")

finish_reason

see https://platform.openai.com/docs/guides/gpt/chat-completions-response-format

Examples

Run this code
dialog_df("some text message")
dialog_df("some another text message", role = "assistant")

Run the code above in your browser using DataLab