openai 0.78.0 → 0.80.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +99 -0
- data/README.md +241 -8
- data/SECURITY.md +6 -22
- data/azure.md +110 -0
- data/bedrock.md +197 -0
- data/examples/mtls_custom_http_client.rb +61 -0
- data/lib/openai/auth/workload_identity.rb +13 -2
- data/lib/openai/auth/workload_identity_auth.rb +2 -1
- data/lib/openai/client.rb +29 -6
- data/lib/openai/errors.rb +11 -1
- data/lib/openai/helpers/streaming/chat_completion_stream.rb +3 -3
- data/lib/openai/helpers/streaming/response_stream.rb +5 -6
- data/lib/openai/helpers/structured_output/base_model.rb +20 -19
- data/lib/openai/helpers/structured_output/json_schema_converter.rb +12 -5
- data/lib/openai/http_client.rb +99 -7
- data/lib/openai/internal/conversation_cursor_page.rb +5 -6
- data/lib/openai/internal/cursor_page.rb +3 -3
- data/lib/openai/internal/logging.rb +419 -0
- data/lib/openai/internal/next_cursor_page.rb +5 -6
- data/lib/openai/internal/page.rb +2 -2
- data/lib/openai/internal/provider.rb +7 -1
- data/lib/openai/internal/read_io_adapter.rb +42 -18
- data/lib/openai/internal/stream.rb +2 -2
- data/lib/openai/internal/transport/base_client.rb +137 -37
- data/lib/openai/internal/type/array_of.rb +6 -4
- data/lib/openai/internal/type/base_model.rb +39 -1
- data/lib/openai/internal/type/base_page.rb +19 -2
- data/lib/openai/internal/type/base_stream.rb +39 -7
- data/lib/openai/internal/type/hash_of.rb +3 -3
- data/lib/openai/internal/util.rb +52 -27
- data/lib/openai/models/admin/organization/audit_log_list_params.rb +3 -1
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +33 -11
- data/lib/openai/models/admin/organization/groups/role_list_response.rb +5 -1
- data/lib/openai/models/admin/organization/groups/role_retrieve_response.rb +5 -1
- data/lib/openai/models/admin/organization/projects/groups/role_list_response.rb +6 -1
- data/lib/openai/models/admin/organization/projects/groups/role_retrieve_response.rb +6 -1
- data/lib/openai/models/admin/organization/projects/service_account_create_response.rb +3 -1
- data/lib/openai/models/admin/organization/projects/users/role_list_response.rb +6 -1
- data/lib/openai/models/admin/organization/projects/users/role_retrieve_response.rb +6 -1
- data/lib/openai/models/admin/organization/users/role_list_response.rb +5 -1
- data/lib/openai/models/admin/organization/users/role_retrieve_response.rb +5 -1
- data/lib/openai/models/all_models.rb +5 -0
- data/lib/openai/models/audio/transcription_create_params.rb +7 -1
- data/lib/openai/models/audio/translation_create_params.rb +7 -1
- data/lib/openai/models/beta/beta_mcp_tool_call_error.rb +84 -0
- data/lib/openai/models/beta/beta_response.rb +27 -0
- data/lib/openai/models/beta/beta_response_input_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_output_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_output_item_added_event.rb +5 -2
- data/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb +201 -4
- data/lib/openai/models/beta/beta_response_reasoning_item.rb +5 -0
- data/lib/openai/models/beta/beta_response_stream_event.rb +1 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +46 -3
- data/lib/openai/models/beta/beta_responses_server_event.rb +1143 -63
- data/lib/openai/models/beta/beta_web_search_tool.rb +11 -1
- data/lib/openai/models/beta/response_compact_params.rb +18 -0
- data/lib/openai/models/beta/response_create_params.rb +27 -0
- data/lib/openai/models/chat_model.rb +1 -0
- data/lib/openai/models/completion_usage.rb +26 -2
- data/lib/openai/models/containers/file_create_params.rb +4 -0
- data/lib/openai/models/content_provenance_check_create_params.rb +4 -0
- data/lib/openai/models/conversations/conversation_item.rb +3 -3
- data/lib/openai/models/file_create_params.rb +4 -0
- data/lib/openai/models/image_create_variation_params.rb +4 -0
- data/lib/openai/models/image_edit_params.rb +8 -0
- data/lib/openai/models/model.rb +9 -1
- data/lib/openai/models/responses/mcp_tool_call_error.rb +82 -0
- data/lib/openai/models/responses/response.rb +9 -0
- data/lib/openai/models/responses/response_compact_params.rb +18 -0
- data/lib/openai/models/responses/response_create_params.rb +9 -0
- data/lib/openai/models/responses/response_input_item.rb +3 -3
- data/lib/openai/models/responses/response_item.rb +3 -3
- data/lib/openai/models/responses/response_output_item.rb +3 -3
- data/lib/openai/models/responses/response_output_item_added_event.rb +5 -2
- data/lib/openai/models/responses/response_output_text_annotation_added_event.rb +201 -4
- data/lib/openai/models/responses/response_reasoning_item.rb +5 -0
- data/lib/openai/models/responses/response_stream_event.rb +1 -1
- data/lib/openai/models/responses/responses_client_event.rb +22 -1
- data/lib/openai/models/responses/responses_server_event.rb +1107 -56
- data/lib/openai/models/responses/web_search_tool.rb +11 -1
- data/lib/openai/models/responses_model.rb +5 -0
- data/lib/openai/models/skill_create_params.rb +4 -0
- data/lib/openai/models/skills/version_create_params.rb +4 -0
- data/lib/openai/models/uploads/part_create_params.rb +4 -0
- data/lib/openai/models/vector_store_search_response.rb +3 -1
- data/lib/openai/models/video_create_character_params.rb +4 -0
- data/lib/openai/models/video_create_params.rb +4 -0
- data/lib/openai/models/video_edit_params.rb +4 -0
- data/lib/openai/models/video_extend_params.rb +4 -0
- data/lib/openai/models.rb +9 -1
- data/lib/openai/net_http_client.rb +20 -6
- data/lib/openai/providers/azure.rb +216 -0
- data/lib/openai/providers/bedrock.rb +130 -17
- data/lib/openai/resources/admin/organization/projects/groups/roles.rb +1 -1
- data/lib/openai/resources/admin/organization/projects/groups.rb +1 -1
- data/lib/openai/resources/admin/organization/projects/users/roles.rb +1 -1
- data/lib/openai/resources/admin/organization/projects.rb +4 -2
- data/lib/openai/resources/audio/transcriptions.rb +8 -0
- data/lib/openai/resources/audio/translations.rb +4 -0
- data/lib/openai/resources/beta/responses.rb +1 -1
- data/lib/openai/resources/beta/threads/runs/steps.rb +2 -2
- data/lib/openai/resources/containers/files.rb +4 -0
- data/lib/openai/resources/content_provenance_checks.rb +4 -0
- data/lib/openai/resources/conversations/items.rb +1 -1
- data/lib/openai/resources/evals/runs/output_items.rb +1 -1
- data/lib/openai/resources/files.rb +5 -1
- data/lib/openai/resources/images.rb +12 -0
- data/lib/openai/resources/responses.rb +3 -2
- data/lib/openai/resources/skills/versions.rb +4 -0
- data/lib/openai/resources/skills.rb +4 -0
- data/lib/openai/resources/uploads/parts.rb +4 -0
- data/lib/openai/resources/vector_stores/file_batches.rb +1 -1
- data/lib/openai/resources/videos.rb +38 -0
- data/lib/openai/resources/webhooks.rb +18 -6
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +111 -105
- data/rbi/openai/auth.rbi +4 -4
- data/rbi/openai/client.rbi +13 -3
- data/rbi/openai/errors.rbi +7 -0
- data/rbi/openai/helpers/streaming/events.rbi +12 -0
- data/rbi/openai/http_client.rbi +62 -2
- data/rbi/openai/internal/logging.rbi +192 -0
- data/rbi/openai/internal/provider.rbi +3 -0
- data/rbi/openai/internal/read_io_adapter.rbi +6 -1
- data/rbi/openai/internal/transport/base_client.rbi +61 -7
- data/rbi/openai/internal/type/base_model.rbi +24 -1
- data/rbi/openai/internal/type/base_page.rbi +13 -2
- data/rbi/openai/internal/type/base_stream.rbi +15 -4
- data/rbi/openai/internal/util.rbi +26 -2
- data/rbi/openai/models/admin/organization/audit_log_list_params.rbi +5 -0
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +5 -0
- data/rbi/openai/models/all_models.rbi +25 -0
- data/rbi/openai/models/audio/transcription_create_params.rbi +14 -2
- data/rbi/openai/models/audio/translation_create_params.rbi +14 -2
- data/rbi/openai/models/beta/beta_mcp_tool_call_error.rbi +122 -0
- data/rbi/openai/models/beta/beta_response.rbi +47 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_output_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_output_item_added_event.rbi +8 -2
- data/rbi/openai/models/beta/beta_response_output_text_annotation_added_event.rbi +297 -5
- data/rbi/openai/models/beta/beta_response_reasoning_item.rbi +10 -0
- data/rbi/openai/models/beta/beta_response_stream_event.rbi +1 -1
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +69 -1
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +3945 -54
- data/rbi/openai/models/beta/beta_web_search_tool.rbi +15 -0
- data/rbi/openai/models/beta/response_compact_params.rbi +30 -0
- data/rbi/openai/models/beta/response_create_params.rbi +47 -0
- data/rbi/openai/models/chat_model.rbi +2 -0
- data/rbi/openai/models/completion_usage.rbi +39 -6
- data/rbi/openai/models/containers/file_create_params.rbi +8 -0
- data/rbi/openai/models/content_provenance_check_create_params.rbi +8 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +12 -3
- data/rbi/openai/models/file_create_params.rbi +8 -0
- data/rbi/openai/models/image_create_variation_params.rbi +8 -0
- data/rbi/openai/models/image_edit_params.rbi +16 -0
- data/rbi/openai/models/model.rbi +14 -1
- data/rbi/openai/models/responses/mcp_tool_call_error.rbi +120 -0
- data/rbi/openai/models/responses/response.rbi +17 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +30 -0
- data/rbi/openai/models/responses/response_create_params.rbi +17 -0
- data/rbi/openai/models/responses/response_input_item.rbi +27 -3
- data/rbi/openai/models/responses/response_item.rbi +27 -3
- data/rbi/openai/models/responses/response_output_item.rbi +27 -3
- data/rbi/openai/models/responses/response_output_item_added_event.rbi +8 -2
- data/rbi/openai/models/responses/response_output_text_annotation_added_event.rbi +297 -5
- data/rbi/openai/models/responses/response_reasoning_item.rbi +10 -0
- data/rbi/openai/models/responses/response_stream_event.rbi +1 -1
- data/rbi/openai/models/responses/responses_client_event.rbi +36 -0
- data/rbi/openai/models/responses/responses_server_event.rbi +3385 -53
- data/rbi/openai/models/responses/web_search_tool.rbi +15 -0
- data/rbi/openai/models/responses_model.rbi +25 -0
- data/rbi/openai/models/skill_create_params.rbi +8 -0
- data/rbi/openai/models/skills/version_create_params.rbi +8 -0
- data/rbi/openai/models/uploads/part_create_params.rbi +8 -0
- data/rbi/openai/models/video_create_character_params.rbi +8 -0
- data/rbi/openai/models/video_create_params.rbi +8 -0
- data/rbi/openai/models/video_edit_params.rbi +8 -0
- data/rbi/openai/models/video_extend_params.rbi +8 -0
- data/rbi/openai/net_http_client.rbi +2 -2
- data/rbi/openai/providers.rbi +11 -0
- data/rbi/openai/resources/audio/transcriptions.rbi +14 -2
- data/rbi/openai/resources/audio/translations.rbi +7 -1
- data/rbi/openai/resources/beta/responses.rbi +8 -0
- data/rbi/openai/resources/containers/files.rbi +4 -0
- data/rbi/openai/resources/content_provenance_checks.rbi +4 -0
- data/rbi/openai/resources/files.rbi +5 -1
- data/rbi/openai/resources/images.rbi +20 -0
- data/rbi/openai/resources/responses.rbi +8 -0
- data/rbi/openai/resources/skills/versions.rbi +4 -0
- data/rbi/openai/resources/skills.rbi +4 -0
- data/rbi/openai/resources/uploads/parts.rbi +4 -0
- data/rbi/openai/resources/videos.rbi +16 -0
- data/sig/openai/client.rbs +6 -2
- data/sig/openai/errors.rbs +5 -0
- data/sig/openai/http_client.rbs +37 -2
- data/sig/openai/internal/logging.rbs +88 -0
- data/sig/openai/internal/provider.rbs +3 -1
- data/sig/openai/internal/read_io_adapter.rbs +3 -1
- data/sig/openai/internal/transport/base_client.rbs +33 -5
- data/sig/openai/internal/type/base_model.rbs +13 -0
- data/sig/openai/internal/type/base_page.rbs +8 -1
- data/sig/openai/internal/type/base_stream.rbs +8 -2
- data/sig/openai/internal/util.rbs +12 -0
- data/sig/openai/models/admin/organization/audit_log_list_params.rbs +2 -0
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +2 -0
- data/sig/openai/models/all_models.rbs +10 -0
- data/sig/openai/models/beta/beta_mcp_tool_call_error.rbs +75 -0
- data/sig/openai/models/beta/beta_response.rbs +14 -1
- data/sig/openai/models/beta/beta_response_input_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +149 -4
- data/sig/openai/models/beta/beta_responses_client_event.rbs +21 -1
- data/sig/openai/models/beta/beta_responses_server_event.rbs +2005 -53
- data/sig/openai/models/beta/beta_web_search_tool.rbs +7 -0
- data/sig/openai/models/beta/response_compact_params.rbs +12 -0
- data/sig/openai/models/beta/response_create_params.rbs +14 -1
- data/sig/openai/models/chat_model.rbs +2 -0
- data/sig/openai/models/completion_usage.rbs +27 -6
- data/sig/openai/models/conversations/conversation_item.rbs +4 -4
- data/sig/openai/models/model.rbs +12 -2
- data/sig/openai/models/responses/mcp_tool_call_error.rbs +73 -0
- data/sig/openai/models/responses/response.rbs +2 -1
- data/sig/openai/models/responses/response_compact_params.rbs +12 -0
- data/sig/openai/models/responses/response_create_params.rbs +2 -1
- data/sig/openai/models/responses/response_input_item.rbs +4 -4
- data/sig/openai/models/responses/response_item.rbs +4 -4
- data/sig/openai/models/responses/response_output_item.rbs +4 -4
- data/sig/openai/models/responses/response_output_text_annotation_added_event.rbs +149 -4
- data/sig/openai/models/responses/responses_client_event.rbs +9 -1
- data/sig/openai/models/responses/responses_server_event.rbs +1834 -53
- data/sig/openai/models/responses/web_search_tool.rbs +7 -0
- data/sig/openai/models/responses_model.rbs +10 -0
- data/sig/openai/net_http_client.rbs +2 -2
- data/sig/openai/providers.rbs +7 -0
- metadata +30 -1
|
@@ -5,10 +5,12 @@ module OpenAI
|
|
|
5
5
|
module Responses
|
|
6
6
|
class ResponseOutputTextAnnotationAddedEvent < OpenAI::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute annotation
|
|
8
|
-
#
|
|
8
|
+
# An annotation that applies to a span of output text.
|
|
9
9
|
#
|
|
10
|
-
# @return [
|
|
11
|
-
required :annotation,
|
|
10
|
+
# @return [OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil]
|
|
11
|
+
required :annotation,
|
|
12
|
+
union: -> { OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation },
|
|
13
|
+
nil?: true
|
|
12
14
|
|
|
13
15
|
# @!attribute annotation_index
|
|
14
16
|
# The index of the annotation within the content part.
|
|
@@ -49,7 +51,7 @@ module OpenAI
|
|
|
49
51
|
# @!method initialize(annotation:, annotation_index:, content_index:, item_id:, output_index:, sequence_number:, type: :"response.output_text.annotation.added")
|
|
50
52
|
# Emitted when an annotation is added to output text content.
|
|
51
53
|
#
|
|
52
|
-
# @param annotation [
|
|
54
|
+
# @param annotation [OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil] An annotation that applies to a span of output text.
|
|
53
55
|
#
|
|
54
56
|
# @param annotation_index [Integer] The index of the annotation within the content part.
|
|
55
57
|
#
|
|
@@ -62,6 +64,201 @@ module OpenAI
|
|
|
62
64
|
# @param sequence_number [Integer] The sequence number of this event.
|
|
63
65
|
#
|
|
64
66
|
# @param type [Symbol, :"response.output_text.annotation.added"] The type of the event. Always 'response.output_text.annotation.added'.
|
|
67
|
+
|
|
68
|
+
# An annotation that applies to a span of output text.
|
|
69
|
+
#
|
|
70
|
+
# @see OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent#annotation
|
|
71
|
+
module Annotation
|
|
72
|
+
extend OpenAI::Internal::Type::Union
|
|
73
|
+
|
|
74
|
+
discriminator :type
|
|
75
|
+
|
|
76
|
+
# A citation to a file.
|
|
77
|
+
variant :file_citation,
|
|
78
|
+
-> { OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation }
|
|
79
|
+
|
|
80
|
+
# A citation for a web resource used to generate a model response.
|
|
81
|
+
variant :url_citation,
|
|
82
|
+
-> { OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation }
|
|
83
|
+
|
|
84
|
+
# A citation for a container file used to generate a model response.
|
|
85
|
+
variant :container_file_citation,
|
|
86
|
+
-> { OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation }
|
|
87
|
+
|
|
88
|
+
# A path to a file.
|
|
89
|
+
variant :file_path, -> { OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath }
|
|
90
|
+
|
|
91
|
+
class FileCitation < OpenAI::Internal::Type::BaseModel
|
|
92
|
+
# @!attribute file_id
|
|
93
|
+
# The ID of the file.
|
|
94
|
+
#
|
|
95
|
+
# @return [String]
|
|
96
|
+
required :file_id, String
|
|
97
|
+
|
|
98
|
+
# @!attribute filename
|
|
99
|
+
# The filename of the file cited.
|
|
100
|
+
#
|
|
101
|
+
# @return [String]
|
|
102
|
+
required :filename, String
|
|
103
|
+
|
|
104
|
+
# @!attribute index
|
|
105
|
+
# The index of the file in the list of files.
|
|
106
|
+
#
|
|
107
|
+
# @return [Integer]
|
|
108
|
+
required :index, Integer
|
|
109
|
+
|
|
110
|
+
# @!attribute type
|
|
111
|
+
# The type of the file citation. Always `file_citation`.
|
|
112
|
+
#
|
|
113
|
+
# @return [Symbol, :file_citation]
|
|
114
|
+
required :type, const: :file_citation
|
|
115
|
+
|
|
116
|
+
# @!method initialize(file_id:, filename:, index:, type: :file_citation)
|
|
117
|
+
# A citation to a file.
|
|
118
|
+
#
|
|
119
|
+
# @param file_id [String] The ID of the file.
|
|
120
|
+
#
|
|
121
|
+
# @param filename [String] The filename of the file cited.
|
|
122
|
+
#
|
|
123
|
+
# @param index [Integer] The index of the file in the list of files.
|
|
124
|
+
#
|
|
125
|
+
# @param type [Symbol, :file_citation] The type of the file citation. Always `file_citation`.
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
class URLCitation < OpenAI::Internal::Type::BaseModel
|
|
129
|
+
# @!attribute end_index
|
|
130
|
+
# The index of the last character of the URL citation in the message.
|
|
131
|
+
#
|
|
132
|
+
# @return [Integer]
|
|
133
|
+
required :end_index, Integer
|
|
134
|
+
|
|
135
|
+
# @!attribute start_index
|
|
136
|
+
# The index of the first character of the URL citation in the message.
|
|
137
|
+
#
|
|
138
|
+
# @return [Integer]
|
|
139
|
+
required :start_index, Integer
|
|
140
|
+
|
|
141
|
+
# @!attribute title
|
|
142
|
+
# The title of the web resource.
|
|
143
|
+
#
|
|
144
|
+
# @return [String]
|
|
145
|
+
required :title, String
|
|
146
|
+
|
|
147
|
+
# @!attribute type
|
|
148
|
+
# The type of the URL citation. Always `url_citation`.
|
|
149
|
+
#
|
|
150
|
+
# @return [Symbol, :url_citation]
|
|
151
|
+
required :type, const: :url_citation
|
|
152
|
+
|
|
153
|
+
# @!attribute url
|
|
154
|
+
# The URL of the web resource.
|
|
155
|
+
#
|
|
156
|
+
# @return [String]
|
|
157
|
+
required :url, String
|
|
158
|
+
|
|
159
|
+
# @!method initialize(end_index:, start_index:, title:, url:, type: :url_citation)
|
|
160
|
+
# A citation for a web resource used to generate a model response.
|
|
161
|
+
#
|
|
162
|
+
# @param end_index [Integer] The index of the last character of the URL citation in the message.
|
|
163
|
+
#
|
|
164
|
+
# @param start_index [Integer] The index of the first character of the URL citation in the message.
|
|
165
|
+
#
|
|
166
|
+
# @param title [String] The title of the web resource.
|
|
167
|
+
#
|
|
168
|
+
# @param url [String] The URL of the web resource.
|
|
169
|
+
#
|
|
170
|
+
# @param type [Symbol, :url_citation] The type of the URL citation. Always `url_citation`.
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
class ContainerFileCitation < OpenAI::Internal::Type::BaseModel
|
|
174
|
+
# @!attribute container_id
|
|
175
|
+
# The ID of the container file.
|
|
176
|
+
#
|
|
177
|
+
# @return [String]
|
|
178
|
+
required :container_id, String
|
|
179
|
+
|
|
180
|
+
# @!attribute end_index
|
|
181
|
+
# The index of the last character of the container file citation in the message.
|
|
182
|
+
#
|
|
183
|
+
# @return [Integer]
|
|
184
|
+
required :end_index, Integer
|
|
185
|
+
|
|
186
|
+
# @!attribute file_id
|
|
187
|
+
# The ID of the file.
|
|
188
|
+
#
|
|
189
|
+
# @return [String]
|
|
190
|
+
required :file_id, String
|
|
191
|
+
|
|
192
|
+
# @!attribute filename
|
|
193
|
+
# The filename of the container file cited.
|
|
194
|
+
#
|
|
195
|
+
# @return [String]
|
|
196
|
+
required :filename, String
|
|
197
|
+
|
|
198
|
+
# @!attribute start_index
|
|
199
|
+
# The index of the first character of the container file citation in the message.
|
|
200
|
+
#
|
|
201
|
+
# @return [Integer]
|
|
202
|
+
required :start_index, Integer
|
|
203
|
+
|
|
204
|
+
# @!attribute type
|
|
205
|
+
# The type of the container file citation. Always `container_file_citation`.
|
|
206
|
+
#
|
|
207
|
+
# @return [Symbol, :container_file_citation]
|
|
208
|
+
required :type, const: :container_file_citation
|
|
209
|
+
|
|
210
|
+
# @!method initialize(container_id:, end_index:, file_id:, filename:, start_index:, type: :container_file_citation)
|
|
211
|
+
# A citation for a container file used to generate a model response.
|
|
212
|
+
#
|
|
213
|
+
# @param container_id [String] The ID of the container file.
|
|
214
|
+
#
|
|
215
|
+
# @param end_index [Integer] The index of the last character of the container file citation in the message.
|
|
216
|
+
#
|
|
217
|
+
# @param file_id [String] The ID of the file.
|
|
218
|
+
#
|
|
219
|
+
# @param filename [String] The filename of the container file cited.
|
|
220
|
+
#
|
|
221
|
+
# @param start_index [Integer] The index of the first character of the container file citation in the message.
|
|
222
|
+
#
|
|
223
|
+
# @param type [Symbol, :container_file_citation] The type of the container file citation. Always `container_file_citation`.
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
class FilePath < OpenAI::Internal::Type::BaseModel
|
|
227
|
+
# @!attribute file_id
|
|
228
|
+
# The ID of the file.
|
|
229
|
+
#
|
|
230
|
+
# @return [String]
|
|
231
|
+
required :file_id, String
|
|
232
|
+
|
|
233
|
+
# @!attribute index
|
|
234
|
+
# The index of the file in the list of files.
|
|
235
|
+
#
|
|
236
|
+
# @return [Integer]
|
|
237
|
+
required :index, Integer
|
|
238
|
+
|
|
239
|
+
# @!attribute type
|
|
240
|
+
# The type of the file path. Always `file_path`.
|
|
241
|
+
#
|
|
242
|
+
# @return [Symbol, :file_path]
|
|
243
|
+
required :type, const: :file_path
|
|
244
|
+
|
|
245
|
+
# @!method initialize(file_id:, index:, type: :file_path)
|
|
246
|
+
# Some parameter documentations has been truncated, see
|
|
247
|
+
# {OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath}
|
|
248
|
+
# for more details.
|
|
249
|
+
#
|
|
250
|
+
# A path to a file.
|
|
251
|
+
#
|
|
252
|
+
# @param file_id [String] The ID of the file.
|
|
253
|
+
#
|
|
254
|
+
# @param index [Integer] The index of the file in the list of files.
|
|
255
|
+
#
|
|
256
|
+
# @param type [Symbol, :file_path] The type of the file path. Always `file_path`.
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# @!method self.variants
|
|
260
|
+
# @return [Array(OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath)]
|
|
261
|
+
end
|
|
65
262
|
end
|
|
66
263
|
end
|
|
67
264
|
end
|
|
@@ -35,6 +35,11 @@ module OpenAI
|
|
|
35
35
|
# reasoning items returned by `POST /v1/responses` and WebSocket `response.create`
|
|
36
36
|
# requests.
|
|
37
37
|
#
|
|
38
|
+
# When streaming, use the completed reasoning item and its `encrypted_content`
|
|
39
|
+
# from the `response.output_item.done` event in subsequent requests. The
|
|
40
|
+
# `encrypted_content` in `response.output_item.added` may be incomplete. This is
|
|
41
|
+
# especially important when `store` is `false` or when using Zero Data Retention.
|
|
42
|
+
#
|
|
38
43
|
# @return [String, nil]
|
|
39
44
|
optional :encrypted_content, String, nil?: true
|
|
40
45
|
|
|
@@ -238,6 +238,10 @@ module OpenAI
|
|
|
238
238
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
239
239
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
240
240
|
# request.
|
|
241
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
242
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
243
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
244
|
+
# `service_tier=ultrafast`.
|
|
241
245
|
# - When not set, the default behavior is 'auto'.
|
|
242
246
|
#
|
|
243
247
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -265,6 +269,16 @@ module OpenAI
|
|
|
265
269
|
# @return [Boolean, nil]
|
|
266
270
|
optional :stream, OpenAI::Internal::Type::Boolean, nil?: true
|
|
267
271
|
|
|
272
|
+
# @!attribute stream_id
|
|
273
|
+
# The WebSocket lane for this response. Requests with the same `stream_id` are
|
|
274
|
+
# processed FIFO, and events for the response echo the same `stream_id`.
|
|
275
|
+
#
|
|
276
|
+
# `stream_id` controls routing; `previous_response_id` controls conversation
|
|
277
|
+
# lineage, so a new lane can fork from a response created on another lane.
|
|
278
|
+
#
|
|
279
|
+
# @return [String, nil]
|
|
280
|
+
optional :stream_id, String
|
|
281
|
+
|
|
268
282
|
# @!attribute stream_options
|
|
269
283
|
# Options for streaming responses. Only set this when you set `stream: true`.
|
|
270
284
|
#
|
|
@@ -366,7 +380,7 @@ module OpenAI
|
|
|
366
380
|
# @return [String, nil]
|
|
367
381
|
optional :user, String
|
|
368
382
|
|
|
369
|
-
# @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
|
|
383
|
+
# @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
|
|
370
384
|
# Some parameter documentations has been truncated, see
|
|
371
385
|
# {OpenAI::Models::Responses::ResponsesClientEvent} for more details.
|
|
372
386
|
#
|
|
@@ -414,6 +428,8 @@ module OpenAI
|
|
|
414
428
|
#
|
|
415
429
|
# @param stream [Boolean, nil] If set to true, the model response data will be streamed to the client
|
|
416
430
|
#
|
|
431
|
+
# @param stream_id [String] The WebSocket lane for this response. Requests with the same
|
|
432
|
+
#
|
|
417
433
|
# @param stream_options [OpenAI::Models::Responses::ResponsesClientEvent::StreamOptions, nil] Options for streaming responses. Only set this when you set `stream: true`.
|
|
418
434
|
#
|
|
419
435
|
# @param temperature [Float, nil] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will m
|
|
@@ -720,6 +736,10 @@ module OpenAI
|
|
|
720
736
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
721
737
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
722
738
|
# request.
|
|
739
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
740
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
741
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
742
|
+
# `service_tier=ultrafast`.
|
|
723
743
|
# - When not set, the default behavior is 'auto'.
|
|
724
744
|
#
|
|
725
745
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -737,6 +757,7 @@ module OpenAI
|
|
|
737
757
|
SCALE = :scale
|
|
738
758
|
PRIORITY = :priority
|
|
739
759
|
FAST = :fast
|
|
760
|
+
ULTRAFAST = :ultrafast
|
|
740
761
|
|
|
741
762
|
# @!method self.values
|
|
742
763
|
# @return [Array<Symbol>]
|