Skip to contents

Create messages for chat() function.

Usage

create_messages(...)

Arguments

...

A list of messages, each of list class.

Value

A list of messages, each of list class.

Examples

messages <- create_messages(
    create_message("be nice", "system"),
    create_message("tell me a 3-word joke")
)

messages <- create_messages(
    list(role = "system", content = "be nice"),
    list(role = "user", content = "tell me a 3-word joke")
)