@@ -32,7 +32,7 @@ openai = OpenAI::Client.new(
3232
3333chat_completion = openai.chat.completions.create(
3434 messages: [{role: " user" , content: " Say this is a test" }],
35- model: :"gpt-5.1 "
35+ model: :"gpt-5.2 "
3636)
3737
3838puts (chat_completion)
@@ -45,7 +45,7 @@ We provide support for streaming responses using Server-Sent Events (SSE).
4545``` ruby
4646stream = openai.responses.stream(
4747 input: " Write a haiku about OpenAI." ,
48- model: :"gpt-5.1 "
48+ model: :"gpt-5.2 "
4949)
5050
5151stream.each do |event |
@@ -343,7 +343,7 @@ openai = OpenAI::Client.new(
343343# Or, configure per-request:
344344openai.chat.completions.create(
345345 messages: [{role: " user" , content: " How can I get the name of the current day in JavaScript?" }],
346- model: :"gpt-5.1 " ,
346+ model: :"gpt-5.2 " ,
347347 request_options: {max_retries: 5 }
348348)
349349```
@@ -361,7 +361,7 @@ openai = OpenAI::Client.new(
361361# Or, configure per-request:
362362openai.chat.completions.create(
363363 messages: [{role: " user" , content: " How can I list all files in a directory using Python?" }],
364- model: :"gpt-5.1 " ,
364+ model: :"gpt-5.2 " ,
365365 request_options: {timeout: 5 }
366366)
367367```
@@ -396,7 +396,7 @@ Note: the `extra_` parameters of the same name overrides the documented paramete
396396chat_completion =
397397 openai.chat.completions.create(
398398 messages: [{role: " user" , content: " How can I get the name of the current day in JavaScript?" }],
399- model: :"gpt-5.1 " ,
399+ model: :"gpt-5.2 " ,
400400 request_options: {
401401 extra_query: {my_query_parameter: value},
402402 extra_body: {my_body_parameter: value},
@@ -444,7 +444,7 @@ You can provide typesafe request parameters like so:
444444``` ruby
445445openai.chat.completions.create(
446446 messages: [OpenAI ::Chat ::ChatCompletionUserMessageParam .new (content: " Say this is a test" )],
447- model: :"gpt-5.1 "
447+ model: :"gpt-5.2 "
448448)
449449```
450450
@@ -454,13 +454,13 @@ Or, equivalently:
454454# Hashes work, but are not typesafe:
455455openai.chat.completions.create(
456456 messages: [{role: " user" , content: " Say this is a test" }],
457- model: :"gpt-5.1 "
457+ model: :"gpt-5.2 "
458458)
459459
460460# You can also splat a full Params class:
461461params = OpenAI ::Chat ::CompletionCreateParams .new (
462462 messages: [OpenAI ::Chat ::ChatCompletionUserMessageParam .new (content: " Say this is a test" )],
463- model: :"gpt-5.1 "
463+ model: :"gpt-5.2 "
464464)
465465openai.chat.completions.create(** params)
466466```
0 commit comments