View source: R/conversations.R
| foundry_conversations | R Documentation |
Create, list, retrieve, update, and delete server-side conversations used by the Responses API.
foundry_conversation_create(metadata = NULL, api_key = NULL, endpoint = NULL)
foundry_conversations(
limit = NULL,
after = NULL,
api_key = NULL,
endpoint = NULL
)
foundry_conversation_get(conversation_id, api_key = NULL, endpoint = NULL)
foundry_conversation_update(
conversation_id,
metadata = NULL,
api_key = NULL,
endpoint = NULL
)
foundry_conversation_delete(conversation_id, api_key = NULL, endpoint = NULL)
foundry_conversation_items(
conversation_id,
limit = NULL,
after = NULL,
api_key = NULL,
endpoint = NULL
)
foundry_conversation_items_add(
conversation_id,
items,
api_key = NULL,
endpoint = NULL
)
metadata |
List. Optional metadata. |
api_key |
Character. Optional API key override. |
endpoint |
Character. Optional endpoint override. |
limit |
Integer. Optional page size. |
after |
Character. Optional pagination cursor. |
conversation_id |
Character. Conversation ID. |
items |
List. Conversation input items to add. |
A tibble with conversation metadata or conversation items.
# Requires a configured Azure endpoint and credentials with permission
# to create and delete the example conversation.
if (interactive() &&
nzchar(Sys.getenv("AZURE_FOUNDRY_ENDPOINT")) &&
nzchar(Sys.getenv("AZURE_FOUNDRY_KEY"))) {
conversation <- foundry_conversation_create(
metadata = list(example = "cran")
)
id <- conversation$conversation_id[[1]]
foundry_conversations(limit = 10)
foundry_conversation_get(id)
foundry_conversation_update(id, metadata = list(example = "updated"))
foundry_conversation_items(id)
foundry_conversation_delete(id)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.