Skip to content

Commit a4bcab7

Browse files
feat(api): manual updates
1 parent 72e35ad commit a4bcab7

File tree

8 files changed

+86
-218
lines changed

8 files changed

+86
-218
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 109
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-9e41d2d5471d2c28bff0d616f4476f5b0e6c541ef4cb51bdaaef5fdf5e13c8b2.yml
33
openapi_spec_hash: 86f765e18d00e32cf2ce9db7ab84d946
4-
config_hash: fd2af1d5eff0995bb7dc02ac9a34851d
4+
config_hash: dc5515e257676a27cb1ace1784aa92b3

lib/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rb

Lines changed: 25 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,76 +6,41 @@ module FineTuning
66
module Checkpoints
77
# @see OpenAI::Resources::FineTuning::Checkpoints::Permissions#retrieve
88
class PermissionRetrieveResponse < OpenAI::Internal::Type::BaseModel
9-
# @!attribute data
9+
# @!attribute id
10+
# The permission identifier, which can be referenced in the API endpoints.
1011
#
11-
# @return [Array<OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data>]
12-
required :data,
13-
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data] }
12+
# @return [String]
13+
required :id, String
1414

15-
# @!attribute has_more
15+
# @!attribute created_at
16+
# The Unix timestamp (in seconds) for when the permission was created.
1617
#
17-
# @return [Boolean]
18-
required :has_more, OpenAI::Internal::Type::Boolean
18+
# @return [Integer]
19+
required :created_at, Integer
1920

2021
# @!attribute object
22+
# The object type, which is always "checkpoint.permission".
2123
#
22-
# @return [Symbol, :list]
23-
required :object, const: :list
24+
# @return [Symbol, :"checkpoint.permission"]
25+
required :object, const: :"checkpoint.permission"
2426

25-
# @!attribute first_id
27+
# @!attribute project_id
28+
# The project identifier that the permission is for.
2629
#
27-
# @return [String, nil]
28-
optional :first_id, String, nil?: true
30+
# @return [String]
31+
required :project_id, String
2932

30-
# @!attribute last_id
33+
# @!method initialize(id:, created_at:, project_id:, object: :"checkpoint.permission")
34+
# The `checkpoint.permission` object represents a permission for a fine-tuned
35+
# model checkpoint.
3136
#
32-
# @return [String, nil]
33-
optional :last_id, String, nil?: true
34-
35-
# @!method initialize(data:, has_more:, first_id: nil, last_id: nil, object: :list)
36-
# @param data [Array<OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data>]
37-
# @param has_more [Boolean]
38-
# @param first_id [String, nil]
39-
# @param last_id [String, nil]
40-
# @param object [Symbol, :list]
41-
42-
class Data < OpenAI::Internal::Type::BaseModel
43-
# @!attribute id
44-
# The permission identifier, which can be referenced in the API endpoints.
45-
#
46-
# @return [String]
47-
required :id, String
48-
49-
# @!attribute created_at
50-
# The Unix timestamp (in seconds) for when the permission was created.
51-
#
52-
# @return [Integer]
53-
required :created_at, Integer
54-
55-
# @!attribute object
56-
# The object type, which is always "checkpoint.permission".
57-
#
58-
# @return [Symbol, :"checkpoint.permission"]
59-
required :object, const: :"checkpoint.permission"
60-
61-
# @!attribute project_id
62-
# The project identifier that the permission is for.
63-
#
64-
# @return [String]
65-
required :project_id, String
66-
67-
# @!method initialize(id:, created_at:, project_id:, object: :"checkpoint.permission")
68-
# The `checkpoint.permission` object represents a permission for a fine-tuned
69-
# model checkpoint.
70-
#
71-
# @param id [String] The permission identifier, which can be referenced in the API endpoints.
72-
#
73-
# @param created_at [Integer] The Unix timestamp (in seconds) for when the permission was created.
74-
#
75-
# @param project_id [String] The project identifier that the permission is for.
76-
#
77-
# @param object [Symbol, :"checkpoint.permission"] The object type, which is always "checkpoint.permission".
78-
end
37+
# @param id [String] The permission identifier, which can be referenced in the API endpoints.
38+
#
39+
# @param created_at [Integer] The Unix timestamp (in seconds) for when the permission was created.
40+
#
41+
# @param project_id [String] The project identifier that the permission is for.
42+
#
43+
# @param object [Symbol, :"checkpoint.permission"] The object type, which is always "checkpoint.permission".
7944
end
8045
end
8146
end

lib/openai/resources/fine_tuning/checkpoints/permissions.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def create(fine_tuned_model_checkpoint, params)
6060
#
6161
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
6262
#
63-
# @return [OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse]
63+
# @return [OpenAI::Internal::CursorPage<OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse>]
6464
#
6565
# @see OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveParams
6666
def retrieve(fine_tuned_model_checkpoint, params = {})
@@ -69,6 +69,7 @@ def retrieve(fine_tuned_model_checkpoint, params = {})
6969
method: :get,
7070
path: ["fine_tuning/checkpoints/%1$s/permissions", fine_tuned_model_checkpoint],
7171
query: parsed,
72+
page: OpenAI::Internal::CursorPage,
7273
model: OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse,
7374
options: options
7475
)

rbi/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rbi

Lines changed: 26 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -13,125 +13,56 @@ module OpenAI
1313
)
1414
end
1515

16-
sig do
17-
returns(
18-
T::Array[
19-
OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data
20-
]
21-
)
22-
end
23-
attr_accessor :data
16+
# The permission identifier, which can be referenced in the API endpoints.
17+
sig { returns(String) }
18+
attr_accessor :id
2419

25-
sig { returns(T::Boolean) }
26-
attr_accessor :has_more
20+
# The Unix timestamp (in seconds) for when the permission was created.
21+
sig { returns(Integer) }
22+
attr_accessor :created_at
2723

24+
# The object type, which is always "checkpoint.permission".
2825
sig { returns(Symbol) }
2926
attr_accessor :object
3027

31-
sig { returns(T.nilable(String)) }
32-
attr_accessor :first_id
33-
34-
sig { returns(T.nilable(String)) }
35-
attr_accessor :last_id
28+
# The project identifier that the permission is for.
29+
sig { returns(String) }
30+
attr_accessor :project_id
3631

32+
# The `checkpoint.permission` object represents a permission for a fine-tuned
33+
# model checkpoint.
3734
sig do
3835
params(
39-
data:
40-
T::Array[
41-
OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data::OrHash
42-
],
43-
has_more: T::Boolean,
44-
first_id: T.nilable(String),
45-
last_id: T.nilable(String),
36+
id: String,
37+
created_at: Integer,
38+
project_id: String,
4639
object: Symbol
4740
).returns(T.attached_class)
4841
end
4942
def self.new(
50-
data:,
51-
has_more:,
52-
first_id: nil,
53-
last_id: nil,
54-
object: :list
43+
# The permission identifier, which can be referenced in the API endpoints.
44+
id:,
45+
# The Unix timestamp (in seconds) for when the permission was created.
46+
created_at:,
47+
# The project identifier that the permission is for.
48+
project_id:,
49+
# The object type, which is always "checkpoint.permission".
50+
object: :"checkpoint.permission"
5551
)
5652
end
5753

5854
sig do
5955
override.returns(
6056
{
61-
data:
62-
T::Array[
63-
OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data
64-
],
65-
has_more: T::Boolean,
57+
id: String,
58+
created_at: Integer,
6659
object: Symbol,
67-
first_id: T.nilable(String),
68-
last_id: T.nilable(String)
60+
project_id: String
6961
}
7062
)
7163
end
7264
def to_hash
7365
end
74-
75-
class Data < OpenAI::Internal::Type::BaseModel
76-
OrHash =
77-
T.type_alias do
78-
T.any(
79-
OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data,
80-
OpenAI::Internal::AnyHash
81-
)
82-
end
83-
84-
# The permission identifier, which can be referenced in the API endpoints.
85-
sig { returns(String) }
86-
attr_accessor :id
87-
88-
# The Unix timestamp (in seconds) for when the permission was created.
89-
sig { returns(Integer) }
90-
attr_accessor :created_at
91-
92-
# The object type, which is always "checkpoint.permission".
93-
sig { returns(Symbol) }
94-
attr_accessor :object
95-
96-
# The project identifier that the permission is for.
97-
sig { returns(String) }
98-
attr_accessor :project_id
99-
100-
# The `checkpoint.permission` object represents a permission for a fine-tuned
101-
# model checkpoint.
102-
sig do
103-
params(
104-
id: String,
105-
created_at: Integer,
106-
project_id: String,
107-
object: Symbol
108-
).returns(T.attached_class)
109-
end
110-
def self.new(
111-
# The permission identifier, which can be referenced in the API endpoints.
112-
id:,
113-
# The Unix timestamp (in seconds) for when the permission was created.
114-
created_at:,
115-
# The project identifier that the permission is for.
116-
project_id:,
117-
# The object type, which is always "checkpoint.permission".
118-
object: :"checkpoint.permission"
119-
)
120-
end
121-
122-
sig do
123-
override.returns(
124-
{
125-
id: String,
126-
created_at: Integer,
127-
object: Symbol,
128-
project_id: String
129-
}
130-
)
131-
end
132-
def to_hash
133-
end
134-
end
13566
end
13667
end
13768
end

rbi/openai/resources/fine_tuning/checkpoints/permissions.rbi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ module OpenAI
4343
project_id: String,
4444
request_options: OpenAI::RequestOptions::OrHash
4545
).returns(
46-
OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse
46+
OpenAI::Internal::CursorPage[
47+
OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse
48+
]
4749
)
4850
end
4951
def retrieve(

sig/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rbs

Lines changed: 16 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,71 +4,34 @@ module OpenAI
44
module Checkpoints
55
type permission_retrieve_response =
66
{
7-
data: ::Array[OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data],
8-
has_more: bool,
9-
object: :list,
10-
first_id: String?,
11-
last_id: String?
7+
id: String,
8+
created_at: Integer,
9+
object: :"checkpoint.permission",
10+
project_id: String
1211
}
1312

1413
class PermissionRetrieveResponse < OpenAI::Internal::Type::BaseModel
15-
attr_accessor data: ::Array[OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data]
14+
attr_accessor id: String
1615

17-
attr_accessor has_more: bool
16+
attr_accessor created_at: Integer
1817

19-
attr_accessor object: :list
18+
attr_accessor object: :"checkpoint.permission"
2019

21-
attr_accessor first_id: String?
22-
23-
attr_accessor last_id: String?
20+
attr_accessor project_id: String
2421

2522
def initialize: (
26-
data: ::Array[OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data],
27-
has_more: bool,
28-
?first_id: String?,
29-
?last_id: String?,
30-
?object: :list
23+
id: String,
24+
created_at: Integer,
25+
project_id: String,
26+
?object: :"checkpoint.permission"
3127
) -> void
3228

3329
def to_hash: -> {
34-
data: ::Array[OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse::Data],
35-
has_more: bool,
36-
object: :list,
37-
first_id: String?,
38-
last_id: String?
30+
id: String,
31+
created_at: Integer,
32+
object: :"checkpoint.permission",
33+
project_id: String
3934
}
40-
41-
type data =
42-
{
43-
id: String,
44-
created_at: Integer,
45-
object: :"checkpoint.permission",
46-
project_id: String
47-
}
48-
49-
class Data < OpenAI::Internal::Type::BaseModel
50-
attr_accessor id: String
51-
52-
attr_accessor created_at: Integer
53-
54-
attr_accessor object: :"checkpoint.permission"
55-
56-
attr_accessor project_id: String
57-
58-
def initialize: (
59-
id: String,
60-
created_at: Integer,
61-
project_id: String,
62-
?object: :"checkpoint.permission"
63-
) -> void
64-
65-
def to_hash: -> {
66-
id: String,
67-
created_at: Integer,
68-
object: :"checkpoint.permission",
69-
project_id: String
70-
}
71-
end
7235
end
7336
end
7437
end

sig/openai/resources/fine_tuning/checkpoints/permissions.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module OpenAI
1616
?order: OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveParams::order,
1717
?project_id: String,
1818
?request_options: OpenAI::request_opts
19-
) -> OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse
19+
) -> OpenAI::Internal::CursorPage[OpenAI::Models::FineTuning::Checkpoints::PermissionRetrieveResponse]
2020

2121
def delete: (
2222
String permission_id,

0 commit comments

Comments
 (0)