Method: OpenAI::Resources::Chat::Completions#retrieve
- Defined in:
- lib/openai/resources/chat/completions.rb
#retrieve(completion_id, request_options: {}) ⇒ OpenAI::Models::Chat::ChatCompletion
Get a stored chat completion. Only Chat Completions that have been created with
the store parameter set to true will be returned.
334 335 336 337 338 339 340 341 |
# File 'lib/openai/resources/chat/completions.rb', line 334 def retrieve(completion_id, params = {}) @client.request( method: :get, path: ["chat/completions/%1$s", completion_id], model: OpenAI::Chat::ChatCompletion, options: params[:request_options] ) end |