chat_fetch_messages | R Documentation |
Fetch messages (dialog data.frame with chat messages) from response content
chat_fetch_messages(res_content)
res_content |
response object returned by chat_request |
Messages from response as dialog data.frame (see dialog_df)
## Not run:
question <- dialog_df("hi")
res_content <- chat_request(
messages = question,
model = "gpt-3.5-turbo"
)
if (!is_error(res_content)) {
answer <- chat_fetch_messages(res_content)
conversation <- merge_dialog_df(question, answer)
print(conversation)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.