Learn R Programming

openaistream (version 0.2.0)

assistants: assistants Class

Description

assistants Class

assistants Class

Arguments

Super class

openaistream::openai -> assistants

Methods

Inherited methods


Method create()

Create an assistant with a model and instructions.

Usage

assistants$create(model, ..., verbosity = 0)

Arguments

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.).

Returns

An assistant object.


Method retrieve()

Retrieves an assistant.

Usage

assistants$retrieve(assistant_id, verbosity = 0)

Arguments

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.).

Returns

The assistant object matching the specified ID.


Method modify()

Modifies an assistant.

Usage

assistants$modify(assistant_id, ..., verbosity = 0)

Arguments

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.).

Returns

The assistant object matching the specified ID.


Method delete()

Delete an assistant.

Usage

assistants$delete(assistant_id, verbosity = 0)

Arguments

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.).

Returns

Deletion status


Method list()

Returns a list of assistants

Usage

assistants$list(..., verbosity = 0)

Arguments

...

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.).

Returns

A list of assistant objects.


Method file_create()

Create an assistant file by attaching a File to an assistant.

Usage

assistants$file_create(assistant_id, file_id, verbosity = 0)

Arguments

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.).

Returns

An assistant file object.


Method file_retrieve()

Retrieves an AssistantFile.

Usage

assistants$file_retrieve(assistant_id, file_id, verbosity = 0)

Arguments

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.).

Returns

The assistant file object matching the specified ID.


Method file_delete()

Delete an assistant file.

Usage

assistants$file_delete(assistant_id, file_id, verbosity = 0)

Arguments

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.).

Returns

Deletion status


Method file_list()

Retrieve a list of files from OpenAI.

Usage

assistants$file_list(assistant_id, ..., verbosity = 0)

Arguments

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.).

Returns

A list of files.


Method clone()

The objects of this class are cloneable with this method.

Usage

assistants$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.