openai 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +14 -20
  4. data/lib/openai/internal/transport/base_client.rb +1 -1
  5. data/lib/openai/internal/type/enum.rb +6 -6
  6. data/lib/openai/internal/type/union.rb +13 -17
  7. data/lib/openai/models/beta/assistant_create_params.rb +4 -5
  8. data/lib/openai/models/beta/assistant_update_params.rb +22 -5
  9. data/lib/openai/models/beta/threads/run_create_params.rb +4 -5
  10. data/lib/openai/models/chat/chat_completion_allowed_tool_choice.rb +33 -0
  11. data/lib/openai/models/chat/chat_completion_allowed_tools.rb +64 -0
  12. data/lib/openai/models/chat/chat_completion_assistant_message_param.rb +3 -5
  13. data/lib/openai/models/chat/chat_completion_custom_tool.rb +163 -0
  14. data/lib/openai/models/chat/chat_completion_function_tool.rb +29 -0
  15. data/lib/openai/models/chat/chat_completion_message.rb +3 -5
  16. data/lib/openai/models/chat/chat_completion_message_custom_tool_call.rb +60 -0
  17. data/lib/openai/models/chat/chat_completion_message_function_tool_call.rb +73 -0
  18. data/lib/openai/models/chat/chat_completion_message_tool_call.rb +10 -56
  19. data/lib/openai/models/chat/chat_completion_named_tool_choice.rb +2 -2
  20. data/lib/openai/models/chat/chat_completion_named_tool_choice_custom.rb +42 -0
  21. data/lib/openai/models/chat/chat_completion_stream_options.rb +14 -1
  22. data/lib/openai/models/chat/chat_completion_tool.rb +12 -14
  23. data/lib/openai/models/chat/chat_completion_tool_choice_option.rb +7 -1
  24. data/lib/openai/models/chat/completion_create_params.rb +35 -12
  25. data/lib/openai/models/chat_model.rb +7 -0
  26. data/lib/openai/models/custom_tool_input_format.rb +76 -0
  27. data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +3 -3
  28. data/lib/openai/models/evals/run_cancel_response.rb +2 -2
  29. data/lib/openai/models/evals/run_create_params.rb +2 -2
  30. data/lib/openai/models/evals/run_create_response.rb +2 -2
  31. data/lib/openai/models/evals/run_list_response.rb +2 -2
  32. data/lib/openai/models/evals/run_retrieve_response.rb +2 -2
  33. data/lib/openai/models/reasoning.rb +4 -5
  34. data/lib/openai/models/reasoning_effort.rb +4 -4
  35. data/lib/openai/models/response_format_text_grammar.rb +27 -0
  36. data/lib/openai/models/response_format_text_python.rb +20 -0
  37. data/lib/openai/models/responses/custom_tool.rb +48 -0
  38. data/lib/openai/models/responses/response.rb +20 -12
  39. data/lib/openai/models/responses/response_create_params.rb +48 -10
  40. data/lib/openai/models/responses/response_custom_tool_call.rb +55 -0
  41. data/lib/openai/models/responses/response_custom_tool_call_input_delta_event.rb +52 -0
  42. data/lib/openai/models/responses/response_custom_tool_call_input_done_event.rb +52 -0
  43. data/lib/openai/models/responses/response_custom_tool_call_output.rb +47 -0
  44. data/lib/openai/models/responses/response_input_item.rb +7 -1
  45. data/lib/openai/models/responses/response_output_item.rb +4 -1
  46. data/lib/openai/models/responses/response_output_item_added_event.rb +2 -2
  47. data/lib/openai/models/responses/response_output_item_done_event.rb +2 -2
  48. data/lib/openai/models/responses/response_reasoning_item.rb +36 -5
  49. data/lib/openai/models/responses/response_reasoning_text_delta_event.rb +63 -0
  50. data/lib/openai/models/responses/response_reasoning_text_done_event.rb +63 -0
  51. data/lib/openai/models/responses/response_retrieve_params.rb +14 -1
  52. data/lib/openai/models/responses/response_stream_event.rb +13 -11
  53. data/lib/openai/models/responses/response_text_config.rb +27 -1
  54. data/lib/openai/models/responses/tool.rb +5 -1
  55. data/lib/openai/models/responses/tool_choice_allowed.rb +73 -0
  56. data/lib/openai/models/responses/tool_choice_custom.rb +28 -0
  57. data/lib/openai/models/vector_store_search_params.rb +6 -1
  58. data/lib/openai/models.rb +6 -0
  59. data/lib/openai/resources/beta/assistants.rb +2 -2
  60. data/lib/openai/resources/beta/threads/runs.rb +2 -2
  61. data/lib/openai/resources/chat/completions.rb +16 -10
  62. data/lib/openai/resources/responses.rb +38 -22
  63. data/lib/openai/version.rb +1 -1
  64. data/lib/openai.rb +19 -2
  65. data/rbi/openai/internal/transport/base_client.rbi +1 -1
  66. data/rbi/openai/models/beta/assistant_create_params.rbi +6 -8
  67. data/rbi/openai/models/beta/assistant_update_params.rbi +36 -8
  68. data/rbi/openai/models/beta/threads/run_create_params.rbi +6 -8
  69. data/rbi/openai/models/chat/chat_completion_allowed_tool_choice.rbi +60 -0
  70. data/rbi/openai/models/chat/chat_completion_allowed_tools.rbi +118 -0
  71. data/rbi/openai/models/chat/chat_completion_assistant_message_param.rbi +27 -4
  72. data/rbi/openai/models/chat/chat_completion_custom_tool.rbi +335 -0
  73. data/rbi/openai/models/chat/chat_completion_function_tool.rbi +51 -0
  74. data/rbi/openai/models/chat/chat_completion_message.rbi +17 -4
  75. data/rbi/openai/models/chat/chat_completion_message_custom_tool_call.rbi +105 -0
  76. data/rbi/openai/models/chat/chat_completion_message_function_tool_call.rbi +118 -0
  77. data/rbi/openai/models/chat/chat_completion_message_tool_call.rbi +9 -92
  78. data/rbi/openai/models/chat/chat_completion_named_tool_choice.rbi +2 -2
  79. data/rbi/openai/models/chat/chat_completion_named_tool_choice_custom.rbi +89 -0
  80. data/rbi/openai/models/chat/chat_completion_stream_options.rbi +30 -2
  81. data/rbi/openai/models/chat/chat_completion_tool.rbi +11 -30
  82. data/rbi/openai/models/chat/chat_completion_tool_choice_option.rbi +3 -1
  83. data/rbi/openai/models/chat/completion_create_params.rbi +106 -25
  84. data/rbi/openai/models/chat_model.rbi +11 -0
  85. data/rbi/openai/models/custom_tool_input_format.rbi +136 -0
  86. data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +8 -4
  87. data/rbi/openai/models/evals/run_cancel_response.rbi +2 -0
  88. data/rbi/openai/models/evals/run_create_params.rbi +4 -0
  89. data/rbi/openai/models/evals/run_create_response.rbi +2 -0
  90. data/rbi/openai/models/evals/run_list_response.rbi +2 -0
  91. data/rbi/openai/models/evals/run_retrieve_response.rbi +2 -0
  92. data/rbi/openai/models/reasoning.rbi +6 -8
  93. data/rbi/openai/models/reasoning_effort.rbi +4 -4
  94. data/rbi/openai/models/response_format_text_grammar.rbi +35 -0
  95. data/rbi/openai/models/response_format_text_python.rbi +30 -0
  96. data/rbi/openai/models/responses/custom_tool.rbi +96 -0
  97. data/rbi/openai/models/responses/response.rbi +15 -5
  98. data/rbi/openai/models/responses/response_create_params.rbi +94 -7
  99. data/rbi/openai/models/responses/response_custom_tool_call.rbi +78 -0
  100. data/rbi/openai/models/responses/response_custom_tool_call_input_delta_event.rbi +75 -0
  101. data/rbi/openai/models/responses/response_custom_tool_call_input_done_event.rbi +75 -0
  102. data/rbi/openai/models/responses/response_custom_tool_call_output.rbi +65 -0
  103. data/rbi/openai/models/responses/response_input_item.rbi +2 -0
  104. data/rbi/openai/models/responses/response_output_item.rbi +2 -1
  105. data/rbi/openai/models/responses/response_output_item_added_event.rbi +2 -1
  106. data/rbi/openai/models/responses/response_output_item_done_event.rbi +2 -1
  107. data/rbi/openai/models/responses/response_reasoning_item.rbi +63 -4
  108. data/rbi/openai/models/responses/response_reasoning_text_delta_event.rbi +83 -0
  109. data/rbi/openai/models/responses/{response_reasoning_summary_done_event.rbi → response_reasoning_text_done_event.rbi} +20 -20
  110. data/rbi/openai/models/responses/response_retrieve_params.rbi +21 -0
  111. data/rbi/openai/models/responses/response_stream_event.rbi +4 -2
  112. data/rbi/openai/models/responses/response_text_config.rbi +64 -1
  113. data/rbi/openai/models/responses/tool.rbi +1 -0
  114. data/rbi/openai/models/responses/tool_choice_allowed.rbi +124 -0
  115. data/rbi/openai/models/responses/tool_choice_custom.rbi +39 -0
  116. data/rbi/openai/models/vector_store_search_params.rbi +12 -1
  117. data/rbi/openai/models.rbi +6 -0
  118. data/rbi/openai/resources/beta/assistants.rbi +6 -8
  119. data/rbi/openai/resources/beta/threads/runs.rbi +8 -10
  120. data/rbi/openai/resources/chat/completions.rbi +44 -19
  121. data/rbi/openai/resources/responses.rbi +215 -41
  122. data/sig/openai/internal/transport/base_client.rbs +1 -1
  123. data/sig/openai/models/beta/assistant_update_params.rbs +12 -0
  124. data/sig/openai/models/chat/chat_completion_allowed_tool_choice.rbs +29 -0
  125. data/sig/openai/models/chat/chat_completion_allowed_tools.rbs +38 -0
  126. data/sig/openai/models/chat/chat_completion_assistant_message_param.rbs +6 -6
  127. data/sig/openai/models/chat/chat_completion_custom_tool.rbs +137 -0
  128. data/sig/openai/models/chat/chat_completion_function_tool.rbs +26 -0
  129. data/sig/openai/models/chat/chat_completion_message.rbs +6 -6
  130. data/sig/openai/models/chat/chat_completion_message_custom_tool_call.rbs +46 -0
  131. data/sig/openai/models/chat/chat_completion_message_function_tool_call.rbs +46 -0
  132. data/sig/openai/models/chat/chat_completion_message_tool_call.rbs +6 -35
  133. data/sig/openai/models/chat/chat_completion_named_tool_choice_custom.rbs +39 -0
  134. data/sig/openai/models/chat/chat_completion_stream_options.rbs +11 -3
  135. data/sig/openai/models/chat/chat_completion_tool.rbs +6 -15
  136. data/sig/openai/models/chat/chat_completion_tool_choice_option.rbs +2 -0
  137. data/sig/openai/models/chat/completion_create_params.rbs +23 -6
  138. data/sig/openai/models/chat_model.rbs +15 -1
  139. data/sig/openai/models/custom_tool_input_format.rbs +61 -0
  140. data/sig/openai/models/evals/create_eval_completions_run_data_source.rbs +6 -6
  141. data/sig/openai/models/reasoning_effort.rbs +2 -1
  142. data/sig/openai/models/response_format_text_grammar.rbs +15 -0
  143. data/sig/openai/models/response_format_text_python.rbs +13 -0
  144. data/sig/openai/models/responses/custom_tool.rbs +43 -0
  145. data/sig/openai/models/responses/response.rbs +2 -0
  146. data/sig/openai/models/responses/response_create_params.rbs +19 -0
  147. data/sig/openai/models/responses/response_custom_tool_call.rbs +44 -0
  148. data/sig/openai/models/responses/response_custom_tool_call_input_delta_event.rbs +42 -0
  149. data/sig/openai/models/responses/response_custom_tool_call_input_done_event.rbs +42 -0
  150. data/sig/openai/models/responses/response_custom_tool_call_output.rbs +39 -0
  151. data/sig/openai/models/responses/response_input_item.rbs +2 -0
  152. data/sig/openai/models/responses/response_output_item.rbs +1 -0
  153. data/sig/openai/models/responses/response_reasoning_item.rbs +21 -0
  154. data/sig/openai/models/responses/{response_reasoning_summary_delta_event.rbs → response_reasoning_text_delta_event.rbs} +15 -15
  155. data/sig/openai/models/responses/{response_reasoning_summary_done_event.rbs → response_reasoning_text_done_event.rbs} +11 -11
  156. data/sig/openai/models/responses/response_retrieve_params.rbs +7 -0
  157. data/sig/openai/models/responses/response_stream_event.rbs +4 -2
  158. data/sig/openai/models/responses/response_text_config.rbs +22 -3
  159. data/sig/openai/models/responses/tool.rbs +1 -0
  160. data/sig/openai/models/responses/tool_choice_allowed.rbs +43 -0
  161. data/sig/openai/models/responses/tool_choice_custom.rbs +17 -0
  162. data/sig/openai/models/vector_store_search_params.rbs +2 -1
  163. data/sig/openai/models.rbs +6 -0
  164. data/sig/openai/resources/chat/completions.rbs +4 -2
  165. data/sig/openai/resources/responses.rbs +32 -0
  166. metadata +59 -8
  167. data/lib/openai/models/responses/response_reasoning_summary_delta_event.rb +0 -65
  168. data/lib/openai/models/responses/response_reasoning_summary_done_event.rb +0 -60
  169. data/rbi/openai/models/responses/response_reasoning_summary_delta_event.rbi +0 -85
@@ -56,11 +56,9 @@ module OpenAI
56
56
  # @!attribute tool_calls
57
57
  # The tool calls generated by the model, such as function calls.
58
58
  #
59
- # @return [Array<OpenAI::Models::Chat::ChatCompletionMessageToolCall>, nil]
59
+ # @return [Array<OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall, OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall>, nil]
60
60
  optional :tool_calls,
61
- -> {
62
- OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionMessageToolCall]
63
- }
61
+ -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Chat::ChatCompletionMessageToolCall] }
64
62
 
65
63
  # @!method initialize(content:, refusal:, annotations: nil, audio: nil, function_call: nil, tool_calls: nil, role: :assistant)
66
64
  # Some parameter documentations has been truncated, see
@@ -78,7 +76,7 @@ module OpenAI
78
76
  #
79
77
  # @param function_call [OpenAI::Models::Chat::ChatCompletionMessage::FunctionCall] Deprecated and replaced by `tool_calls`. The name and arguments of a function th
80
78
  #
81
- # @param tool_calls [Array<OpenAI::Models::Chat::ChatCompletionMessageToolCall>] The tool calls generated by the model, such as function calls.
79
+ # @param tool_calls [Array<OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall, OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall>] The tool calls generated by the model, such as function calls.
82
80
  #
83
81
  # @param role [Symbol, :assistant] The role of the author of this message.
84
82
 
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Chat
6
+ class ChatCompletionMessageCustomToolCall < OpenAI::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the tool call.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute custom
14
+ # The custom tool that the model called.
15
+ #
16
+ # @return [OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall::Custom]
17
+ required :custom, -> { OpenAI::Chat::ChatCompletionMessageCustomToolCall::Custom }
18
+
19
+ # @!attribute type
20
+ # The type of the tool. Always `custom`.
21
+ #
22
+ # @return [Symbol, :custom]
23
+ required :type, const: :custom
24
+
25
+ # @!method initialize(id:, custom:, type: :custom)
26
+ # A call to a custom tool created by the model.
27
+ #
28
+ # @param id [String] The ID of the tool call.
29
+ #
30
+ # @param custom [OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall::Custom] The custom tool that the model called.
31
+ #
32
+ # @param type [Symbol, :custom] The type of the tool. Always `custom`.
33
+
34
+ # @see OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall#custom
35
+ class Custom < OpenAI::Internal::Type::BaseModel
36
+ # @!attribute input
37
+ # The input for the custom tool call generated by the model.
38
+ #
39
+ # @return [String]
40
+ required :input, String
41
+
42
+ # @!attribute name
43
+ # The name of the custom tool to call.
44
+ #
45
+ # @return [String]
46
+ required :name, String
47
+
48
+ # @!method initialize(input:, name:)
49
+ # The custom tool that the model called.
50
+ #
51
+ # @param input [String] The input for the custom tool call generated by the model.
52
+ #
53
+ # @param name [String] The name of the custom tool to call.
54
+ end
55
+ end
56
+ end
57
+
58
+ ChatCompletionMessageCustomToolCall = Chat::ChatCompletionMessageCustomToolCall
59
+ end
60
+ end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Chat
6
+ class ChatCompletionMessageFunctionToolCall < OpenAI::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the tool call.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute function
14
+ # The function that the model called.
15
+ #
16
+ # @return [OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall::Function]
17
+ required :function, -> { OpenAI::Chat::ChatCompletionMessageFunctionToolCall::Function }
18
+
19
+ # @!attribute type
20
+ # The type of the tool. Currently, only `function` is supported.
21
+ #
22
+ # @return [Symbol, :function]
23
+ required :type, const: :function
24
+
25
+ # @!method initialize(id:, function:, type: :function)
26
+ # A call to a function tool created by the model.
27
+ #
28
+ # @param id [String] The ID of the tool call.
29
+ #
30
+ # @param function [OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall::Function] The function that the model called.
31
+ #
32
+ # @param type [Symbol, :function] The type of the tool. Currently, only `function` is supported.
33
+
34
+ # @see OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall#function
35
+ class Function < OpenAI::Internal::Type::BaseModel
36
+ # @!attribute arguments
37
+ # The arguments to call the function with, as generated by the model in JSON
38
+ # format. Note that the model does not always generate valid JSON, and may
39
+ # hallucinate parameters not defined by your function schema. Validate the
40
+ # arguments in your code before calling your function.
41
+ #
42
+ # @return [String]
43
+ required :arguments, String
44
+
45
+ # @!attribute parsed
46
+ # The parsed contents of the arguments.
47
+ #
48
+ # @return [Object, nil]
49
+ required :parsed, OpenAI::StructuredOutput::ParsedJson
50
+
51
+ # @!attribute name
52
+ # The name of the function to call.
53
+ #
54
+ # @return [String]
55
+ required :name, String
56
+
57
+ # @!method initialize(arguments:, name:)
58
+ # Some parameter documentations has been truncated, see
59
+ # {OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall::Function} for more
60
+ # details.
61
+ #
62
+ # The function that the model called.
63
+ #
64
+ # @param arguments [String] The arguments to call the function with, as generated by the model in JSON forma
65
+ #
66
+ # @param name [String] The name of the function to call.
67
+ end
68
+ end
69
+ end
70
+
71
+ ChatCompletionMessageFunctionToolCall = Chat::ChatCompletionMessageFunctionToolCall
72
+ end
73
+ end
@@ -3,66 +3,20 @@
3
3
  module OpenAI
4
4
  module Models
5
5
  module Chat
6
- class ChatCompletionMessageToolCall < OpenAI::Internal::Type::BaseModel
7
- # @!attribute id
8
- # The ID of the tool call.
9
- #
10
- # @return [String]
11
- required :id, String
6
+ # A call to a function tool created by the model.
7
+ module ChatCompletionMessageToolCall
8
+ extend OpenAI::Internal::Type::Union
12
9
 
13
- # @!attribute function
14
- # The function that the model called.
15
- #
16
- # @return [OpenAI::Models::Chat::ChatCompletionMessageToolCall::Function]
17
- required :function, -> { OpenAI::Chat::ChatCompletionMessageToolCall::Function }
10
+ discriminator :type
18
11
 
19
- # @!attribute type
20
- # The type of the tool. Currently, only `function` is supported.
21
- #
22
- # @return [Symbol, :function]
23
- required :type, const: :function
12
+ # A call to a function tool created by the model.
13
+ variant :function, -> { OpenAI::Chat::ChatCompletionMessageFunctionToolCall }
24
14
 
25
- # @!method initialize(id:, function:, type: :function)
26
- # @param id [String] The ID of the tool call.
27
- #
28
- # @param function [OpenAI::Models::Chat::ChatCompletionMessageToolCall::Function] The function that the model called.
29
- #
30
- # @param type [Symbol, :function] The type of the tool. Currently, only `function` is supported.
15
+ # A call to a custom tool created by the model.
16
+ variant :custom, -> { OpenAI::Chat::ChatCompletionMessageCustomToolCall }
31
17
 
32
- # @see OpenAI::Models::Chat::ChatCompletionMessageToolCall#function
33
- class Function < OpenAI::Internal::Type::BaseModel
34
- # @!attribute arguments
35
- # The arguments to call the function with, as generated by the model in JSON
36
- # format. Note that the model does not always generate valid JSON, and may
37
- # hallucinate parameters not defined by your function schema. Validate the
38
- # arguments in your code before calling your function.
39
- #
40
- # @return [String]
41
- required :arguments, String
42
-
43
- # @!attribute parsed
44
- # The parsed contents of the arguments.
45
- #
46
- # @return [Object, nil]
47
- required :parsed, OpenAI::StructuredOutput::ParsedJson
48
-
49
- # @!attribute name
50
- # The name of the function to call.
51
- #
52
- # @return [String]
53
- required :name, String
54
-
55
- # @!method initialize(arguments:, name:)
56
- # Some parameter documentations has been truncated, see
57
- # {OpenAI::Models::Chat::ChatCompletionMessageToolCall::Function} for more
58
- # details.
59
- #
60
- # The function that the model called.
61
- #
62
- # @param arguments [String] The arguments to call the function with, as generated by the model in JSON forma
63
- #
64
- # @param name [String] The name of the function to call.
65
- end
18
+ # @!method self.variants
19
+ # @return [Array(OpenAI::Models::Chat::ChatCompletionMessageFunctionToolCall, OpenAI::Models::Chat::ChatCompletionMessageCustomToolCall)]
66
20
  end
67
21
  end
68
22
 
@@ -10,7 +10,7 @@ module OpenAI
10
10
  required :function, -> { OpenAI::Chat::ChatCompletionNamedToolChoice::Function }
11
11
 
12
12
  # @!attribute type
13
- # The type of the tool. Currently, only `function` is supported.
13
+ # For function calling, the type is always `function`.
14
14
  #
15
15
  # @return [Symbol, :function]
16
16
  required :type, const: :function
@@ -21,7 +21,7 @@ module OpenAI
21
21
  #
22
22
  # @param function [OpenAI::Models::Chat::ChatCompletionNamedToolChoice::Function]
23
23
  #
24
- # @param type [Symbol, :function] The type of the tool. Currently, only `function` is supported.
24
+ # @param type [Symbol, :function] For function calling, the type is always `function`.
25
25
 
26
26
  # @see OpenAI::Models::Chat::ChatCompletionNamedToolChoice#function
27
27
  class Function < OpenAI::Internal::Type::BaseModel
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Chat
6
+ class ChatCompletionNamedToolChoiceCustom < OpenAI::Internal::Type::BaseModel
7
+ # @!attribute custom
8
+ #
9
+ # @return [OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom::Custom]
10
+ required :custom, -> { OpenAI::Chat::ChatCompletionNamedToolChoiceCustom::Custom }
11
+
12
+ # @!attribute type
13
+ # For custom tool calling, the type is always `custom`.
14
+ #
15
+ # @return [Symbol, :custom]
16
+ required :type, const: :custom
17
+
18
+ # @!method initialize(custom:, type: :custom)
19
+ # Specifies a tool the model should use. Use to force the model to call a specific
20
+ # custom tool.
21
+ #
22
+ # @param custom [OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom::Custom]
23
+ #
24
+ # @param type [Symbol, :custom] For custom tool calling, the type is always `custom`.
25
+
26
+ # @see OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom#custom
27
+ class Custom < OpenAI::Internal::Type::BaseModel
28
+ # @!attribute name
29
+ # The name of the custom tool to call.
30
+ #
31
+ # @return [String]
32
+ required :name, String
33
+
34
+ # @!method initialize(name:)
35
+ # @param name [String] The name of the custom tool to call.
36
+ end
37
+ end
38
+ end
39
+
40
+ ChatCompletionNamedToolChoiceCustom = Chat::ChatCompletionNamedToolChoiceCustom
41
+ end
42
+ end
@@ -4,6 +4,17 @@ module OpenAI
4
4
  module Models
5
5
  module Chat
6
6
  class ChatCompletionStreamOptions < OpenAI::Internal::Type::BaseModel
7
+ # @!attribute include_obfuscation
8
+ # When true, stream obfuscation will be enabled. Stream obfuscation adds random
9
+ # characters to an `obfuscation` field on streaming delta events to normalize
10
+ # payload sizes as a mitigation to certain side-channel attacks. These obfuscation
11
+ # fields are included by default, but add a small amount of overhead to the data
12
+ # stream. You can set `include_obfuscation` to false to optimize for bandwidth if
13
+ # you trust the network links between your application and the OpenAI API.
14
+ #
15
+ # @return [Boolean, nil]
16
+ optional :include_obfuscation, OpenAI::Internal::Type::Boolean
17
+
7
18
  # @!attribute include_usage
8
19
  # If set, an additional chunk will be streamed before the `data: [DONE]` message.
9
20
  # The `usage` field on this chunk shows the token usage statistics for the entire
@@ -16,12 +27,14 @@ module OpenAI
16
27
  # @return [Boolean, nil]
17
28
  optional :include_usage, OpenAI::Internal::Type::Boolean
18
29
 
19
- # @!method initialize(include_usage: nil)
30
+ # @!method initialize(include_obfuscation: nil, include_usage: nil)
20
31
  # Some parameter documentations has been truncated, see
21
32
  # {OpenAI::Models::Chat::ChatCompletionStreamOptions} for more details.
22
33
  #
23
34
  # Options for streaming response. Only set this when you set `stream: true`.
24
35
  #
36
+ # @param include_obfuscation [Boolean] When true, stream obfuscation will be enabled. Stream obfuscation adds
37
+ #
25
38
  # @param include_usage [Boolean] If set, an additional chunk will be streamed before the `data: [DONE]`
26
39
  end
27
40
  end
@@ -3,22 +3,20 @@
3
3
  module OpenAI
4
4
  module Models
5
5
  module Chat
6
- class ChatCompletionTool < OpenAI::Internal::Type::BaseModel
7
- # @!attribute function
8
- #
9
- # @return [OpenAI::Models::FunctionDefinition]
10
- required :function, -> { OpenAI::FunctionDefinition }
6
+ # A function tool that can be used to generate a response.
7
+ module ChatCompletionTool
8
+ extend OpenAI::Internal::Type::Union
11
9
 
12
- # @!attribute type
13
- # The type of the tool. Currently, only `function` is supported.
14
- #
15
- # @return [Symbol, :function]
16
- required :type, const: :function
10
+ discriminator :type
17
11
 
18
- # @!method initialize(function:, type: :function)
19
- # @param function [OpenAI::Models::FunctionDefinition]
20
- #
21
- # @param type [Symbol, :function] The type of the tool. Currently, only `function` is supported.
12
+ # A function tool that can be used to generate a response.
13
+ variant :function, -> { OpenAI::Chat::ChatCompletionFunctionTool }
14
+
15
+ # A custom tool that processes input using a specified format.
16
+ variant :custom, -> { OpenAI::Chat::ChatCompletionCustomTool }
17
+
18
+ # @!method self.variants
19
+ # @return [Array(OpenAI::Models::Chat::ChatCompletionFunctionTool, OpenAI::Models::Chat::ChatCompletionCustomTool)]
22
20
  end
23
21
  end
24
22
 
@@ -18,9 +18,15 @@ module OpenAI
18
18
  # `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.
19
19
  variant enum: -> { OpenAI::Chat::ChatCompletionToolChoiceOption::Auto }
20
20
 
21
+ # Constrains the tools available to the model to a pre-defined set.
22
+ variant -> { OpenAI::Chat::ChatCompletionAllowedToolChoice }
23
+
21
24
  # Specifies a tool the model should use. Use to force the model to call a specific function.
22
25
  variant -> { OpenAI::Chat::ChatCompletionNamedToolChoice }
23
26
 
27
+ # Specifies a tool the model should use. Use to force the model to call a specific custom tool.
28
+ variant -> { OpenAI::Chat::ChatCompletionNamedToolChoiceCustom }
29
+
24
30
  # `none` means the model will not call any tool and instead generates a message.
25
31
  # `auto` means the model can pick between generating a message or calling one or
26
32
  # more tools. `required` means the model must call one or more tools.
@@ -36,7 +42,7 @@ module OpenAI
36
42
  end
37
43
 
38
44
  # @!method self.variants
39
- # @return [Array(Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionNamedToolChoice)]
45
+ # @return [Array(Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionAllowedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom)]
40
46
  end
41
47
  end
42
48
 
@@ -191,12 +191,11 @@ module OpenAI
191
191
  optional :prompt_cache_key, String
192
192
 
193
193
  # @!attribute reasoning_effort
194
- # **o-series models only**
195
- #
196
194
  # Constrains effort on reasoning for
197
195
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
198
- # supported values are `low`, `medium`, and `high`. Reducing reasoning effort can
199
- # result in faster responses and fewer tokens used on reasoning in a response.
196
+ # supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
197
+ # effort can result in faster responses and fewer tokens used on reasoning in a
198
+ # response.
200
199
  #
201
200
  # @return [Symbol, OpenAI::Models::ReasoningEffort, nil]
202
201
  optional :reasoning_effort, enum: -> { OpenAI::ReasoningEffort }, nil?: true
@@ -303,13 +302,13 @@ module OpenAI
303
302
  # `none` is the default when no tools are present. `auto` is the default if tools
304
303
  # are present.
305
304
  #
306
- # @return [Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionNamedToolChoice, nil]
305
+ # @return [Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionAllowedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom, nil]
307
306
  optional :tool_choice, union: -> { OpenAI::Chat::ChatCompletionToolChoiceOption }
308
307
 
309
308
  # @!attribute tools
310
- # A list of tools the model may call. Currently, only functions are supported as a
311
- # tool. Use this to provide a list of functions the model may generate JSON inputs
312
- # for. A max of 128 functions are supported.
309
+ # A list of tools the model may call. You can provide either
310
+ # [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)
311
+ # or [function tools](https://platform.openai.com/docs/guides/function-calling).
313
312
  #
314
313
  # @return [Array<OpenAI::Models::Chat::ChatCompletionTool, OpenAI::StructuredOutput::JsonSchemaConverter>, nil]
315
314
  optional :tools,
@@ -349,6 +348,14 @@ module OpenAI
349
348
  # @return [String, nil]
350
349
  optional :user, String
351
350
 
351
+ # @!attribute verbosity
352
+ # Constrains the verbosity of the model's response. Lower values will result in
353
+ # more concise responses, while higher values will result in more verbose
354
+ # responses. Currently supported values are `low`, `medium`, and `high`.
355
+ #
356
+ # @return [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil]
357
+ optional :verbosity, enum: -> { OpenAI::Chat::CompletionCreateParams::Verbosity }, nil?: true
358
+
352
359
  # @!attribute web_search_options
353
360
  # This tool searches the web for relevant results to use in a response. Learn more
354
361
  # about the
@@ -357,7 +364,7 @@ module OpenAI
357
364
  # @return [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions, nil]
358
365
  optional :web_search_options, -> { OpenAI::Chat::CompletionCreateParams::WebSearchOptions }
359
366
 
360
- # @!method initialize(messages:, model:, audio: nil, frequency_penalty: nil, function_call: nil, functions: nil, logit_bias: nil, logprobs: nil, max_completion_tokens: nil, max_tokens: nil, metadata: nil, modalities: nil, n: nil, parallel_tool_calls: nil, prediction: nil, presence_penalty: nil, prompt_cache_key: nil, reasoning_effort: nil, response_format: nil, safety_identifier: nil, seed: nil, service_tier: nil, stop: nil, store: nil, stream_options: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, user: nil, web_search_options: nil, request_options: {})
367
+ # @!method initialize(messages:, model:, audio: nil, frequency_penalty: nil, function_call: nil, functions: nil, logit_bias: nil, logprobs: nil, max_completion_tokens: nil, max_tokens: nil, metadata: nil, modalities: nil, n: nil, parallel_tool_calls: nil, prediction: nil, presence_penalty: nil, prompt_cache_key: nil, reasoning_effort: nil, response_format: nil, safety_identifier: nil, seed: nil, service_tier: nil, stop: nil, store: nil, stream_options: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, user: nil, verbosity: nil, web_search_options: nil, request_options: {})
361
368
  # Some parameter documentations has been truncated, see
362
369
  # {OpenAI::Models::Chat::CompletionCreateParams} for more details.
363
370
  #
@@ -395,7 +402,7 @@ module OpenAI
395
402
  #
396
403
  # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
397
404
  #
398
- # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] **o-series models only**
405
+ # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for
399
406
  #
400
407
  # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output.
401
408
  #
@@ -413,9 +420,9 @@ module OpenAI
413
420
  #
414
421
  # @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m
415
422
  #
416
- # @param tool_choice [Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionNamedToolChoice] Controls which (if any) tool is called by the model.
423
+ # @param tool_choice [Symbol, OpenAI::Models::Chat::ChatCompletionToolChoiceOption::Auto, OpenAI::Models::Chat::ChatCompletionAllowedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoice, OpenAI::Models::Chat::ChatCompletionNamedToolChoiceCustom] Controls which (if any) tool is called by the model.
417
424
  #
418
- # @param tools [Array<OpenAI::Models::Chat::ChatCompletionTool, OpenAI::StructuredOutput::JsonSchemaConverter>] A list of tools the model may call. Currently, only functions are supported as a
425
+ # @param tools [Array<OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::Models::Chat::ChatCompletionFunctionTool, OpenAI::Models::Chat::ChatCompletionCustomTool>] A list of tools the model may call. You can provide either
419
426
  #
420
427
  # @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the number of most likely tokens to
421
428
  #
@@ -423,6 +430,8 @@ module OpenAI
423
430
  #
424
431
  # @param user [String] This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
425
432
  #
433
+ # @param verbosity [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil] Constrains the verbosity of the model's response. Lower values will result in
434
+ #
426
435
  # @param web_search_options [OpenAI::Models::Chat::CompletionCreateParams::WebSearchOptions] This tool searches the web for relevant results to use in a response.
427
436
  #
428
437
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
@@ -622,6 +631,20 @@ module OpenAI
622
631
  StringArray = OpenAI::Internal::Type::ArrayOf[String]
623
632
  end
624
633
 
634
+ # Constrains the verbosity of the model's response. Lower values will result in
635
+ # more concise responses, while higher values will result in more verbose
636
+ # responses. Currently supported values are `low`, `medium`, and `high`.
637
+ module Verbosity
638
+ extend OpenAI::Internal::Type::Enum
639
+
640
+ LOW = :low
641
+ MEDIUM = :medium
642
+ HIGH = :high
643
+
644
+ # @!method self.values
645
+ # @return [Array<Symbol>]
646
+ end
647
+
625
648
  class WebSearchOptions < OpenAI::Internal::Type::BaseModel
626
649
  # @!attribute search_context_size
627
650
  # High level guidance for the amount of context window space to use for the
@@ -5,6 +5,13 @@ module OpenAI
5
5
  module ChatModel
6
6
  extend OpenAI::Internal::Type::Enum
7
7
 
8
+ GPT_5 = :"gpt-5"
9
+ GPT_5_MINI = :"gpt-5-mini"
10
+ GPT_5_NANO = :"gpt-5-nano"
11
+ GPT_5_2025_08_07 = :"gpt-5-2025-08-07"
12
+ GPT_5_MINI_2025_08_07 = :"gpt-5-mini-2025-08-07"
13
+ GPT_5_NANO_2025_08_07 = :"gpt-5-nano-2025-08-07"
14
+ GPT_5_CHAT_LATEST = :"gpt-5-chat-latest"
8
15
  GPT_4_1 = :"gpt-4.1"
9
16
  GPT_4_1_MINI = :"gpt-4.1-mini"
10
17
  GPT_4_1_NANO = :"gpt-4.1-nano"
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ # The input format for the custom tool. Default is unconstrained text.
6
+ module CustomToolInputFormat
7
+ extend OpenAI::Internal::Type::Union
8
+
9
+ discriminator :type
10
+
11
+ # Unconstrained free-form text.
12
+ variant :text, -> { OpenAI::CustomToolInputFormat::Text }
13
+
14
+ # A grammar defined by the user.
15
+ variant :grammar, -> { OpenAI::CustomToolInputFormat::Grammar }
16
+
17
+ class Text < OpenAI::Internal::Type::BaseModel
18
+ # @!attribute type
19
+ # Unconstrained text format. Always `text`.
20
+ #
21
+ # @return [Symbol, :text]
22
+ required :type, const: :text
23
+
24
+ # @!method initialize(type: :text)
25
+ # Unconstrained free-form text.
26
+ #
27
+ # @param type [Symbol, :text] Unconstrained text format. Always `text`.
28
+ end
29
+
30
+ class Grammar < OpenAI::Internal::Type::BaseModel
31
+ # @!attribute definition
32
+ # The grammar definition.
33
+ #
34
+ # @return [String]
35
+ required :definition, String
36
+
37
+ # @!attribute syntax
38
+ # The syntax of the grammar definition. One of `lark` or `regex`.
39
+ #
40
+ # @return [Symbol, OpenAI::Models::CustomToolInputFormat::Grammar::Syntax]
41
+ required :syntax, enum: -> { OpenAI::CustomToolInputFormat::Grammar::Syntax }
42
+
43
+ # @!attribute type
44
+ # Grammar format. Always `grammar`.
45
+ #
46
+ # @return [Symbol, :grammar]
47
+ required :type, const: :grammar
48
+
49
+ # @!method initialize(definition:, syntax:, type: :grammar)
50
+ # A grammar defined by the user.
51
+ #
52
+ # @param definition [String] The grammar definition.
53
+ #
54
+ # @param syntax [Symbol, OpenAI::Models::CustomToolInputFormat::Grammar::Syntax] The syntax of the grammar definition. One of `lark` or `regex`.
55
+ #
56
+ # @param type [Symbol, :grammar] Grammar format. Always `grammar`.
57
+
58
+ # The syntax of the grammar definition. One of `lark` or `regex`.
59
+ #
60
+ # @see OpenAI::Models::CustomToolInputFormat::Grammar#syntax
61
+ module Syntax
62
+ extend OpenAI::Internal::Type::Enum
63
+
64
+ LARK = :lark
65
+ REGEX = :regex
66
+
67
+ # @!method self.values
68
+ # @return [Array<Symbol>]
69
+ end
70
+ end
71
+
72
+ # @!method self.variants
73
+ # @return [Array(OpenAI::Models::CustomToolInputFormat::Text, OpenAI::Models::CustomToolInputFormat::Grammar)]
74
+ end
75
+ end
76
+ end
@@ -512,8 +512,8 @@ module OpenAI
512
512
  # tool. Use this to provide a list of functions the model may generate JSON inputs
513
513
  # for. A max of 128 functions are supported.
514
514
  #
515
- # @return [Array<OpenAI::Models::Chat::ChatCompletionTool>, nil]
516
- optional :tools, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionTool] }
515
+ # @return [Array<OpenAI::Models::Chat::ChatCompletionFunctionTool>, nil]
516
+ optional :tools, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionFunctionTool] }
517
517
 
518
518
  # @!attribute top_p
519
519
  # An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
@@ -534,7 +534,7 @@ module OpenAI
534
534
  #
535
535
  # @param temperature [Float] A higher temperature increases randomness in the outputs.
536
536
  #
537
- # @param tools [Array<OpenAI::Models::Chat::ChatCompletionTool>] A list of tools the model may call. Currently, only functions are supported as a
537
+ # @param tools [Array<OpenAI::Models::Chat::ChatCompletionFunctionTool>] A list of tools the model may call. Currently, only functions are supported as a
538
538
  #
539
539
  # @param top_p [Float] An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
540
540
 
@@ -686,7 +686,7 @@ module OpenAI
686
686
  # the model to call your own code. Learn more about
687
687
  # [function calling](https://platform.openai.com/docs/guides/function-calling).
688
688
  #
689
- # @return [Array<OpenAI::Models::Responses::FunctionTool, OpenAI::Models::Responses::FileSearchTool, OpenAI::Models::Responses::ComputerTool, OpenAI::Models::Responses::Tool::Mcp, OpenAI::Models::Responses::Tool::CodeInterpreter, OpenAI::Models::Responses::Tool::ImageGeneration, OpenAI::Models::Responses::Tool::LocalShell, OpenAI::Models::Responses::WebSearchTool>, nil]
689
+ # @return [Array<OpenAI::Models::Responses::FunctionTool, OpenAI::Models::Responses::FileSearchTool, OpenAI::Models::Responses::ComputerTool, OpenAI::Models::Responses::Tool::Mcp, OpenAI::Models::Responses::Tool::CodeInterpreter, OpenAI::Models::Responses::Tool::ImageGeneration, OpenAI::Models::Responses::Tool::LocalShell, OpenAI::Models::Responses::CustomTool, OpenAI::Models::Responses::WebSearchTool>, nil]
690
690
  optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] }
691
691
 
692
692
  # @!attribute top_p
@@ -708,7 +708,7 @@ module OpenAI
708
708
  #
709
709
  # @param text [OpenAI::Models::Evals::RunCancelResponse::DataSource::Responses::SamplingParams::Text] Configuration options for a text response from the model. Can be plain
710
710
  #
711
- # @param tools [Array<OpenAI::Models::Responses::FunctionTool, OpenAI::Models::Responses::FileSearchTool, OpenAI::Models::Responses::ComputerTool, OpenAI::Models::Responses::Tool::Mcp, OpenAI::Models::Responses::Tool::CodeInterpreter, OpenAI::Models::Responses::Tool::ImageGeneration, OpenAI::Models::Responses::Tool::LocalShell, OpenAI::Models::Responses::WebSearchTool>] An array of tools the model may call while generating a response. You
711
+ # @param tools [Array<OpenAI::Models::Responses::FunctionTool, OpenAI::Models::Responses::FileSearchTool, OpenAI::Models::Responses::ComputerTool, OpenAI::Models::Responses::Tool::Mcp, OpenAI::Models::Responses::Tool::CodeInterpreter, OpenAI::Models::Responses::Tool::ImageGeneration, OpenAI::Models::Responses::Tool::LocalShell, OpenAI::Models::Responses::CustomTool, OpenAI::Models::Responses::WebSearchTool>] An array of tools the model may call while generating a response. You
712
712
  #
713
713
  # @param top_p [Float] An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
714
714
 
@@ -650,7 +650,7 @@ module OpenAI
650
650
  # the model to call your own code. Learn more about
651
651
  # [function calling](https://platform.openai.com/docs/guides/function-calling).
652
652
  #
653
- # @return [Array<OpenAI::Models::Responses::FunctionTool, OpenAI::Models::Responses::FileSearchTool, OpenAI::Models::Responses::ComputerTool, OpenAI::Models::Responses::Tool::Mcp, OpenAI::Models::Responses::Tool::CodeInterpreter, OpenAI::Models::Responses::Tool::ImageGeneration, OpenAI::Models::Responses::Tool::LocalShell, OpenAI::Models::Responses::WebSearchTool>, nil]
653
+ # @return [Array<OpenAI::Models::Responses::FunctionTool, OpenAI::Models::Responses::FileSearchTool, OpenAI::Models::Responses::ComputerTool, OpenAI::Models::Responses::Tool::Mcp, OpenAI::Models::Responses::Tool::CodeInterpreter, OpenAI::Models::Responses::Tool::ImageGeneration, OpenAI::Models::Responses::Tool::LocalShell, OpenAI::Models::Responses::CustomTool, OpenAI::Models::Responses::WebSearchTool>, nil]
654
654
  optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] }
655
655
 
656
656
  # @!attribute top_p
@@ -672,7 +672,7 @@ module OpenAI
672
672
  #
673
673
  # @param text [OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text] Configuration options for a text response from the model. Can be plain
674
674
  #
675
- # @param tools [Array<OpenAI::Models::Responses::FunctionTool, OpenAI::Models::Responses::FileSearchTool, OpenAI::Models::Responses::ComputerTool, OpenAI::Models::Responses::Tool::Mcp, OpenAI::Models::Responses::Tool::CodeInterpreter, OpenAI::Models::Responses::Tool::ImageGeneration, OpenAI::Models::Responses::Tool::LocalShell, OpenAI::Models::Responses::WebSearchTool>] An array of tools the model may call while generating a response. You
675
+ # @param tools [Array<OpenAI::Models::Responses::FunctionTool, OpenAI::Models::Responses::FileSearchTool, OpenAI::Models::Responses::ComputerTool, OpenAI::Models::Responses::Tool::Mcp, OpenAI::Models::Responses::Tool::CodeInterpreter, OpenAI::Models::Responses::Tool::ImageGeneration, OpenAI::Models::Responses::Tool::LocalShell, OpenAI::Models::Responses::CustomTool, OpenAI::Models::Responses::WebSearchTool>] An array of tools the model may call while generating a response. You
676
676
  #
677
677
  # @param top_p [Float] An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
678
678