openai 0.81.0 → 0.83.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 +31 -0
- data/README.md +53 -1
- data/lib/openai/helpers/realtime/client_extension.rb +107 -0
- data/lib/openai/helpers/sorbet.rb +324 -0
- data/lib/openai/helpers/streaming/response_event_decoder.rb +44 -0
- data/lib/openai/helpers/streaming/response_stream.rb +10 -3
- data/lib/openai/helpers/streaming/unknown_stream_event.rb +51 -0
- data/lib/openai/http_client.rb +40 -1
- data/lib/openai/internal/logging.rb +7 -1
- data/lib/openai/internal/stream.rb +4 -1
- data/lib/openai/internal/transport/base_client.rb +35 -4
- data/lib/openai/internal/util.rb +6 -2
- data/lib/openai/models/admin/organization/audit_log_list_params.rb +2 -0
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +2 -0
- data/lib/openai/models/beta/beta_response_function_tool_call_output_item.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_item.rb +9 -9
- data/lib/openai/models/beta/beta_response_usage.rb +12 -1
- data/lib/openai/models/completion_usage.rb +12 -1
- data/lib/openai/models/responses/response_function_tool_call_output_item.rb +9 -9
- data/lib/openai/models/responses/response_input_item.rb +9 -9
- data/lib/openai/models/responses/response_usage.rb +12 -1
- data/lib/openai/request_options.rb +8 -0
- data/lib/openai/resources/beta/responses.rb +2 -2
- data/lib/openai/resources/responses.rb +3 -3
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/helpers/sorbet.rbi +55 -0
- data/rbi/openai/helpers/streaming/response_event_decoder.rbi +28 -0
- data/rbi/openai/helpers/streaming/response_stream.rbi +5 -0
- data/rbi/openai/helpers/streaming/unknown_stream_event.rbi +29 -0
- data/rbi/openai/http_client.rbi +25 -2
- data/rbi/openai/internal/logging.rbi +12 -2
- data/rbi/openai/internal/transport/base_client.rbi +12 -2
- data/rbi/openai/internal/util.rbi +3 -2
- data/rbi/openai/models/admin/organization/audit_log_list_params.rbi +8 -0
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +8 -0
- data/rbi/openai/models/beta/beta_response_function_tool_call_output_item.rbi +13 -10
- data/rbi/openai/models/beta/beta_response_input_item.rbi +10 -10
- data/rbi/openai/models/beta/beta_response_usage.rbi +13 -3
- data/rbi/openai/models/completion_usage.rbi +10 -0
- data/rbi/openai/models/responses/response_function_tool_call_output_item.rbi +13 -10
- data/rbi/openai/models/responses/response_input_item.rbi +10 -10
- data/rbi/openai/models/responses/response_usage.rbi +13 -3
- data/rbi/openai/request_options.rbi +4 -0
- data/rbi/openai/resources/beta/responses.rbi +10 -2
- data/rbi/openai/resources/responses.rbi +2 -2
- data/rbi/openai/streaming.rbi +1 -0
- data/sig/openai/helpers/sorbet.rbs +54 -0
- data/sig/openai/helpers/streaming/response_event_decoder.rbs +16 -0
- data/sig/openai/helpers/streaming/unknown_stream_event.rbs +15 -0
- data/sig/openai/http_client.rbs +14 -1
- data/sig/openai/internal/logging.rbs +6 -1
- data/sig/openai/internal/transport/base_client.rbs +7 -1
- data/sig/openai/internal/util.rbs +3 -1
- data/sig/openai/models/admin/organization/audit_log_list_params.rbs +4 -0
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +4 -0
- data/sig/openai/models/beta/beta_response_function_tool_call_output_item.rbs +7 -5
- data/sig/openai/models/beta/beta_response_input_item.rbs +5 -5
- data/sig/openai/models/beta/beta_response_usage.rbs +8 -3
- data/sig/openai/models/completion_usage.rbs +5 -0
- data/sig/openai/models/responses/response_function_tool_call_output_item.rbs +7 -5
- data/sig/openai/models/responses/response_input_item.rbs +5 -5
- data/sig/openai/models/responses/response_usage.rbs +8 -3
- data/sig/openai/request_options.rbs +4 -1
- data/sig/openai/resources/beta/responses.rbs +4 -2
- data/sig/openai/resources/responses.rbs +6 -3
- data/sig/openai/streaming.rbs +5 -0
- metadata +11 -1
|
@@ -398,10 +398,6 @@ module OpenAI
|
|
|
398
398
|
)
|
|
399
399
|
end
|
|
400
400
|
|
|
401
|
-
# The unique ID of the function tool call generated by the model.
|
|
402
|
-
sig { returns(String) }
|
|
403
|
-
attr_accessor :call_id
|
|
404
|
-
|
|
405
401
|
# Text, image, or file output of the function tool call.
|
|
406
402
|
sig { returns(OpenAI::Responses::ResponseInputItem::FunctionCallOutput::Output::Variants) }
|
|
407
403
|
attr_accessor :output
|
|
@@ -415,6 +411,10 @@ module OpenAI
|
|
|
415
411
|
sig { returns(T.nilable(String)) }
|
|
416
412
|
attr_accessor :id
|
|
417
413
|
|
|
414
|
+
# The unique ID of the function tool call generated by the model.
|
|
415
|
+
sig { returns(T.nilable(String)) }
|
|
416
|
+
attr_accessor :call_id
|
|
417
|
+
|
|
418
418
|
# The execution context that produced this tool call.
|
|
419
419
|
sig {
|
|
420
420
|
returns(
|
|
@@ -445,12 +445,12 @@ module OpenAI
|
|
|
445
445
|
sig do
|
|
446
446
|
params(
|
|
447
447
|
|
|
448
|
-
call_id: String,
|
|
449
|
-
|
|
450
448
|
output: OpenAI::Responses::ResponseInputItem::FunctionCallOutput::Output::Variants,
|
|
451
449
|
|
|
452
450
|
id: T.nilable(String),
|
|
453
451
|
|
|
452
|
+
call_id: T.nilable(String),
|
|
453
|
+
|
|
454
454
|
caller_: T.nilable(
|
|
455
455
|
T.any(
|
|
456
456
|
OpenAI::Responses::ResponseInputItem::FunctionCallOutput::Caller::Direct::OrHash,
|
|
@@ -470,9 +470,6 @@ module OpenAI
|
|
|
470
470
|
end
|
|
471
471
|
def self.new(
|
|
472
472
|
|
|
473
|
-
# The unique ID of the function tool call generated by the model.
|
|
474
|
-
call_id:,
|
|
475
|
-
|
|
476
473
|
# Text, image, or file output of the function tool call.
|
|
477
474
|
output:,
|
|
478
475
|
|
|
@@ -480,6 +477,9 @@ module OpenAI
|
|
|
480
477
|
# returned via API.
|
|
481
478
|
id: nil,
|
|
482
479
|
|
|
480
|
+
# The unique ID of the function tool call generated by the model.
|
|
481
|
+
call_id: nil,
|
|
482
|
+
|
|
483
483
|
# The execution context that produced this tool call.
|
|
484
484
|
caller_: nil,
|
|
485
485
|
|
|
@@ -502,10 +502,10 @@ module OpenAI
|
|
|
502
502
|
sig do
|
|
503
503
|
override.returns(
|
|
504
504
|
{
|
|
505
|
-
call_id: String,
|
|
506
505
|
output: OpenAI::Responses::ResponseInputItem::FunctionCallOutput::Output::Variants,
|
|
507
506
|
type: Symbol,
|
|
508
507
|
id: T.nilable(String),
|
|
508
|
+
call_id: T.nilable(String),
|
|
509
509
|
caller_: T.nilable(
|
|
510
510
|
T.any(
|
|
511
511
|
OpenAI::Responses::ResponseInputItem::FunctionCallOutput::Caller::Direct,
|
|
@@ -40,6 +40,10 @@ module OpenAI
|
|
|
40
40
|
sig { returns(Integer) }
|
|
41
41
|
attr_accessor :total_tokens
|
|
42
42
|
|
|
43
|
+
# Compute units for the request. Currently null when available.
|
|
44
|
+
sig { returns(T.nilable(Integer)) }
|
|
45
|
+
attr_accessor :compute_units
|
|
46
|
+
|
|
43
47
|
# Represents token usage details including input tokens, output tokens, a
|
|
44
48
|
# breakdown of output tokens, and the total tokens used.
|
|
45
49
|
sig do
|
|
@@ -53,7 +57,9 @@ module OpenAI
|
|
|
53
57
|
|
|
54
58
|
output_tokens_details: OpenAI::Responses::ResponseUsage::OutputTokensDetails::OrHash,
|
|
55
59
|
|
|
56
|
-
total_tokens: Integer
|
|
60
|
+
total_tokens: Integer,
|
|
61
|
+
|
|
62
|
+
compute_units: T.nilable(Integer)
|
|
57
63
|
)
|
|
58
64
|
.returns(T.attached_class)
|
|
59
65
|
end
|
|
@@ -72,8 +78,11 @@ module OpenAI
|
|
|
72
78
|
output_tokens_details:,
|
|
73
79
|
|
|
74
80
|
# The total number of tokens used.
|
|
81
|
+
total_tokens:,
|
|
82
|
+
|
|
83
|
+
# Compute units for the request. Currently null when available.
|
|
75
84
|
|
|
76
|
-
|
|
85
|
+
compute_units: nil
|
|
77
86
|
)
|
|
78
87
|
end
|
|
79
88
|
|
|
@@ -84,7 +93,8 @@ module OpenAI
|
|
|
84
93
|
input_tokens_details: OpenAI::Responses::ResponseUsage::InputTokensDetails,
|
|
85
94
|
output_tokens: Integer,
|
|
86
95
|
output_tokens_details: OpenAI::Responses::ResponseUsage::OutputTokensDetails,
|
|
87
|
-
total_tokens: Integer
|
|
96
|
+
total_tokens: Integer,
|
|
97
|
+
compute_units: T.nilable(Integer)
|
|
88
98
|
}
|
|
89
99
|
)
|
|
90
100
|
end
|
|
@@ -47,6 +47,10 @@ module OpenAI
|
|
|
47
47
|
sig { returns(T.nilable(Float)) }
|
|
48
48
|
attr_accessor :timeout
|
|
49
49
|
|
|
50
|
+
# Retain the exact successful response body on `last_response.body`.
|
|
51
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
52
|
+
attr_accessor :include_raw_body
|
|
53
|
+
|
|
50
54
|
# Returns a new instance of RequestOptions.
|
|
51
55
|
sig { params(values: OpenAI::Internal::AnyHash).returns(T.attached_class) }
|
|
52
56
|
def self.new(values = {})
|
|
@@ -404,7 +404,11 @@ module OpenAI
|
|
|
404
404
|
stream: T.noreturn,
|
|
405
405
|
request_options: OpenAI::RequestOptions::OrHash
|
|
406
406
|
)
|
|
407
|
-
.returns(
|
|
407
|
+
.returns(
|
|
408
|
+
OpenAI::Internal::Stream[
|
|
409
|
+
T.any(OpenAI::Beta::BetaResponseStreamEvent::Variants, OpenAI::Streaming::UnknownStreamEvent)
|
|
410
|
+
]
|
|
411
|
+
)
|
|
408
412
|
}
|
|
409
413
|
def stream_raw(
|
|
410
414
|
# Body param: Whether to run the model response in the background.
|
|
@@ -691,7 +695,11 @@ module OpenAI
|
|
|
691
695
|
stream: T.noreturn,
|
|
692
696
|
request_options: OpenAI::RequestOptions::OrHash
|
|
693
697
|
)
|
|
694
|
-
.returns(
|
|
698
|
+
.returns(
|
|
699
|
+
OpenAI::Internal::Stream[
|
|
700
|
+
T.any(OpenAI::Beta::BetaResponseStreamEvent::Variants, OpenAI::Streaming::UnknownStreamEvent)
|
|
701
|
+
]
|
|
702
|
+
)
|
|
695
703
|
}
|
|
696
704
|
def retrieve_streaming(
|
|
697
705
|
# Path param: The ID of the response to retrieve.
|
|
@@ -396,7 +396,7 @@ module OpenAI
|
|
|
396
396
|
)
|
|
397
397
|
.returns(
|
|
398
398
|
OpenAI::Internal::Stream[
|
|
399
|
-
OpenAI::Responses::ResponseStreamEvent::Variants
|
|
399
|
+
T.any(OpenAI::Responses::ResponseStreamEvent::Variants, OpenAI::Streaming::UnknownStreamEvent)
|
|
400
400
|
]
|
|
401
401
|
)
|
|
402
402
|
end
|
|
@@ -917,7 +917,7 @@ module OpenAI
|
|
|
917
917
|
)
|
|
918
918
|
.returns(
|
|
919
919
|
OpenAI::Internal::Stream[
|
|
920
|
-
OpenAI::Responses::ResponseStreamEvent::Variants
|
|
920
|
+
T.any(OpenAI::Responses::ResponseStreamEvent::Variants, OpenAI::Streaming::UnknownStreamEvent)
|
|
921
921
|
]
|
|
922
922
|
)
|
|
923
923
|
end
|
data/rbi/openai/streaming.rbi
CHANGED
|
@@ -6,6 +6,7 @@ module OpenAI
|
|
|
6
6
|
ResponseTextDoneEvent = OpenAI::Helpers::Streaming::ResponseTextDoneEvent
|
|
7
7
|
ResponseFunctionCallArgumentsDeltaEvent = OpenAI::Helpers::Streaming::ResponseFunctionCallArgumentsDeltaEvent
|
|
8
8
|
ResponseCompletedEvent = OpenAI::Helpers::Streaming::ResponseCompletedEvent
|
|
9
|
+
UnknownStreamEvent = OpenAI::Helpers::Streaming::UnknownStreamEvent
|
|
9
10
|
|
|
10
11
|
ChatChunkEvent = OpenAI::Helpers::Streaming::ChatChunkEvent
|
|
11
12
|
ChatContentDeltaEvent = OpenAI::Helpers::Streaming::ChatContentDeltaEvent
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Helpers
|
|
3
|
+
module StructuredOutput
|
|
4
|
+
class SorbetAdapter
|
|
5
|
+
include OpenAI::Internal::Type::Converter
|
|
6
|
+
|
|
7
|
+
class HydrationError < ::TypeError
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
attr_reader name: String
|
|
11
|
+
|
|
12
|
+
def initialize: (::Class model) -> void
|
|
13
|
+
|
|
14
|
+
def to_json_schema: -> ::Hash[Symbol, untyped]
|
|
15
|
+
|
|
16
|
+
# @api private
|
|
17
|
+
def to_json_schema_inner: (
|
|
18
|
+
state: ::Hash[Symbol, untyped]
|
|
19
|
+
) -> ::Hash[Symbol, untyped]
|
|
20
|
+
|
|
21
|
+
# @api private
|
|
22
|
+
def coerce: (untyped value, state: ::Hash[Symbol, untyped]) -> untyped
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.from_sorbet: (::Class model) -> SorbetAdapter
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
module Resources
|
|
30
|
+
class Responses
|
|
31
|
+
def create:
|
|
32
|
+
(
|
|
33
|
+
text: OpenAI::Helpers::StructuredOutput::SorbetAdapter,
|
|
34
|
+
?model: OpenAI::Models::responses_model,
|
|
35
|
+
?input: OpenAI::Models::Responses::ResponseCreateParams::input,
|
|
36
|
+
**untyped
|
|
37
|
+
) -> OpenAI::Responses::Response
|
|
38
|
+
| ...
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class Chat
|
|
42
|
+
class Completions
|
|
43
|
+
def create:
|
|
44
|
+
(
|
|
45
|
+
model: OpenAI::Models::Chat::CompletionCreateParams::model,
|
|
46
|
+
messages: ::Array[OpenAI::Models::Chat::chat_completion_message_param],
|
|
47
|
+
response_format: OpenAI::Helpers::StructuredOutput::SorbetAdapter,
|
|
48
|
+
**untyped
|
|
49
|
+
) -> OpenAI::Chat::ChatCompletion
|
|
50
|
+
| ...
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Helpers
|
|
3
|
+
module Streaming
|
|
4
|
+
# @api private
|
|
5
|
+
class ResponseEventDecoder
|
|
6
|
+
def initialize: (model: untyped) -> void
|
|
7
|
+
def decode: (untyped data) -> untyped
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
def response_stream_model?: -> bool
|
|
12
|
+
def unknown_response_event?: (untyped data) -> bool
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Helpers
|
|
3
|
+
module Streaming
|
|
4
|
+
class UnknownStreamEvent
|
|
5
|
+
attr_reader type: Symbol
|
|
6
|
+
attr_reader sequence_number: Integer?
|
|
7
|
+
attr_reader data: ::Hash[Symbol, untyped]
|
|
8
|
+
|
|
9
|
+
# @api private
|
|
10
|
+
def initialize: (data: ::Hash[Symbol, untyped]) -> void
|
|
11
|
+
def to_h: -> ::Hash[Symbol, untyped]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/sig/openai/http_client.rbs
CHANGED
|
@@ -10,8 +10,21 @@ module OpenAI
|
|
|
10
10
|
attr_reader status: Integer
|
|
11
11
|
attr_reader headers: ::Hash[String, String]
|
|
12
12
|
attr_reader request_id: String?
|
|
13
|
+
attr_reader body: String?
|
|
13
14
|
|
|
14
|
-
def initialize: (
|
|
15
|
+
def initialize: (
|
|
16
|
+
status: Integer,
|
|
17
|
+
headers: ::Hash[String, String],
|
|
18
|
+
?body: String?
|
|
19
|
+
) -> void
|
|
20
|
+
|
|
21
|
+
def encode_with: (top coder) -> void
|
|
22
|
+
|
|
23
|
+
def init_with: (top coder) -> void
|
|
24
|
+
|
|
25
|
+
def marshal_dump: -> [Integer, ::Hash[String, String]]
|
|
26
|
+
|
|
27
|
+
def marshal_load: ([Integer, ::Hash[String, String]] values) -> void
|
|
15
28
|
end
|
|
16
29
|
|
|
17
30
|
class RetryEvent
|
|
@@ -16,7 +16,12 @@ module OpenAI
|
|
|
16
16
|
log_level: Symbol,
|
|
17
17
|
on_retry: (^(OpenAI::RetryEvent) -> void)?,
|
|
18
18
|
method: Symbol,
|
|
19
|
-
url: URI::Generic
|
|
19
|
+
url: URI::Generic,
|
|
20
|
+
?on_response: (^(
|
|
21
|
+
OpenAI::HTTPClient::Response,
|
|
22
|
+
URI::Generic,
|
|
23
|
+
URI::Generic
|
|
24
|
+
) -> void)?
|
|
20
25
|
) -> void
|
|
21
26
|
def request_started: (
|
|
22
27
|
OpenAI::HTTPClient::Request request,
|
|
@@ -174,7 +174,13 @@ module OpenAI
|
|
|
174
174
|
|
|
175
175
|
private def perform_request: (
|
|
176
176
|
OpenAI::Internal::Transport::BaseClient::request_components req
|
|
177
|
-
)
|
|
177
|
+
) ?{
|
|
178
|
+
(
|
|
179
|
+
OpenAI::HTTPClient::Response response,
|
|
180
|
+
URI::Generic url,
|
|
181
|
+
URI::Generic response_url
|
|
182
|
+
) -> void
|
|
183
|
+
} -> [URI::Generic, OpenAI::HTTPClient::Response, OpenAI::Internal::Logging::Context]
|
|
178
184
|
|
|
179
185
|
private def finish_request: (
|
|
180
186
|
OpenAI::Internal::Logging::Context log_context,
|
|
@@ -204,6 +204,8 @@ module OpenAI
|
|
|
204
204
|
| :"tenant.admin_api_key.updated"
|
|
205
205
|
| :"tenant.admin_api_key.deleted"
|
|
206
206
|
| :"tenant.project_api_key.created"
|
|
207
|
+
| :"tenant.trusted_access.business_verification.started"
|
|
208
|
+
| :"tenant.trusted_access.application.submitted"
|
|
207
209
|
| :"tenant.chatgpt_access_token.revoked"
|
|
208
210
|
| :"tenant.migration.completed"
|
|
209
211
|
| :"tenant.sso.migrated"
|
|
@@ -353,6 +355,8 @@ module OpenAI
|
|
|
353
355
|
TENANT_ADMIN_API_KEY_UPDATED: :"tenant.admin_api_key.updated"
|
|
354
356
|
TENANT_ADMIN_API_KEY_DELETED: :"tenant.admin_api_key.deleted"
|
|
355
357
|
TENANT_PROJECT_API_KEY_CREATED: :"tenant.project_api_key.created"
|
|
358
|
+
TENANT_TRUSTED_ACCESS_BUSINESS_VERIFICATION_STARTED: :"tenant.trusted_access.business_verification.started"
|
|
359
|
+
TENANT_TRUSTED_ACCESS_APPLICATION_SUBMITTED: :"tenant.trusted_access.application.submitted"
|
|
356
360
|
TENANT_CHATGPT_ACCESS_TOKEN_REVOKED: :"tenant.chatgpt_access_token.revoked"
|
|
357
361
|
TENANT_MIGRATION_COMPLETED: :"tenant.migration.completed"
|
|
358
362
|
TENANT_SSO_MIGRATED: :"tenant.sso.migrated"
|
|
@@ -609,6 +609,8 @@ module OpenAI
|
|
|
609
609
|
| :"tenant.admin_api_key.updated"
|
|
610
610
|
| :"tenant.admin_api_key.deleted"
|
|
611
611
|
| :"tenant.project_api_key.created"
|
|
612
|
+
| :"tenant.trusted_access.business_verification.started"
|
|
613
|
+
| :"tenant.trusted_access.application.submitted"
|
|
612
614
|
| :"tenant.chatgpt_access_token.revoked"
|
|
613
615
|
| :"tenant.migration.completed"
|
|
614
616
|
| :"tenant.sso.migrated"
|
|
@@ -758,6 +760,8 @@ module OpenAI
|
|
|
758
760
|
TENANT_ADMIN_API_KEY_UPDATED: :"tenant.admin_api_key.updated"
|
|
759
761
|
TENANT_ADMIN_API_KEY_DELETED: :"tenant.admin_api_key.deleted"
|
|
760
762
|
TENANT_PROJECT_API_KEY_CREATED: :"tenant.project_api_key.created"
|
|
763
|
+
TENANT_TRUSTED_ACCESS_BUSINESS_VERIFICATION_STARTED: :"tenant.trusted_access.business_verification.started"
|
|
764
|
+
TENANT_TRUSTED_ACCESS_APPLICATION_SUBMITTED: :"tenant.trusted_access.application.submitted"
|
|
761
765
|
TENANT_CHATGPT_ACCESS_TOKEN_REVOKED: :"tenant.chatgpt_access_token.revoked"
|
|
762
766
|
TENANT_MIGRATION_COMPLETED: :"tenant.migration.completed"
|
|
763
767
|
TENANT_SSO_MIGRATED: :"tenant.sso.migrated"
|
|
@@ -6,11 +6,11 @@ module OpenAI
|
|
|
6
6
|
type beta_response_function_tool_call_output_item =
|
|
7
7
|
{
|
|
8
8
|
id: String,
|
|
9
|
-
call_id: String,
|
|
10
9
|
output: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::output,
|
|
11
10
|
status: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::status,
|
|
12
11
|
type: :function_call_output,
|
|
13
12
|
agent: OpenAI::Beta::BetaResponseFunctionToolCallOutputItem::Agent?,
|
|
13
|
+
call_id: String,
|
|
14
14
|
caller_: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::caller_?,
|
|
15
15
|
created_by: String,
|
|
16
16
|
name: String,
|
|
@@ -20,8 +20,6 @@ module OpenAI
|
|
|
20
20
|
class BetaResponseFunctionToolCallOutputItem < OpenAI::Internal::Type::BaseModel
|
|
21
21
|
attr_accessor id: String
|
|
22
22
|
|
|
23
|
-
attr_accessor call_id: String
|
|
24
|
-
|
|
25
23
|
attr_accessor output: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::output
|
|
26
24
|
|
|
27
25
|
attr_accessor status: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::status
|
|
@@ -30,6 +28,10 @@ module OpenAI
|
|
|
30
28
|
|
|
31
29
|
attr_accessor agent: OpenAI::Beta::BetaResponseFunctionToolCallOutputItem::Agent?
|
|
32
30
|
|
|
31
|
+
attr_reader call_id: String?
|
|
32
|
+
|
|
33
|
+
def call_id=: (String) -> String
|
|
34
|
+
|
|
33
35
|
attr_accessor caller_: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::caller_?
|
|
34
36
|
|
|
35
37
|
attr_reader created_by: String?
|
|
@@ -46,10 +48,10 @@ module OpenAI
|
|
|
46
48
|
|
|
47
49
|
def initialize: (
|
|
48
50
|
id: String,
|
|
49
|
-
call_id: String,
|
|
50
51
|
output: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::output,
|
|
51
52
|
status: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::status,
|
|
52
53
|
?agent: OpenAI::Beta::BetaResponseFunctionToolCallOutputItem::Agent?,
|
|
54
|
+
?call_id: String,
|
|
53
55
|
?caller_: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::caller_?,
|
|
54
56
|
?created_by: String,
|
|
55
57
|
?name: String,
|
|
@@ -59,11 +61,11 @@ module OpenAI
|
|
|
59
61
|
|
|
60
62
|
def to_hash: -> {
|
|
61
63
|
id: String,
|
|
62
|
-
call_id: String,
|
|
63
64
|
output: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::output,
|
|
64
65
|
status: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::status,
|
|
65
66
|
type: :function_call_output,
|
|
66
67
|
agent: OpenAI::Beta::BetaResponseFunctionToolCallOutputItem::Agent?,
|
|
68
|
+
call_id: String,
|
|
67
69
|
caller_: OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem::caller_?,
|
|
68
70
|
created_by: String,
|
|
69
71
|
name: String,
|
|
@@ -222,11 +222,11 @@ module OpenAI
|
|
|
222
222
|
|
|
223
223
|
type function_call_output =
|
|
224
224
|
{
|
|
225
|
-
call_id: String,
|
|
226
225
|
output: OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::output,
|
|
227
226
|
type: :function_call_output,
|
|
228
227
|
id: String?,
|
|
229
228
|
agent: OpenAI::Beta::BetaResponseInputItem::FunctionCallOutput::Agent?,
|
|
229
|
+
call_id: String?,
|
|
230
230
|
caller_: OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::caller_?,
|
|
231
231
|
name: String?,
|
|
232
232
|
namespace: String?,
|
|
@@ -234,8 +234,6 @@ module OpenAI
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
class FunctionCallOutput < OpenAI::Internal::Type::BaseModel
|
|
237
|
-
attr_accessor call_id: String
|
|
238
|
-
|
|
239
237
|
attr_accessor output: OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::output
|
|
240
238
|
|
|
241
239
|
attr_accessor type: :function_call_output
|
|
@@ -244,6 +242,8 @@ module OpenAI
|
|
|
244
242
|
|
|
245
243
|
attr_accessor agent: OpenAI::Beta::BetaResponseInputItem::FunctionCallOutput::Agent?
|
|
246
244
|
|
|
245
|
+
attr_accessor call_id: String?
|
|
246
|
+
|
|
247
247
|
attr_accessor caller_: OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::caller_?
|
|
248
248
|
|
|
249
249
|
attr_accessor name: String?
|
|
@@ -253,10 +253,10 @@ module OpenAI
|
|
|
253
253
|
attr_accessor status: OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::status?
|
|
254
254
|
|
|
255
255
|
def initialize: (
|
|
256
|
-
call_id: String,
|
|
257
256
|
output: OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::output,
|
|
258
257
|
?id: String?,
|
|
259
258
|
?agent: OpenAI::Beta::BetaResponseInputItem::FunctionCallOutput::Agent?,
|
|
259
|
+
?call_id: String?,
|
|
260
260
|
?caller_: OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::caller_?,
|
|
261
261
|
?name: String?,
|
|
262
262
|
?namespace: String?,
|
|
@@ -265,11 +265,11 @@ module OpenAI
|
|
|
265
265
|
) -> void
|
|
266
266
|
|
|
267
267
|
def to_hash: -> {
|
|
268
|
-
call_id: String,
|
|
269
268
|
output: OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::output,
|
|
270
269
|
type: :function_call_output,
|
|
271
270
|
id: String?,
|
|
272
271
|
agent: OpenAI::Beta::BetaResponseInputItem::FunctionCallOutput::Agent?,
|
|
272
|
+
call_id: String?,
|
|
273
273
|
caller_: OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput::caller_?,
|
|
274
274
|
name: String?,
|
|
275
275
|
namespace: String?,
|
|
@@ -9,7 +9,8 @@ module OpenAI
|
|
|
9
9
|
input_tokens_details: OpenAI::Beta::BetaResponseUsage::InputTokensDetails,
|
|
10
10
|
output_tokens: Integer,
|
|
11
11
|
output_tokens_details: OpenAI::Beta::BetaResponseUsage::OutputTokensDetails,
|
|
12
|
-
total_tokens: Integer
|
|
12
|
+
total_tokens: Integer,
|
|
13
|
+
compute_units: Integer?
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
class BetaResponseUsage < OpenAI::Internal::Type::BaseModel
|
|
@@ -23,12 +24,15 @@ module OpenAI
|
|
|
23
24
|
|
|
24
25
|
attr_accessor total_tokens: Integer
|
|
25
26
|
|
|
27
|
+
attr_accessor compute_units: Integer?
|
|
28
|
+
|
|
26
29
|
def initialize: (
|
|
27
30
|
input_tokens: Integer,
|
|
28
31
|
input_tokens_details: OpenAI::Beta::BetaResponseUsage::InputTokensDetails,
|
|
29
32
|
output_tokens: Integer,
|
|
30
33
|
output_tokens_details: OpenAI::Beta::BetaResponseUsage::OutputTokensDetails,
|
|
31
|
-
total_tokens: Integer
|
|
34
|
+
total_tokens: Integer,
|
|
35
|
+
?compute_units: Integer?
|
|
32
36
|
) -> void
|
|
33
37
|
|
|
34
38
|
def to_hash: -> {
|
|
@@ -36,7 +40,8 @@ module OpenAI
|
|
|
36
40
|
input_tokens_details: OpenAI::Beta::BetaResponseUsage::InputTokensDetails,
|
|
37
41
|
output_tokens: Integer,
|
|
38
42
|
output_tokens_details: OpenAI::Beta::BetaResponseUsage::OutputTokensDetails,
|
|
39
|
-
total_tokens: Integer
|
|
43
|
+
total_tokens: Integer,
|
|
44
|
+
compute_units: Integer?
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
type input_tokens_details =
|
|
@@ -6,6 +6,7 @@ module OpenAI
|
|
|
6
6
|
prompt_tokens: Integer,
|
|
7
7
|
total_tokens: Integer,
|
|
8
8
|
completion_tokens_details: OpenAI::CompletionUsage::CompletionTokensDetails,
|
|
9
|
+
compute_units: Integer?,
|
|
9
10
|
prompt_tokens_details: OpenAI::CompletionUsage::PromptTokensDetails
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -22,6 +23,8 @@ module OpenAI
|
|
|
22
23
|
OpenAI::CompletionUsage::CompletionTokensDetails
|
|
23
24
|
) -> OpenAI::CompletionUsage::CompletionTokensDetails
|
|
24
25
|
|
|
26
|
+
attr_accessor compute_units: Integer?
|
|
27
|
+
|
|
25
28
|
attr_reader prompt_tokens_details: OpenAI::CompletionUsage::PromptTokensDetails?
|
|
26
29
|
|
|
27
30
|
def prompt_tokens_details=: (
|
|
@@ -33,6 +36,7 @@ module OpenAI
|
|
|
33
36
|
prompt_tokens: Integer,
|
|
34
37
|
total_tokens: Integer,
|
|
35
38
|
?completion_tokens_details: OpenAI::CompletionUsage::CompletionTokensDetails,
|
|
39
|
+
?compute_units: Integer?,
|
|
36
40
|
?prompt_tokens_details: OpenAI::CompletionUsage::PromptTokensDetails
|
|
37
41
|
) -> void
|
|
38
42
|
|
|
@@ -41,6 +45,7 @@ module OpenAI
|
|
|
41
45
|
prompt_tokens: Integer,
|
|
42
46
|
total_tokens: Integer,
|
|
43
47
|
completion_tokens_details: OpenAI::CompletionUsage::CompletionTokensDetails,
|
|
48
|
+
compute_units: Integer?,
|
|
44
49
|
prompt_tokens_details: OpenAI::CompletionUsage::PromptTokensDetails
|
|
45
50
|
}
|
|
46
51
|
|
|
@@ -4,10 +4,10 @@ module OpenAI
|
|
|
4
4
|
type response_function_tool_call_output_item =
|
|
5
5
|
{
|
|
6
6
|
id: String,
|
|
7
|
-
call_id: String,
|
|
8
7
|
output: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::output,
|
|
9
8
|
status: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::status,
|
|
10
9
|
type: :function_call_output,
|
|
10
|
+
call_id: String,
|
|
11
11
|
caller_: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::caller_?,
|
|
12
12
|
created_by: String,
|
|
13
13
|
name: String,
|
|
@@ -17,14 +17,16 @@ module OpenAI
|
|
|
17
17
|
class ResponseFunctionToolCallOutputItem < OpenAI::Internal::Type::BaseModel
|
|
18
18
|
attr_accessor id: String
|
|
19
19
|
|
|
20
|
-
attr_accessor call_id: String
|
|
21
|
-
|
|
22
20
|
attr_accessor output: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::output
|
|
23
21
|
|
|
24
22
|
attr_accessor status: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::status
|
|
25
23
|
|
|
26
24
|
attr_accessor type: :function_call_output
|
|
27
25
|
|
|
26
|
+
attr_reader call_id: String?
|
|
27
|
+
|
|
28
|
+
def call_id=: (String) -> String
|
|
29
|
+
|
|
28
30
|
attr_accessor caller_: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::caller_?
|
|
29
31
|
|
|
30
32
|
attr_reader created_by: String?
|
|
@@ -41,9 +43,9 @@ module OpenAI
|
|
|
41
43
|
|
|
42
44
|
def initialize: (
|
|
43
45
|
id: String,
|
|
44
|
-
call_id: String,
|
|
45
46
|
output: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::output,
|
|
46
47
|
status: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::status,
|
|
48
|
+
?call_id: String,
|
|
47
49
|
?caller_: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::caller_?,
|
|
48
50
|
?created_by: String,
|
|
49
51
|
?name: String,
|
|
@@ -53,10 +55,10 @@ module OpenAI
|
|
|
53
55
|
|
|
54
56
|
def to_hash: -> {
|
|
55
57
|
id: String,
|
|
56
|
-
call_id: String,
|
|
57
58
|
output: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::output,
|
|
58
59
|
status: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::status,
|
|
59
60
|
type: :function_call_output,
|
|
61
|
+
call_id: String,
|
|
60
62
|
caller_: OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::caller_?,
|
|
61
63
|
created_by: String,
|
|
62
64
|
name: String,
|
|
@@ -187,10 +187,10 @@ module OpenAI
|
|
|
187
187
|
|
|
188
188
|
type function_call_output =
|
|
189
189
|
{
|
|
190
|
-
call_id: String,
|
|
191
190
|
output: OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::output,
|
|
192
191
|
type: :function_call_output,
|
|
193
192
|
id: String?,
|
|
193
|
+
call_id: String?,
|
|
194
194
|
caller_: OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::caller_?,
|
|
195
195
|
name: String?,
|
|
196
196
|
namespace: String?,
|
|
@@ -198,14 +198,14 @@ module OpenAI
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
class FunctionCallOutput < OpenAI::Internal::Type::BaseModel
|
|
201
|
-
attr_accessor call_id: String
|
|
202
|
-
|
|
203
201
|
attr_accessor output: OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::output
|
|
204
202
|
|
|
205
203
|
attr_accessor type: :function_call_output
|
|
206
204
|
|
|
207
205
|
attr_accessor id: String?
|
|
208
206
|
|
|
207
|
+
attr_accessor call_id: String?
|
|
208
|
+
|
|
209
209
|
attr_accessor caller_: OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::caller_?
|
|
210
210
|
|
|
211
211
|
attr_accessor name: String?
|
|
@@ -215,9 +215,9 @@ module OpenAI
|
|
|
215
215
|
attr_accessor status: OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::status?
|
|
216
216
|
|
|
217
217
|
def initialize: (
|
|
218
|
-
call_id: String,
|
|
219
218
|
output: OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::output,
|
|
220
219
|
?id: String?,
|
|
220
|
+
?call_id: String?,
|
|
221
221
|
?caller_: OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::caller_?,
|
|
222
222
|
?name: String?,
|
|
223
223
|
?namespace: String?,
|
|
@@ -226,10 +226,10 @@ module OpenAI
|
|
|
226
226
|
) -> void
|
|
227
227
|
|
|
228
228
|
def to_hash: -> {
|
|
229
|
-
call_id: String,
|
|
230
229
|
output: OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::output,
|
|
231
230
|
type: :function_call_output,
|
|
232
231
|
id: String?,
|
|
232
|
+
call_id: String?,
|
|
233
233
|
caller_: OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput::caller_?,
|
|
234
234
|
name: String?,
|
|
235
235
|
namespace: String?,
|