openai 0.113.0 → 0.114.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 +18 -0
- data/README.md +1 -1
- data/lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb +10 -8
- data/lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb +8 -7
- data/lib/openai/models/beta/beta_response_input_file.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_file_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_image.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_image_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_text.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_text_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_item.rb +9 -9
- data/lib/openai/models/beta/beta_response_output_item.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_image.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_input_audio.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_text.rb +9 -9
- data/lib/openai/models/conversations/computer_screenshot_content.rb +9 -9
- data/lib/openai/models/responses/response_input_file.rb +9 -9
- data/lib/openai/models/responses/response_input_file_content.rb +9 -9
- data/lib/openai/models/responses/response_input_image.rb +9 -9
- data/lib/openai/models/responses/response_input_image_content.rb +9 -9
- data/lib/openai/models/responses/response_input_text.rb +9 -9
- data/lib/openai/models/responses/response_input_text_content.rb +9 -9
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/beta/beta_response_input_file.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_file_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_image.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_image_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_text.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_text_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_item.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_output_item.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_text.rbi +9 -9
- data/rbi/openai/models/conversations/computer_screenshot_content.rbi +9 -9
- data/rbi/openai/models/responses/response_input_file.rbi +9 -9
- data/rbi/openai/models/responses/response_input_file_content.rbi +9 -9
- data/rbi/openai/models/responses/response_input_image.rbi +9 -9
- data/rbi/openai/models/responses/response_input_image_content.rbi +9 -9
- data/rbi/openai/models/responses/response_input_text.rbi +9 -9
- data/rbi/openai/models/responses/response_input_text_content.rbi +9 -9
- data/sig/openai/models/beta/beta_response_input_file.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_file_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_input_image.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_image_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_input_text.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_text_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_item.rbs +9 -9
- data/sig/openai/models/beta/beta_response_output_item.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_text.rbs +9 -9
- data/sig/openai/models/conversations/computer_screenshot_content.rbs +9 -9
- data/sig/openai/models/responses/response_input_file.rbs +9 -9
- data/sig/openai/models/responses/response_input_file_content.rbs +6 -6
- data/sig/openai/models/responses/response_input_image.rbs +9 -9
- data/sig/openai/models/responses/response_input_image_content.rbs +6 -6
- data/sig/openai/models/responses/response_input_text.rbs +9 -9
- data/sig/openai/models/responses/response_input_text_content.rbs +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f8905b3e720546308f3334931a036c17e3e990e66ec863039da6c661d6024dec
|
|
4
|
+
data.tar.gz: 4698d4841fd6becc4266b58c8b863e3fb7b50a16d4b76523808ac291e5c566f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e664a8f9ee816f4deb836f3b03b1d82a5178f9d8e85fa42a25530e1b3d514273dbefd17da517837b5ef197e51c0e16abcf85c845491744278339903abc3b1502
|
|
7
|
+
data.tar.gz: 6398277b839b172914d849d071a4994d8a2c0e90ef74cde85ce76f27c940753b000e0f709f05a1d1e0f9ab8fdb7c44ce3cb77f5f6f8fcde257fbd4cdc466673c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.114.0](https://github.com/openai/openai-ruby/compare/v0.113.0...v0.114.0) (2026-10-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** add prompt cache breakpoint TTL options ([#977](https://github.com/openai/openai-ruby/issues/977)) ([cc896f4](https://github.com/openai/openai-ruby/commit/cc896f44aa0ae894c9ef26e28b7700a4c521e75f))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* sanitize cloud metadata provider errors ([#971](https://github.com/openai/openai-ruby/issues/971)) ([806f5b6](https://github.com/openai/openai-ruby/commit/806f5b67f9dc17871300862eb1107e87a52a062b))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Chores
|
|
17
|
+
|
|
18
|
+
* **deps-dev:** bump the development-dependencies group with 2 updates ([#968](https://github.com/openai/openai-ruby/issues/968)) ([a3c5ba1](https://github.com/openai/openai-ruby/commit/a3c5ba1f0d5b936f5a631a7acabc92151c70cb14))
|
|
19
|
+
* **deps:** bump ruby/setup-ruby from 1.332.0 to 1.335.0 ([#970](https://github.com/openai/openai-ruby/issues/970)) ([3c7c446](https://github.com/openai/openai-ruby/commit/3c7c4469c802184715900db771341cd2272fd547))
|
|
20
|
+
|
|
3
21
|
## [0.113.0](https://github.com/openai/openai-ruby/compare/v0.112.0...v0.113.0) (2026-10-26)
|
|
4
22
|
|
|
5
23
|
|
data/README.md
CHANGED
|
@@ -59,9 +59,10 @@ module OpenAI
|
|
|
59
59
|
unless response.is_a?(Net::HTTPSuccess)
|
|
60
60
|
raise(
|
|
61
61
|
OpenAI::Errors::SubjectTokenProviderError.new(
|
|
62
|
-
message: "Azure IMDS returned #{response.code}
|
|
62
|
+
message: "Azure IMDS returned #{response.code}",
|
|
63
63
|
provider: "azure-imds"
|
|
64
|
-
)
|
|
64
|
+
),
|
|
65
|
+
cause: nil
|
|
65
66
|
)
|
|
66
67
|
end
|
|
67
68
|
|
|
@@ -75,19 +76,20 @@ module OpenAI
|
|
|
75
76
|
OpenAI::Errors::SubjectTokenProviderError.new(
|
|
76
77
|
message: "Azure IMDS response missing access_token field",
|
|
77
78
|
provider: "azure-imds"
|
|
78
|
-
)
|
|
79
|
+
),
|
|
80
|
+
cause: nil
|
|
79
81
|
)
|
|
80
82
|
end
|
|
81
83
|
|
|
82
84
|
rescue OpenAI::Errors::SubjectTokenProviderError
|
|
83
85
|
raise
|
|
84
|
-
rescue StandardError
|
|
86
|
+
rescue StandardError
|
|
85
87
|
raise(
|
|
86
88
|
OpenAI::Errors::SubjectTokenProviderError.new(
|
|
87
|
-
message: "Failed to fetch token from Azure IMDS
|
|
88
|
-
provider: "azure-imds"
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
message: "Failed to fetch token from Azure IMDS",
|
|
90
|
+
provider: "azure-imds"
|
|
91
|
+
),
|
|
92
|
+
cause: nil
|
|
91
93
|
)
|
|
92
94
|
end
|
|
93
95
|
end
|
|
@@ -47,22 +47,23 @@ module OpenAI
|
|
|
47
47
|
unless response.is_a?(Net::HTTPSuccess)
|
|
48
48
|
raise(
|
|
49
49
|
OpenAI::Errors::SubjectTokenProviderError.new(
|
|
50
|
-
message: "GCP Metadata Server returned #{response.code}
|
|
50
|
+
message: "GCP Metadata Server returned #{response.code}",
|
|
51
51
|
provider: "gcp-metadata"
|
|
52
|
-
)
|
|
52
|
+
),
|
|
53
|
+
cause: nil
|
|
53
54
|
)
|
|
54
55
|
end
|
|
55
56
|
|
|
56
57
|
response.body
|
|
57
58
|
rescue OpenAI::Errors::SubjectTokenProviderError
|
|
58
59
|
raise
|
|
59
|
-
rescue StandardError
|
|
60
|
+
rescue StandardError
|
|
60
61
|
raise(
|
|
61
62
|
OpenAI::Errors::SubjectTokenProviderError.new(
|
|
62
|
-
message: "Failed to fetch token from GCP Metadata Server
|
|
63
|
-
provider: "gcp-metadata"
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
message: "Failed to fetch token from GCP Metadata Server",
|
|
64
|
+
provider: "gcp-metadata"
|
|
65
|
+
),
|
|
66
|
+
cause: nil
|
|
66
67
|
)
|
|
67
68
|
end
|
|
68
69
|
end
|
|
@@ -45,9 +45,9 @@ module OpenAI
|
|
|
45
45
|
optional :filename, String
|
|
46
46
|
|
|
47
47
|
# @!attribute prompt_cache_breakpoint
|
|
48
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
49
|
-
#
|
|
50
|
-
# token block.
|
|
48
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
49
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
50
|
+
# not rounded to a token block.
|
|
51
51
|
#
|
|
52
52
|
# @return [OpenAI::Models::Beta::BetaResponseInputFile::PromptCacheBreakpoint, nil]
|
|
53
53
|
optional :prompt_cache_breakpoint, -> { OpenAI::Beta::BetaResponseInputFile::PromptCacheBreakpoint }
|
|
@@ -75,9 +75,9 @@ module OpenAI
|
|
|
75
75
|
# The name of the file to be sent to the model.
|
|
76
76
|
#
|
|
77
77
|
# @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputFile::PromptCacheBreakpoint]
|
|
78
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
79
|
-
#
|
|
80
|
-
# token block.
|
|
78
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
79
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
80
|
+
# not rounded to a token block.
|
|
81
81
|
#
|
|
82
82
|
# @param type [Symbol, :input_file]
|
|
83
83
|
# The type of the input item. Always `input_file`.
|
|
@@ -115,9 +115,9 @@ module OpenAI
|
|
|
115
115
|
optional :ttl, enum: -> { OpenAI::Beta::BetaResponseInputFile::PromptCacheBreakpoint::Ttl }
|
|
116
116
|
|
|
117
117
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
118
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
119
|
-
#
|
|
120
|
-
# token block.
|
|
118
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
119
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
120
|
+
# not rounded to a token block.
|
|
121
121
|
#
|
|
122
122
|
# @param ttl [Symbol, OpenAI::Models::Beta::BetaResponseInputFile::PromptCacheBreakpoint::Ttl]
|
|
123
123
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -45,9 +45,9 @@ module OpenAI
|
|
|
45
45
|
optional :filename, String, nil?: true
|
|
46
46
|
|
|
47
47
|
# @!attribute prompt_cache_breakpoint
|
|
48
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
49
|
-
#
|
|
50
|
-
# token block.
|
|
48
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
49
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
50
|
+
# not rounded to a token block.
|
|
51
51
|
#
|
|
52
52
|
# @return [OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint, nil]
|
|
53
53
|
optional(
|
|
@@ -79,9 +79,9 @@ module OpenAI
|
|
|
79
79
|
# The name of the file to be sent to the model.
|
|
80
80
|
#
|
|
81
81
|
# @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint, nil]
|
|
82
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
83
|
-
#
|
|
84
|
-
# token block.
|
|
82
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
83
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
84
|
+
# not rounded to a token block.
|
|
85
85
|
#
|
|
86
86
|
# @param type [Symbol, :input_file]
|
|
87
87
|
# The type of the input item. Always `input_file`.
|
|
@@ -119,9 +119,9 @@ module OpenAI
|
|
|
119
119
|
optional :ttl, enum: -> { OpenAI::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint::Ttl }
|
|
120
120
|
|
|
121
121
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
122
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
123
|
-
#
|
|
124
|
-
# token block.
|
|
122
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
123
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
124
|
+
# not rounded to a token block.
|
|
125
125
|
#
|
|
126
126
|
# @param ttl [Symbol, OpenAI::Models::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint::Ttl]
|
|
127
127
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -31,9 +31,9 @@ module OpenAI
|
|
|
31
31
|
optional :image_url, String, nil?: true
|
|
32
32
|
|
|
33
33
|
# @!attribute prompt_cache_breakpoint
|
|
34
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
35
|
-
#
|
|
36
|
-
# token block.
|
|
34
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
35
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
36
|
+
# not rounded to a token block.
|
|
37
37
|
#
|
|
38
38
|
# @return [OpenAI::Models::Beta::BetaResponseInputImage::PromptCacheBreakpoint, nil]
|
|
39
39
|
optional :prompt_cache_breakpoint, -> { OpenAI::Beta::BetaResponseInputImage::PromptCacheBreakpoint }
|
|
@@ -54,9 +54,9 @@ module OpenAI
|
|
|
54
54
|
# encoded image in a data URL.
|
|
55
55
|
#
|
|
56
56
|
# @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputImage::PromptCacheBreakpoint]
|
|
57
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
58
|
-
#
|
|
59
|
-
# token block.
|
|
57
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
58
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
59
|
+
# not rounded to a token block.
|
|
60
60
|
#
|
|
61
61
|
# @param type [Symbol, :input_image]
|
|
62
62
|
# The type of the input item. Always `input_image`.
|
|
@@ -92,9 +92,9 @@ module OpenAI
|
|
|
92
92
|
optional :ttl, enum: -> { OpenAI::Beta::BetaResponseInputImage::PromptCacheBreakpoint::Ttl }
|
|
93
93
|
|
|
94
94
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
95
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
96
|
-
#
|
|
97
|
-
# token block.
|
|
95
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
96
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
97
|
+
# not rounded to a token block.
|
|
98
98
|
#
|
|
99
99
|
# @param ttl [Symbol, OpenAI::Models::Beta::BetaResponseInputImage::PromptCacheBreakpoint::Ttl]
|
|
100
100
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -31,9 +31,9 @@ module OpenAI
|
|
|
31
31
|
optional :image_url, String, nil?: true
|
|
32
32
|
|
|
33
33
|
# @!attribute prompt_cache_breakpoint
|
|
34
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
35
|
-
#
|
|
36
|
-
# token block.
|
|
34
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
35
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
36
|
+
# not rounded to a token block.
|
|
37
37
|
#
|
|
38
38
|
# @return [OpenAI::Models::Beta::BetaResponseInputImageContent::PromptCacheBreakpoint, nil]
|
|
39
39
|
optional(
|
|
@@ -58,9 +58,9 @@ module OpenAI
|
|
|
58
58
|
# encoded image in a data URL.
|
|
59
59
|
#
|
|
60
60
|
# @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputImageContent::PromptCacheBreakpoint, nil]
|
|
61
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
62
|
-
#
|
|
63
|
-
# token block.
|
|
61
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
62
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
63
|
+
# not rounded to a token block.
|
|
64
64
|
#
|
|
65
65
|
# @param type [Symbol, :input_image]
|
|
66
66
|
# The type of the input item. Always `input_image`.
|
|
@@ -96,9 +96,9 @@ module OpenAI
|
|
|
96
96
|
optional :ttl, enum: -> { OpenAI::Beta::BetaResponseInputImageContent::PromptCacheBreakpoint::Ttl }
|
|
97
97
|
|
|
98
98
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
99
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
100
|
-
#
|
|
101
|
-
# token block.
|
|
99
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
100
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
101
|
+
# not rounded to a token block.
|
|
102
102
|
#
|
|
103
103
|
# @param ttl [Symbol, OpenAI::Models::Beta::BetaResponseInputImageContent::PromptCacheBreakpoint::Ttl]
|
|
104
104
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -17,9 +17,9 @@ module OpenAI
|
|
|
17
17
|
required :type, const: :input_text
|
|
18
18
|
|
|
19
19
|
# @!attribute prompt_cache_breakpoint
|
|
20
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
21
|
-
#
|
|
22
|
-
# token block.
|
|
20
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
21
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
22
|
+
# not rounded to a token block.
|
|
23
23
|
#
|
|
24
24
|
# @return [OpenAI::Models::Beta::BetaResponseInputText::PromptCacheBreakpoint, nil]
|
|
25
25
|
optional :prompt_cache_breakpoint, -> { OpenAI::Beta::BetaResponseInputText::PromptCacheBreakpoint }
|
|
@@ -31,9 +31,9 @@ module OpenAI
|
|
|
31
31
|
# The text input to the model.
|
|
32
32
|
#
|
|
33
33
|
# @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputText::PromptCacheBreakpoint]
|
|
34
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
35
|
-
#
|
|
36
|
-
# token block.
|
|
34
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
35
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
36
|
+
# not rounded to a token block.
|
|
37
37
|
#
|
|
38
38
|
# @param type [Symbol, :input_text]
|
|
39
39
|
# The type of the input item. Always `input_text`.
|
|
@@ -53,9 +53,9 @@ module OpenAI
|
|
|
53
53
|
optional :ttl, enum: -> { OpenAI::Beta::BetaResponseInputText::PromptCacheBreakpoint::Ttl }
|
|
54
54
|
|
|
55
55
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
56
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
57
|
-
#
|
|
58
|
-
# token block.
|
|
56
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
57
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
58
|
+
# not rounded to a token block.
|
|
59
59
|
#
|
|
60
60
|
# @param ttl [Symbol, OpenAI::Models::Beta::BetaResponseInputText::PromptCacheBreakpoint::Ttl]
|
|
61
61
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -17,9 +17,9 @@ module OpenAI
|
|
|
17
17
|
required :type, const: :input_text
|
|
18
18
|
|
|
19
19
|
# @!attribute prompt_cache_breakpoint
|
|
20
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
21
|
-
#
|
|
22
|
-
# token block.
|
|
20
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
21
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
22
|
+
# not rounded to a token block.
|
|
23
23
|
#
|
|
24
24
|
# @return [OpenAI::Models::Beta::BetaResponseInputTextContent::PromptCacheBreakpoint, nil]
|
|
25
25
|
optional(
|
|
@@ -35,9 +35,9 @@ module OpenAI
|
|
|
35
35
|
# The text input to the model.
|
|
36
36
|
#
|
|
37
37
|
# @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseInputTextContent::PromptCacheBreakpoint, nil]
|
|
38
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
39
|
-
#
|
|
40
|
-
# token block.
|
|
38
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
39
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
40
|
+
# not rounded to a token block.
|
|
41
41
|
#
|
|
42
42
|
# @param type [Symbol, :input_text]
|
|
43
43
|
# The type of the input item. Always `input_text`.
|
|
@@ -57,9 +57,9 @@ module OpenAI
|
|
|
57
57
|
optional :ttl, enum: -> { OpenAI::Beta::BetaResponseInputTextContent::PromptCacheBreakpoint::Ttl }
|
|
58
58
|
|
|
59
59
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
60
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
61
|
-
#
|
|
62
|
-
# token block.
|
|
60
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
61
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
62
|
+
# not rounded to a token block.
|
|
63
63
|
#
|
|
64
64
|
# @param ttl [Symbol, OpenAI::Models::Beta::BetaResponseInputTextContent::PromptCacheBreakpoint::Ttl]
|
|
65
65
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -298,9 +298,9 @@ module OpenAI
|
|
|
298
298
|
required :type, const: :computer_screenshot
|
|
299
299
|
|
|
300
300
|
# @!attribute prompt_cache_breakpoint
|
|
301
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
302
|
-
#
|
|
303
|
-
# token block.
|
|
301
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
302
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
303
|
+
# not rounded to a token block.
|
|
304
304
|
#
|
|
305
305
|
# @return [OpenAI::Models::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint, nil]
|
|
306
306
|
optional(
|
|
@@ -322,9 +322,9 @@ module OpenAI
|
|
|
322
322
|
# The URL of the screenshot image.
|
|
323
323
|
#
|
|
324
324
|
# @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint]
|
|
325
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
326
|
-
#
|
|
327
|
-
# token block.
|
|
325
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
326
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
327
|
+
# not rounded to a token block.
|
|
328
328
|
#
|
|
329
329
|
# @param type [Symbol, :computer_screenshot]
|
|
330
330
|
# Specifies the event type. For a computer screenshot, this property is always set
|
|
@@ -366,9 +366,9 @@ module OpenAI
|
|
|
366
366
|
)
|
|
367
367
|
|
|
368
368
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
369
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
370
|
-
#
|
|
371
|
-
# token block.
|
|
369
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
370
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
371
|
+
# not rounded to a token block.
|
|
372
372
|
#
|
|
373
373
|
# @param ttl [Symbol, OpenAI::Models::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint::Ttl]
|
|
374
374
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -295,9 +295,9 @@ module OpenAI
|
|
|
295
295
|
required :type, const: :computer_screenshot
|
|
296
296
|
|
|
297
297
|
# @!attribute prompt_cache_breakpoint
|
|
298
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
299
|
-
#
|
|
300
|
-
# token block.
|
|
298
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
299
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
300
|
+
# not rounded to a token block.
|
|
301
301
|
#
|
|
302
302
|
# @return [OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint, nil]
|
|
303
303
|
optional(
|
|
@@ -321,9 +321,9 @@ module OpenAI
|
|
|
321
321
|
# The URL of the screenshot image.
|
|
322
322
|
#
|
|
323
323
|
# @param prompt_cache_breakpoint [OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint]
|
|
324
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
325
|
-
#
|
|
326
|
-
# token block.
|
|
324
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
325
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
326
|
+
# not rounded to a token block.
|
|
327
327
|
#
|
|
328
328
|
# @param type [Symbol, :computer_screenshot]
|
|
329
329
|
# Specifies the event type. For a computer screenshot, this property is always set
|
|
@@ -365,9 +365,9 @@ module OpenAI
|
|
|
365
365
|
)
|
|
366
366
|
|
|
367
367
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
368
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
369
|
-
#
|
|
370
|
-
# token block.
|
|
368
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
369
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
370
|
+
# not rounded to a token block.
|
|
371
371
|
#
|
|
372
372
|
# @param ttl [Symbol, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint::Ttl]
|
|
373
373
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -34,9 +34,9 @@ module OpenAI
|
|
|
34
34
|
required :type, const: :file
|
|
35
35
|
|
|
36
36
|
# @!attribute prompt_cache_breakpoint
|
|
37
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
38
|
-
#
|
|
39
|
-
# token block.
|
|
37
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
38
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
39
|
+
# not rounded to a token block.
|
|
40
40
|
#
|
|
41
41
|
# @return [OpenAI::Models::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint, nil]
|
|
42
42
|
optional(
|
|
@@ -51,9 +51,9 @@ module OpenAI
|
|
|
51
51
|
# @param file [OpenAI::Models::Chat::ChatCompletionContentPart::File::File]
|
|
52
52
|
#
|
|
53
53
|
# @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint]
|
|
54
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
55
|
-
#
|
|
56
|
-
# token block.
|
|
54
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
55
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
56
|
+
# not rounded to a token block.
|
|
57
57
|
#
|
|
58
58
|
# @param type [Symbol, :file]
|
|
59
59
|
# The type of the content part. Always `file`.
|
|
@@ -106,9 +106,9 @@ module OpenAI
|
|
|
106
106
|
optional :ttl, enum: -> { OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint::Ttl }
|
|
107
107
|
|
|
108
108
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
109
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
110
|
-
#
|
|
111
|
-
# token block.
|
|
109
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
110
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
111
|
+
# not rounded to a token block.
|
|
112
112
|
#
|
|
113
113
|
# @param ttl [Symbol, OpenAI::Models::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint::Ttl]
|
|
114
114
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -16,9 +16,9 @@ module OpenAI
|
|
|
16
16
|
required :type, const: :image_url
|
|
17
17
|
|
|
18
18
|
# @!attribute prompt_cache_breakpoint
|
|
19
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
20
|
-
#
|
|
21
|
-
# token block.
|
|
19
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
20
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
21
|
+
# not rounded to a token block.
|
|
22
22
|
#
|
|
23
23
|
# @return [OpenAI::Models::Chat::ChatCompletionContentPartImage::PromptCacheBreakpoint, nil]
|
|
24
24
|
optional(
|
|
@@ -33,9 +33,9 @@ module OpenAI
|
|
|
33
33
|
# @param image_url [OpenAI::Models::Chat::ChatCompletionContentPartImage::ImageURL]
|
|
34
34
|
#
|
|
35
35
|
# @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPartImage::PromptCacheBreakpoint]
|
|
36
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
37
|
-
#
|
|
38
|
-
# token block.
|
|
36
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
37
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
38
|
+
# not rounded to a token block.
|
|
39
39
|
#
|
|
40
40
|
# @param type [Symbol, :image_url]
|
|
41
41
|
# The type of the content part.
|
|
@@ -95,9 +95,9 @@ module OpenAI
|
|
|
95
95
|
optional :ttl, enum: -> { OpenAI::Chat::ChatCompletionContentPartImage::PromptCacheBreakpoint::Ttl }
|
|
96
96
|
|
|
97
97
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
98
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
99
|
-
#
|
|
100
|
-
# token block.
|
|
98
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
99
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
100
|
+
# not rounded to a token block.
|
|
101
101
|
#
|
|
102
102
|
# @param ttl [Symbol, OpenAI::Models::Chat::ChatCompletionContentPartImage::PromptCacheBreakpoint::Ttl]
|
|
103
103
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -16,9 +16,9 @@ module OpenAI
|
|
|
16
16
|
required :type, const: :input_audio
|
|
17
17
|
|
|
18
18
|
# @!attribute prompt_cache_breakpoint
|
|
19
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
20
|
-
#
|
|
21
|
-
# token block.
|
|
19
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
20
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
21
|
+
# not rounded to a token block.
|
|
22
22
|
#
|
|
23
23
|
# @return [OpenAI::Models::Chat::ChatCompletionContentPartInputAudio::PromptCacheBreakpoint, nil]
|
|
24
24
|
optional(
|
|
@@ -32,9 +32,9 @@ module OpenAI
|
|
|
32
32
|
# @param input_audio [OpenAI::Models::Chat::ChatCompletionContentPartInputAudio::InputAudio]
|
|
33
33
|
#
|
|
34
34
|
# @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPartInputAudio::PromptCacheBreakpoint]
|
|
35
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
36
|
-
#
|
|
37
|
-
# token block.
|
|
35
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
36
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
37
|
+
# not rounded to a token block.
|
|
38
38
|
#
|
|
39
39
|
# @param type [Symbol, :input_audio]
|
|
40
40
|
# The type of the content part. Always `input_audio`.
|
|
@@ -93,9 +93,9 @@ module OpenAI
|
|
|
93
93
|
optional :ttl, enum: -> { OpenAI::Chat::ChatCompletionContentPartInputAudio::PromptCacheBreakpoint::Ttl }
|
|
94
94
|
|
|
95
95
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
96
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
97
|
-
#
|
|
98
|
-
# token block.
|
|
96
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
97
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
98
|
+
# not rounded to a token block.
|
|
99
99
|
#
|
|
100
100
|
# @param ttl [Symbol, OpenAI::Models::Chat::ChatCompletionContentPartInputAudio::PromptCacheBreakpoint::Ttl]
|
|
101
101
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|
|
@@ -17,9 +17,9 @@ module OpenAI
|
|
|
17
17
|
required :type, const: :text
|
|
18
18
|
|
|
19
19
|
# @!attribute prompt_cache_breakpoint
|
|
20
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
21
|
-
#
|
|
22
|
-
# token block.
|
|
20
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
21
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
22
|
+
# not rounded to a token block.
|
|
23
23
|
#
|
|
24
24
|
# @return [OpenAI::Models::Chat::ChatCompletionContentPartText::PromptCacheBreakpoint, nil]
|
|
25
25
|
optional(
|
|
@@ -34,9 +34,9 @@ module OpenAI
|
|
|
34
34
|
# The text content.
|
|
35
35
|
#
|
|
36
36
|
# @param prompt_cache_breakpoint [OpenAI::Models::Chat::ChatCompletionContentPartText::PromptCacheBreakpoint]
|
|
37
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
38
|
-
#
|
|
39
|
-
# token block.
|
|
37
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
38
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
39
|
+
# not rounded to a token block.
|
|
40
40
|
#
|
|
41
41
|
# @param type [Symbol, :text]
|
|
42
42
|
# The type of the content part.
|
|
@@ -56,9 +56,9 @@ module OpenAI
|
|
|
56
56
|
optional :ttl, enum: -> { OpenAI::Chat::ChatCompletionContentPartText::PromptCacheBreakpoint::Ttl }
|
|
57
57
|
|
|
58
58
|
# @!method initialize(ttl: nil, mode: :explicit)
|
|
59
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
60
|
-
#
|
|
61
|
-
# token block.
|
|
59
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
60
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
61
|
+
# not rounded to a token block.
|
|
62
62
|
#
|
|
63
63
|
# @param ttl [Symbol, OpenAI::Models::Chat::ChatCompletionContentPartText::PromptCacheBreakpoint::Ttl]
|
|
64
64
|
# The minimum lifetime of this cache breakpoint. Defaults to the request TTL.
|