Skip to contents

Setup

oai_set_api_key()
Set OpenAI API key
make_sandbox_env()
Create a sandbox environment for function tools

Responses

Models

Fine tuning

Embeddings

oai_create_embeddings()
Embeddings API
Embedding
R6 class representing an Embedding in the OpenAI API

Chat completions

Assistants

Create and manage Assistants.

Threads

Messages

oai_create_message() oai_attachment() oai_list_messages() oai_retrieve_message() oai_modify_message() oai_delete_message()
A helper function for the attachment argument in oai_create_message() and Message objects.
Message
Message R6 class

Runs

Vector store

Audio

oai_create_speech() oai_create_transcription() oai_create_translation()
Audio API
Transcription VerboseTranscription
Transcription object Represents a transcription response returned by model, based on the provided input.

Utils

Files

Helpers

oai_message() oai_thread() oai_tool_resource()
A helper function for message arguments
oai_function_tool() oai_function_tool_parameter()
Define a function tool