assistants | R Documentation |
assistants Class
assistants Class
openaistream::openai
-> assistants
create()
Create an assistant with a model and instructions.
assistants$create(model, ..., verbosity = 0)
model
character Required. ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
...
Additional parameters as required by the OpenAI API.For example:name;description;instructions;tools;file_ids;metadata
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
An assistant object.
retrieve()
Retrieves an assistant.
assistants$retrieve(assistant_id, verbosity = 0)
assistant_id
character Required. The ID of the assistant to retrieve.
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
The assistant object matching the specified ID.
modify()
Modifies an assistant.
assistants$modify(assistant_id, ..., verbosity = 0)
assistant_id
character Required. The ID of the assistant to modify.
...
Additional parameters as required by the OpenAI API.For example:model;name;description;instructions;tools;file_ids,metadata
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
The assistant object matching the specified ID.
delete()
Delete an assistant.
assistants$delete(assistant_id, verbosity = 0)
assistant_id
character Required. The ID of the assistant to delete.
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
Deletion status
list()
Returns a list of assistants
assistants$list(..., verbosity = 0)
...
Additional parameters as required by the OpenAI API.For example:limit;order;after;before;
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
A list of assistant objects.
file_create()
Create an assistant file by attaching a File to an assistant.
assistants$file_create(assistant_id, file_id, verbosity = 0)
assistant_id
character Required. The ID of the assistant for which to create a File.
file_id
character Required. A File ID (with purpose="assistants") that the assistant should use. Useful for tools like retrieval and code_interpreter that can access files.
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
An assistant file object.
file_retrieve()
Retrieves an AssistantFile.
assistants$file_retrieve(assistant_id, file_id, verbosity = 0)
assistant_id
character Required. The ID of the assistant who the file belongs to.
file_id
character Required. The ID of the file we're getting.
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
The assistant file object matching the specified ID.
file_delete()
Delete an assistant file.
assistants$file_delete(assistant_id, file_id, verbosity = 0)
assistant_id
character Required. The ID of the assistant who the file belongs to.
file_id
character Required. The ID of the file we're getting.
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
Deletion status
file_list()
Retrieve a list of files from OpenAI.
assistants$file_list(assistant_id, ..., verbosity = 0)
assistant_id
character Required. The ID of the assistant who the file belongs to.
...
Additional parameters as required by the OpenAI API.For example:limit,order,after,before
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
A list of files.
clone()
The objects of this class are cloneable with this method.
assistants$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.