An R6 class representing a Conversation in the OpenAI API.
Super class
openaiapi::Utils -> Conversation
Public fields
id
The conversation ID.
object
The object type, which is "conversation".
created_at
The creation time of the conversation, in epoch seconds.
metadata
Metadata associated with the conversation.
Methods
Method new()
Initialize a Conversation object
Arguments
conversation_id
Character. The ID of the conversation.
...
Additional arguments to be passed to the API functions.
resp
A list. The object returned by the OpenAI API.
Method retrieve()
Retrieve a fresh copy of the conversation from the API
Update the conversation's metadata
Arguments
...
Additional arguments to be passed to the API functions.
Method delete()
Delete the conversation
Method list_items()
List items in the conversation
Usage
Conversation$list_items(...)
Arguments
...
Additional arguments to be passed to the API functions.
Method create_items()
Add items to the conversation
Usage
Conversation$create_items(...)
Arguments
...
Additional arguments to be passed to the API functions.
Method retrieve_item()
Retrieve a specific item from the conversation
Usage
Conversation$retrieve_item(item_id, ...)
Arguments
item_id
Character. The ID of a specific conversation item.
...
Additional arguments to be passed to the API functions.
Method delete_item()
Delete a specific item from the conversation
Usage
Conversation$delete_item(item_id)
Arguments
item_id
Character. The ID of a specific conversation item.
Method clone()
The objects of this class are cloneable with this method.
Usage
Conversation$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.