powered by
Shortcut that creates an OpenAI client from the OPENAI_API_KEY environment variable and lists all assistants.
OPENAI_API_KEY
list_assistants(...)
A list with $data — a list of assistant objects, each with $id, $name, $model, $instructions, and $tools.
$data
$id
$name
$model
$instructions
$tools
Additional parameters passed to AssistantsClient$list(): limit (max results), order ("asc"/"desc"), after, before.
$list()
limit
order
"asc"
"desc"
after
before
if (FALSE) { Sys.setenv(OPENAI_API_KEY = "sk-xxxxxx") assistants <- list_assistants() for (a in assistants$data) { cat(a$id, "-", a$name %||% "(unnamed)", "\n") } }
Run the code above in your browser using DataLab