Learn R Programming

openaiRtools (version 0.2.2)

ChatCompletionsClient: Chat Completions Interface

Description

Provides methods to create, manage and retrieve chat completions. Access via client$chat$completions.

Arguments

Methods


Method new()

Usage

ChatCompletionsClient$new(parent)


Method create()

Usage

ChatCompletionsClient$create(
  messages,
  model = "gpt-3.5-turbo",
  frequency_penalty = NULL,
  logit_bias = NULL,
  logprobs = NULL,
  top_logprobs = NULL,
  max_tokens = NULL,
  max_completion_tokens = NULL,
  n = NULL,
  presence_penalty = NULL,
  response_format = NULL,
  seed = NULL,
  stop = NULL,
  stream = NULL,
  stream_options = NULL,
  temperature = NULL,
  top_p = NULL,
  tools = NULL,
  tool_choice = NULL,
  parallel_tool_calls = NULL,
  user = NULL,
  store = NULL,
  metadata = NULL,
  callback = NULL,
  ...
)


Method retrieve()

Usage

ChatCompletionsClient$retrieve(completion_id)


Method update()

Usage

ChatCompletionsClient$update(completion_id, metadata = NULL)


Method list()

Usage

ChatCompletionsClient$list(
  model = NULL,
  after = NULL,
  limit = NULL,
  order = NULL,
  metadata = NULL
)


Method delete()

Usage

ChatCompletionsClient$delete(completion_id)


Method clone()

The objects of this class are cloneable with this method.

Usage

ChatCompletionsClient$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.