openai 0.48.0 → 0.49.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 +13 -0
- data/README.md +1 -1
- data/lib/openai/models/chat/completion_list_params.rb +3 -6
- data/lib/openai/models/container_create_params.rb +44 -1
- data/lib/openai/models/container_create_response.rb +44 -1
- data/lib/openai/models/container_list_params.rb +9 -1
- data/lib/openai/models/container_list_response.rb +44 -1
- data/lib/openai/models/container_retrieve_response.rb +44 -1
- data/lib/openai/resources/chat/completions.rb +1 -1
- data/lib/openai/resources/containers/files.rb +0 -1
- data/lib/openai/resources/containers.rb +8 -2
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/chat/completion_list_params.rbi +4 -10
- data/rbi/openai/models/container_create_params.rbi +121 -0
- data/rbi/openai/models/container_create_response.rbi +113 -3
- data/rbi/openai/models/container_list_params.rbi +11 -0
- data/rbi/openai/models/container_list_response.rbi +110 -3
- data/rbi/openai/models/container_retrieve_response.rbi +113 -3
- data/rbi/openai/resources/chat/completions.rbi +2 -5
- data/rbi/openai/resources/containers.rbi +19 -0
- data/sig/openai/models/container_create_params.rbs +38 -1
- data/sig/openai/models/container_create_response.rbs +47 -3
- data/sig/openai/models/container_list_params.rbs +7 -0
- data/sig/openai/models/container_list_response.rbs +47 -3
- data/sig/openai/models/container_retrieve_response.rbs +47 -3
- data/sig/openai/resources/containers.rbs +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4455ec812f2b1ec80ac2e086894901e14552ba5fad60fc4a7827f3bdb4d255ab
|
|
4
|
+
data.tar.gz: 222075e67c19c086c41badfcf628512f0f552343fc5855813b66ac9aa4774a29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e574a5cca75905899eafb9070ebd888c374d28f9557a0cb4b3967df603c9c728b21811c85ed653959143c665437f1f942ce9276383c0eed43bcc680fd7206ba
|
|
7
|
+
data.tar.gz: ab253d764f10ea694bc78415c60359d98568cf5b344570f9a3a6370ea56f4b5fc51f7b220a921a51d5cf0ccca2e85877f29f5fbb710ae0f6b63dca58ab95be96
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.49.0 (2026-02-13)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.48.0...v0.49.0](https://github.com/openai/openai-ruby/compare/v0.48.0...v0.49.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** container network_policy and skills ([0bad2bd](https://github.com/openai/openai-ruby/commit/0bad2bdedc9c940829297d093c1b891f96a14510))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Documentation
|
|
13
|
+
|
|
14
|
+
* update comment ([b4f6392](https://github.com/openai/openai-ruby/commit/b4f639284210e2b4f3aa55b515b7914d6b78d78e))
|
|
15
|
+
|
|
3
16
|
## 0.48.0 (2026-02-10)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v0.47.0...v0.48.0](https://github.com/openai/openai-ruby/compare/v0.47.0...v0.48.0)
|
data/README.md
CHANGED
|
@@ -21,12 +21,9 @@ module OpenAI
|
|
|
21
21
|
optional :limit, Integer
|
|
22
22
|
|
|
23
23
|
# @!attribute metadata
|
|
24
|
-
#
|
|
25
|
-
# for storing additional information about the object in a structured format, and
|
|
26
|
-
# querying for objects via API or the dashboard.
|
|
24
|
+
# A list of metadata keys to filter the Chat Completions by. Example:
|
|
27
25
|
#
|
|
28
|
-
#
|
|
29
|
-
# a maximum length of 512 characters.
|
|
26
|
+
# `metadata[key1]=value1&metadata[key2]=value2`
|
|
30
27
|
#
|
|
31
28
|
# @return [Hash{Symbol=>String}, nil]
|
|
32
29
|
optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
|
|
@@ -52,7 +49,7 @@ module OpenAI
|
|
|
52
49
|
#
|
|
53
50
|
# @param limit [Integer] Number of Chat Completions to retrieve.
|
|
54
51
|
#
|
|
55
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
52
|
+
# @param metadata [Hash{Symbol=>String}, nil] A list of metadata keys to filter the Chat Completions by. Example:
|
|
56
53
|
#
|
|
57
54
|
# @param model [String] The model used to generate the Chat Completions.
|
|
58
55
|
#
|
|
@@ -31,7 +31,19 @@ module OpenAI
|
|
|
31
31
|
# @return [Symbol, OpenAI::Models::ContainerCreateParams::MemoryLimit, nil]
|
|
32
32
|
optional :memory_limit, enum: -> { OpenAI::ContainerCreateParams::MemoryLimit }
|
|
33
33
|
|
|
34
|
-
# @!
|
|
34
|
+
# @!attribute network_policy
|
|
35
|
+
# Network access policy for the container.
|
|
36
|
+
#
|
|
37
|
+
# @return [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist, nil]
|
|
38
|
+
optional :network_policy, union: -> { OpenAI::ContainerCreateParams::NetworkPolicy }
|
|
39
|
+
|
|
40
|
+
# @!attribute skills
|
|
41
|
+
# An optional list of skills referenced by id or inline data.
|
|
42
|
+
#
|
|
43
|
+
# @return [Array<OpenAI::Models::Responses::SkillReference, OpenAI::Models::Responses::InlineSkill>, nil]
|
|
44
|
+
optional :skills, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::ContainerCreateParams::Skill] }
|
|
45
|
+
|
|
46
|
+
# @!method initialize(name:, expires_after: nil, file_ids: nil, memory_limit: nil, network_policy: nil, skills: nil, request_options: {})
|
|
35
47
|
# @param name [String] Name of the container to create.
|
|
36
48
|
#
|
|
37
49
|
# @param expires_after [OpenAI::Models::ContainerCreateParams::ExpiresAfter] Container expiration time in seconds relative to the 'anchor' time.
|
|
@@ -40,6 +52,10 @@ module OpenAI
|
|
|
40
52
|
#
|
|
41
53
|
# @param memory_limit [Symbol, OpenAI::Models::ContainerCreateParams::MemoryLimit] Optional memory limit for the container. Defaults to "1g".
|
|
42
54
|
#
|
|
55
|
+
# @param network_policy [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist] Network access policy for the container.
|
|
56
|
+
#
|
|
57
|
+
# @param skills [Array<OpenAI::Models::Responses::SkillReference, OpenAI::Models::Responses::InlineSkill>] An optional list of skills referenced by id or inline data.
|
|
58
|
+
#
|
|
43
59
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
44
60
|
|
|
45
61
|
class ExpiresAfter < OpenAI::Internal::Type::BaseModel
|
|
@@ -91,6 +107,33 @@ module OpenAI
|
|
|
91
107
|
# @!method self.values
|
|
92
108
|
# @return [Array<Symbol>]
|
|
93
109
|
end
|
|
110
|
+
|
|
111
|
+
# Network access policy for the container.
|
|
112
|
+
module NetworkPolicy
|
|
113
|
+
extend OpenAI::Internal::Type::Union
|
|
114
|
+
|
|
115
|
+
discriminator :type
|
|
116
|
+
|
|
117
|
+
variant :disabled, -> { OpenAI::Responses::ContainerNetworkPolicyDisabled }
|
|
118
|
+
|
|
119
|
+
variant :allowlist, -> { OpenAI::Responses::ContainerNetworkPolicyAllowlist }
|
|
120
|
+
|
|
121
|
+
# @!method self.variants
|
|
122
|
+
# @return [Array(OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist)]
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
module Skill
|
|
126
|
+
extend OpenAI::Internal::Type::Union
|
|
127
|
+
|
|
128
|
+
discriminator :type
|
|
129
|
+
|
|
130
|
+
variant :skill_reference, -> { OpenAI::Responses::SkillReference }
|
|
131
|
+
|
|
132
|
+
variant :inline, -> { OpenAI::Responses::InlineSkill }
|
|
133
|
+
|
|
134
|
+
# @!method self.variants
|
|
135
|
+
# @return [Array(OpenAI::Models::Responses::SkillReference, OpenAI::Models::Responses::InlineSkill)]
|
|
136
|
+
end
|
|
94
137
|
end
|
|
95
138
|
end
|
|
96
139
|
end
|
|
@@ -54,7 +54,13 @@ module OpenAI
|
|
|
54
54
|
# @return [Symbol, OpenAI::Models::ContainerCreateResponse::MemoryLimit, nil]
|
|
55
55
|
optional :memory_limit, enum: -> { OpenAI::Models::ContainerCreateResponse::MemoryLimit }
|
|
56
56
|
|
|
57
|
-
# @!
|
|
57
|
+
# @!attribute network_policy
|
|
58
|
+
# Network access policy for the container.
|
|
59
|
+
#
|
|
60
|
+
# @return [OpenAI::Models::ContainerCreateResponse::NetworkPolicy, nil]
|
|
61
|
+
optional :network_policy, -> { OpenAI::Models::ContainerCreateResponse::NetworkPolicy }
|
|
62
|
+
|
|
63
|
+
# @!method initialize(id:, created_at:, name:, object:, status:, expires_after: nil, last_active_at: nil, memory_limit: nil, network_policy: nil)
|
|
58
64
|
# Some parameter documentations has been truncated, see
|
|
59
65
|
# {OpenAI::Models::ContainerCreateResponse} for more details.
|
|
60
66
|
#
|
|
@@ -73,6 +79,8 @@ module OpenAI
|
|
|
73
79
|
# @param last_active_at [Integer] Unix timestamp (in seconds) when the container was last active.
|
|
74
80
|
#
|
|
75
81
|
# @param memory_limit [Symbol, OpenAI::Models::ContainerCreateResponse::MemoryLimit] The memory limit configured for the container.
|
|
82
|
+
#
|
|
83
|
+
# @param network_policy [OpenAI::Models::ContainerCreateResponse::NetworkPolicy] Network access policy for the container.
|
|
76
84
|
|
|
77
85
|
# @see OpenAI::Models::ContainerCreateResponse#expires_after
|
|
78
86
|
class ExpiresAfter < OpenAI::Internal::Type::BaseModel
|
|
@@ -124,6 +132,41 @@ module OpenAI
|
|
|
124
132
|
# @!method self.values
|
|
125
133
|
# @return [Array<Symbol>]
|
|
126
134
|
end
|
|
135
|
+
|
|
136
|
+
# @see OpenAI::Models::ContainerCreateResponse#network_policy
|
|
137
|
+
class NetworkPolicy < OpenAI::Internal::Type::BaseModel
|
|
138
|
+
# @!attribute type
|
|
139
|
+
# The network policy mode.
|
|
140
|
+
#
|
|
141
|
+
# @return [Symbol, OpenAI::Models::ContainerCreateResponse::NetworkPolicy::Type]
|
|
142
|
+
required :type, enum: -> { OpenAI::Models::ContainerCreateResponse::NetworkPolicy::Type }
|
|
143
|
+
|
|
144
|
+
# @!attribute allowed_domains
|
|
145
|
+
# Allowed outbound domains when `type` is `allowlist`.
|
|
146
|
+
#
|
|
147
|
+
# @return [Array<String>, nil]
|
|
148
|
+
optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String]
|
|
149
|
+
|
|
150
|
+
# @!method initialize(type:, allowed_domains: nil)
|
|
151
|
+
# Network access policy for the container.
|
|
152
|
+
#
|
|
153
|
+
# @param type [Symbol, OpenAI::Models::ContainerCreateResponse::NetworkPolicy::Type] The network policy mode.
|
|
154
|
+
#
|
|
155
|
+
# @param allowed_domains [Array<String>] Allowed outbound domains when `type` is `allowlist`.
|
|
156
|
+
|
|
157
|
+
# The network policy mode.
|
|
158
|
+
#
|
|
159
|
+
# @see OpenAI::Models::ContainerCreateResponse::NetworkPolicy#type
|
|
160
|
+
module Type
|
|
161
|
+
extend OpenAI::Internal::Type::Enum
|
|
162
|
+
|
|
163
|
+
ALLOWLIST = :allowlist
|
|
164
|
+
DISABLED = :disabled
|
|
165
|
+
|
|
166
|
+
# @!method self.values
|
|
167
|
+
# @return [Array<Symbol>]
|
|
168
|
+
end
|
|
169
|
+
end
|
|
127
170
|
end
|
|
128
171
|
end
|
|
129
172
|
end
|
|
@@ -23,6 +23,12 @@ module OpenAI
|
|
|
23
23
|
# @return [Integer, nil]
|
|
24
24
|
optional :limit, Integer
|
|
25
25
|
|
|
26
|
+
# @!attribute name
|
|
27
|
+
# Filter results by container name.
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
optional :name, String
|
|
31
|
+
|
|
26
32
|
# @!attribute order
|
|
27
33
|
# Sort order by the `created_at` timestamp of the objects. `asc` for ascending
|
|
28
34
|
# order and `desc` for descending order.
|
|
@@ -30,7 +36,7 @@ module OpenAI
|
|
|
30
36
|
# @return [Symbol, OpenAI::Models::ContainerListParams::Order, nil]
|
|
31
37
|
optional :order, enum: -> { OpenAI::ContainerListParams::Order }
|
|
32
38
|
|
|
33
|
-
# @!method initialize(after: nil, limit: nil, order: nil, request_options: {})
|
|
39
|
+
# @!method initialize(after: nil, limit: nil, name: nil, order: nil, request_options: {})
|
|
34
40
|
# Some parameter documentations has been truncated, see
|
|
35
41
|
# {OpenAI::Models::ContainerListParams} for more details.
|
|
36
42
|
#
|
|
@@ -38,6 +44,8 @@ module OpenAI
|
|
|
38
44
|
#
|
|
39
45
|
# @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1
|
|
40
46
|
#
|
|
47
|
+
# @param name [String] Filter results by container name.
|
|
48
|
+
#
|
|
41
49
|
# @param order [Symbol, OpenAI::Models::ContainerListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord
|
|
42
50
|
#
|
|
43
51
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -54,7 +54,13 @@ module OpenAI
|
|
|
54
54
|
# @return [Symbol, OpenAI::Models::ContainerListResponse::MemoryLimit, nil]
|
|
55
55
|
optional :memory_limit, enum: -> { OpenAI::Models::ContainerListResponse::MemoryLimit }
|
|
56
56
|
|
|
57
|
-
# @!
|
|
57
|
+
# @!attribute network_policy
|
|
58
|
+
# Network access policy for the container.
|
|
59
|
+
#
|
|
60
|
+
# @return [OpenAI::Models::ContainerListResponse::NetworkPolicy, nil]
|
|
61
|
+
optional :network_policy, -> { OpenAI::Models::ContainerListResponse::NetworkPolicy }
|
|
62
|
+
|
|
63
|
+
# @!method initialize(id:, created_at:, name:, object:, status:, expires_after: nil, last_active_at: nil, memory_limit: nil, network_policy: nil)
|
|
58
64
|
# Some parameter documentations has been truncated, see
|
|
59
65
|
# {OpenAI::Models::ContainerListResponse} for more details.
|
|
60
66
|
#
|
|
@@ -73,6 +79,8 @@ module OpenAI
|
|
|
73
79
|
# @param last_active_at [Integer] Unix timestamp (in seconds) when the container was last active.
|
|
74
80
|
#
|
|
75
81
|
# @param memory_limit [Symbol, OpenAI::Models::ContainerListResponse::MemoryLimit] The memory limit configured for the container.
|
|
82
|
+
#
|
|
83
|
+
# @param network_policy [OpenAI::Models::ContainerListResponse::NetworkPolicy] Network access policy for the container.
|
|
76
84
|
|
|
77
85
|
# @see OpenAI::Models::ContainerListResponse#expires_after
|
|
78
86
|
class ExpiresAfter < OpenAI::Internal::Type::BaseModel
|
|
@@ -124,6 +132,41 @@ module OpenAI
|
|
|
124
132
|
# @!method self.values
|
|
125
133
|
# @return [Array<Symbol>]
|
|
126
134
|
end
|
|
135
|
+
|
|
136
|
+
# @see OpenAI::Models::ContainerListResponse#network_policy
|
|
137
|
+
class NetworkPolicy < OpenAI::Internal::Type::BaseModel
|
|
138
|
+
# @!attribute type
|
|
139
|
+
# The network policy mode.
|
|
140
|
+
#
|
|
141
|
+
# @return [Symbol, OpenAI::Models::ContainerListResponse::NetworkPolicy::Type]
|
|
142
|
+
required :type, enum: -> { OpenAI::Models::ContainerListResponse::NetworkPolicy::Type }
|
|
143
|
+
|
|
144
|
+
# @!attribute allowed_domains
|
|
145
|
+
# Allowed outbound domains when `type` is `allowlist`.
|
|
146
|
+
#
|
|
147
|
+
# @return [Array<String>, nil]
|
|
148
|
+
optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String]
|
|
149
|
+
|
|
150
|
+
# @!method initialize(type:, allowed_domains: nil)
|
|
151
|
+
# Network access policy for the container.
|
|
152
|
+
#
|
|
153
|
+
# @param type [Symbol, OpenAI::Models::ContainerListResponse::NetworkPolicy::Type] The network policy mode.
|
|
154
|
+
#
|
|
155
|
+
# @param allowed_domains [Array<String>] Allowed outbound domains when `type` is `allowlist`.
|
|
156
|
+
|
|
157
|
+
# The network policy mode.
|
|
158
|
+
#
|
|
159
|
+
# @see OpenAI::Models::ContainerListResponse::NetworkPolicy#type
|
|
160
|
+
module Type
|
|
161
|
+
extend OpenAI::Internal::Type::Enum
|
|
162
|
+
|
|
163
|
+
ALLOWLIST = :allowlist
|
|
164
|
+
DISABLED = :disabled
|
|
165
|
+
|
|
166
|
+
# @!method self.values
|
|
167
|
+
# @return [Array<Symbol>]
|
|
168
|
+
end
|
|
169
|
+
end
|
|
127
170
|
end
|
|
128
171
|
end
|
|
129
172
|
end
|
|
@@ -54,7 +54,13 @@ module OpenAI
|
|
|
54
54
|
# @return [Symbol, OpenAI::Models::ContainerRetrieveResponse::MemoryLimit, nil]
|
|
55
55
|
optional :memory_limit, enum: -> { OpenAI::Models::ContainerRetrieveResponse::MemoryLimit }
|
|
56
56
|
|
|
57
|
-
# @!
|
|
57
|
+
# @!attribute network_policy
|
|
58
|
+
# Network access policy for the container.
|
|
59
|
+
#
|
|
60
|
+
# @return [OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy, nil]
|
|
61
|
+
optional :network_policy, -> { OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy }
|
|
62
|
+
|
|
63
|
+
# @!method initialize(id:, created_at:, name:, object:, status:, expires_after: nil, last_active_at: nil, memory_limit: nil, network_policy: nil)
|
|
58
64
|
# Some parameter documentations has been truncated, see
|
|
59
65
|
# {OpenAI::Models::ContainerRetrieveResponse} for more details.
|
|
60
66
|
#
|
|
@@ -73,6 +79,8 @@ module OpenAI
|
|
|
73
79
|
# @param last_active_at [Integer] Unix timestamp (in seconds) when the container was last active.
|
|
74
80
|
#
|
|
75
81
|
# @param memory_limit [Symbol, OpenAI::Models::ContainerRetrieveResponse::MemoryLimit] The memory limit configured for the container.
|
|
82
|
+
#
|
|
83
|
+
# @param network_policy [OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy] Network access policy for the container.
|
|
76
84
|
|
|
77
85
|
# @see OpenAI::Models::ContainerRetrieveResponse#expires_after
|
|
78
86
|
class ExpiresAfter < OpenAI::Internal::Type::BaseModel
|
|
@@ -124,6 +132,41 @@ module OpenAI
|
|
|
124
132
|
# @!method self.values
|
|
125
133
|
# @return [Array<Symbol>]
|
|
126
134
|
end
|
|
135
|
+
|
|
136
|
+
# @see OpenAI::Models::ContainerRetrieveResponse#network_policy
|
|
137
|
+
class NetworkPolicy < OpenAI::Internal::Type::BaseModel
|
|
138
|
+
# @!attribute type
|
|
139
|
+
# The network policy mode.
|
|
140
|
+
#
|
|
141
|
+
# @return [Symbol, OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy::Type]
|
|
142
|
+
required :type, enum: -> { OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy::Type }
|
|
143
|
+
|
|
144
|
+
# @!attribute allowed_domains
|
|
145
|
+
# Allowed outbound domains when `type` is `allowlist`.
|
|
146
|
+
#
|
|
147
|
+
# @return [Array<String>, nil]
|
|
148
|
+
optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String]
|
|
149
|
+
|
|
150
|
+
# @!method initialize(type:, allowed_domains: nil)
|
|
151
|
+
# Network access policy for the container.
|
|
152
|
+
#
|
|
153
|
+
# @param type [Symbol, OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy::Type] The network policy mode.
|
|
154
|
+
#
|
|
155
|
+
# @param allowed_domains [Array<String>] Allowed outbound domains when `type` is `allowlist`.
|
|
156
|
+
|
|
157
|
+
# The network policy mode.
|
|
158
|
+
#
|
|
159
|
+
# @see OpenAI::Models::ContainerRetrieveResponse::NetworkPolicy#type
|
|
160
|
+
module Type
|
|
161
|
+
extend OpenAI::Internal::Type::Enum
|
|
162
|
+
|
|
163
|
+
ALLOWLIST = :allowlist
|
|
164
|
+
DISABLED = :disabled
|
|
165
|
+
|
|
166
|
+
# @!method self.values
|
|
167
|
+
# @return [Array<Symbol>]
|
|
168
|
+
end
|
|
169
|
+
end
|
|
127
170
|
end
|
|
128
171
|
end
|
|
129
172
|
end
|
|
@@ -432,7 +432,7 @@ module OpenAI
|
|
|
432
432
|
#
|
|
433
433
|
# @param limit [Integer] Number of Chat Completions to retrieve.
|
|
434
434
|
#
|
|
435
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
435
|
+
# @param metadata [Hash{Symbol=>String}, nil] A list of metadata keys to filter the Chat Completions by. Example:
|
|
436
436
|
#
|
|
437
437
|
# @param model [String] The model used to generate the Chat Completions.
|
|
438
438
|
#
|
|
@@ -8,7 +8,7 @@ module OpenAI
|
|
|
8
8
|
|
|
9
9
|
# Create Container
|
|
10
10
|
#
|
|
11
|
-
# @overload create(name:, expires_after: nil, file_ids: nil, memory_limit: nil, request_options: {})
|
|
11
|
+
# @overload create(name:, expires_after: nil, file_ids: nil, memory_limit: nil, network_policy: nil, skills: nil, request_options: {})
|
|
12
12
|
#
|
|
13
13
|
# @param name [String] Name of the container to create.
|
|
14
14
|
#
|
|
@@ -18,6 +18,10 @@ module OpenAI
|
|
|
18
18
|
#
|
|
19
19
|
# @param memory_limit [Symbol, OpenAI::Models::ContainerCreateParams::MemoryLimit] Optional memory limit for the container. Defaults to "1g".
|
|
20
20
|
#
|
|
21
|
+
# @param network_policy [OpenAI::Models::Responses::ContainerNetworkPolicyDisabled, OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist] Network access policy for the container.
|
|
22
|
+
#
|
|
23
|
+
# @param skills [Array<OpenAI::Models::Responses::SkillReference, OpenAI::Models::Responses::InlineSkill>] An optional list of skills referenced by id or inline data.
|
|
24
|
+
#
|
|
21
25
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
22
26
|
#
|
|
23
27
|
# @return [OpenAI::Models::ContainerCreateResponse]
|
|
@@ -58,12 +62,14 @@ module OpenAI
|
|
|
58
62
|
#
|
|
59
63
|
# List Containers
|
|
60
64
|
#
|
|
61
|
-
# @overload list(after: nil, limit: nil, order: nil, request_options: {})
|
|
65
|
+
# @overload list(after: nil, limit: nil, name: nil, order: nil, request_options: {})
|
|
62
66
|
#
|
|
63
67
|
# @param after [String] A cursor for use in pagination. `after` is an object ID that defines your place
|
|
64
68
|
#
|
|
65
69
|
# @param limit [Integer] A limit on the number of objects to be returned. Limit can range between 1 and 1
|
|
66
70
|
#
|
|
71
|
+
# @param name [String] Filter results by container name.
|
|
72
|
+
#
|
|
67
73
|
# @param order [Symbol, OpenAI::Models::ContainerListParams::Order] Sort order by the `created_at` timestamp of the objects. `asc` for ascending ord
|
|
68
74
|
#
|
|
69
75
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
data/lib/openai/version.rb
CHANGED
|
@@ -26,12 +26,9 @@ module OpenAI
|
|
|
26
26
|
sig { params(limit: Integer).void }
|
|
27
27
|
attr_writer :limit
|
|
28
28
|
|
|
29
|
-
#
|
|
30
|
-
# for storing additional information about the object in a structured format, and
|
|
31
|
-
# querying for objects via API or the dashboard.
|
|
29
|
+
# A list of metadata keys to filter the Chat Completions by. Example:
|
|
32
30
|
#
|
|
33
|
-
#
|
|
34
|
-
# a maximum length of 512 characters.
|
|
31
|
+
# `metadata[key1]=value1&metadata[key2]=value2`
|
|
35
32
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
36
33
|
attr_accessor :metadata
|
|
37
34
|
|
|
@@ -73,12 +70,9 @@ module OpenAI
|
|
|
73
70
|
after: nil,
|
|
74
71
|
# Number of Chat Completions to retrieve.
|
|
75
72
|
limit: nil,
|
|
76
|
-
#
|
|
77
|
-
# for storing additional information about the object in a structured format, and
|
|
78
|
-
# querying for objects via API or the dashboard.
|
|
73
|
+
# A list of metadata keys to filter the Chat Completions by. Example:
|
|
79
74
|
#
|
|
80
|
-
#
|
|
81
|
-
# a maximum length of 512 characters.
|
|
75
|
+
# `metadata[key1]=value1&metadata[key2]=value2`
|
|
82
76
|
metadata: nil,
|
|
83
77
|
# The model used to generate the Chat Completions.
|
|
84
78
|
model: nil,
|
|
@@ -46,12 +46,76 @@ module OpenAI
|
|
|
46
46
|
end
|
|
47
47
|
attr_writer :memory_limit
|
|
48
48
|
|
|
49
|
+
# Network access policy for the container.
|
|
50
|
+
sig do
|
|
51
|
+
returns(
|
|
52
|
+
T.nilable(
|
|
53
|
+
T.any(
|
|
54
|
+
OpenAI::Responses::ContainerNetworkPolicyDisabled,
|
|
55
|
+
OpenAI::Responses::ContainerNetworkPolicyAllowlist
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
attr_reader :network_policy
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
params(
|
|
64
|
+
network_policy:
|
|
65
|
+
T.any(
|
|
66
|
+
OpenAI::Responses::ContainerNetworkPolicyDisabled::OrHash,
|
|
67
|
+
OpenAI::Responses::ContainerNetworkPolicyAllowlist::OrHash
|
|
68
|
+
)
|
|
69
|
+
).void
|
|
70
|
+
end
|
|
71
|
+
attr_writer :network_policy
|
|
72
|
+
|
|
73
|
+
# An optional list of skills referenced by id or inline data.
|
|
74
|
+
sig do
|
|
75
|
+
returns(
|
|
76
|
+
T.nilable(
|
|
77
|
+
T::Array[
|
|
78
|
+
T.any(
|
|
79
|
+
OpenAI::Responses::SkillReference,
|
|
80
|
+
OpenAI::Responses::InlineSkill
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
)
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
attr_reader :skills
|
|
87
|
+
|
|
88
|
+
sig do
|
|
89
|
+
params(
|
|
90
|
+
skills:
|
|
91
|
+
T::Array[
|
|
92
|
+
T.any(
|
|
93
|
+
OpenAI::Responses::SkillReference::OrHash,
|
|
94
|
+
OpenAI::Responses::InlineSkill::OrHash
|
|
95
|
+
)
|
|
96
|
+
]
|
|
97
|
+
).void
|
|
98
|
+
end
|
|
99
|
+
attr_writer :skills
|
|
100
|
+
|
|
49
101
|
sig do
|
|
50
102
|
params(
|
|
51
103
|
name: String,
|
|
52
104
|
expires_after: OpenAI::ContainerCreateParams::ExpiresAfter::OrHash,
|
|
53
105
|
file_ids: T::Array[String],
|
|
54
106
|
memory_limit: OpenAI::ContainerCreateParams::MemoryLimit::OrSymbol,
|
|
107
|
+
network_policy:
|
|
108
|
+
T.any(
|
|
109
|
+
OpenAI::Responses::ContainerNetworkPolicyDisabled::OrHash,
|
|
110
|
+
OpenAI::Responses::ContainerNetworkPolicyAllowlist::OrHash
|
|
111
|
+
),
|
|
112
|
+
skills:
|
|
113
|
+
T::Array[
|
|
114
|
+
T.any(
|
|
115
|
+
OpenAI::Responses::SkillReference::OrHash,
|
|
116
|
+
OpenAI::Responses::InlineSkill::OrHash
|
|
117
|
+
)
|
|
118
|
+
],
|
|
55
119
|
request_options: OpenAI::RequestOptions::OrHash
|
|
56
120
|
).returns(T.attached_class)
|
|
57
121
|
end
|
|
@@ -64,6 +128,10 @@ module OpenAI
|
|
|
64
128
|
file_ids: nil,
|
|
65
129
|
# Optional memory limit for the container. Defaults to "1g".
|
|
66
130
|
memory_limit: nil,
|
|
131
|
+
# Network access policy for the container.
|
|
132
|
+
network_policy: nil,
|
|
133
|
+
# An optional list of skills referenced by id or inline data.
|
|
134
|
+
skills: nil,
|
|
67
135
|
request_options: {}
|
|
68
136
|
)
|
|
69
137
|
end
|
|
@@ -75,6 +143,18 @@ module OpenAI
|
|
|
75
143
|
expires_after: OpenAI::ContainerCreateParams::ExpiresAfter,
|
|
76
144
|
file_ids: T::Array[String],
|
|
77
145
|
memory_limit: OpenAI::ContainerCreateParams::MemoryLimit::OrSymbol,
|
|
146
|
+
network_policy:
|
|
147
|
+
T.any(
|
|
148
|
+
OpenAI::Responses::ContainerNetworkPolicyDisabled,
|
|
149
|
+
OpenAI::Responses::ContainerNetworkPolicyAllowlist
|
|
150
|
+
),
|
|
151
|
+
skills:
|
|
152
|
+
T::Array[
|
|
153
|
+
T.any(
|
|
154
|
+
OpenAI::Responses::SkillReference,
|
|
155
|
+
OpenAI::Responses::InlineSkill
|
|
156
|
+
)
|
|
157
|
+
],
|
|
78
158
|
request_options: OpenAI::RequestOptions
|
|
79
159
|
}
|
|
80
160
|
)
|
|
@@ -191,6 +271,47 @@ module OpenAI
|
|
|
191
271
|
def self.values
|
|
192
272
|
end
|
|
193
273
|
end
|
|
274
|
+
|
|
275
|
+
# Network access policy for the container.
|
|
276
|
+
module NetworkPolicy
|
|
277
|
+
extend OpenAI::Internal::Type::Union
|
|
278
|
+
|
|
279
|
+
Variants =
|
|
280
|
+
T.type_alias do
|
|
281
|
+
T.any(
|
|
282
|
+
OpenAI::Responses::ContainerNetworkPolicyDisabled,
|
|
283
|
+
OpenAI::Responses::ContainerNetworkPolicyAllowlist
|
|
284
|
+
)
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
sig do
|
|
288
|
+
override.returns(
|
|
289
|
+
T::Array[OpenAI::ContainerCreateParams::NetworkPolicy::Variants]
|
|
290
|
+
)
|
|
291
|
+
end
|
|
292
|
+
def self.variants
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
module Skill
|
|
297
|
+
extend OpenAI::Internal::Type::Union
|
|
298
|
+
|
|
299
|
+
Variants =
|
|
300
|
+
T.type_alias do
|
|
301
|
+
T.any(
|
|
302
|
+
OpenAI::Responses::SkillReference,
|
|
303
|
+
OpenAI::Responses::InlineSkill
|
|
304
|
+
)
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
sig do
|
|
308
|
+
override.returns(
|
|
309
|
+
T::Array[OpenAI::ContainerCreateParams::Skill::Variants]
|
|
310
|
+
)
|
|
311
|
+
end
|
|
312
|
+
def self.variants
|
|
313
|
+
end
|
|
314
|
+
end
|
|
194
315
|
end
|
|
195
316
|
end
|
|
196
317
|
end
|