Main client class for interacting with OpenAI API. Compatible with Python OpenAI SDK interface.
new()OpenAI$new(
api_key = NULL,
base_url = NULL,
organization = NULL,
project = NULL,
timeout = 600,
max_retries = 2
)
build_headers()OpenAI$build_headers()
request()OpenAI$request(
method,
path,
body = NULL,
query = NULL,
stream = FALSE,
callback = NULL
)
request_multipart()OpenAI$request_multipart(method, path, ...)
request_raw()OpenAI$request_raw(method, path, body = NULL)
clone()The objects of this class are cloneable with this method.
OpenAI$clone(deep = FALSE)deepWhether to make a deep clone.