threads {openaistream} | R Documentation |
threads Class
Description
threads Class
threads Class
Super class
openaistream::openai
-> threads
Methods
Public methods
Inherited methods
Method create()
Create a thread.
Usage
threads$create(..., verbosity = 0)
Arguments
...
Additional parameters as required by the OpenAI API.For example:messages;name;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
A thread object.
Method retrieve()
Retrieves a thread.
Usage
threads$retrieve(thread_id, verbosity = 0)
Arguments
thread_id
character Required. The ID of the thread 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 thread object matching the specified ID.
Method modify()
Modifies a thread.
Usage
threads$modify(thread_id, ..., verbosity = 0)
Arguments
thread_id
The ID of the thread to modify. Only the metadata can be modified.
...
Additional parameters as required by the OpenAI API.For example: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 modified thread object matching the specified ID.
Method delete()
Delete a thread.
Usage
threads$delete(thread_id, verbosity = 0)
Arguments
thread_id
character Required The ID of the thread 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 clone()
The objects of this class are cloneable with this method.
Usage
threads$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.