openai 0.23.3 → 0.25.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 +17 -0
- data/README.md +1 -1
- data/lib/openai/errors.rb +25 -11
- data/lib/openai/internal/conversation_cursor_page.rb +1 -1
- data/lib/openai/internal/cursor_page.rb +1 -1
- data/lib/openai/internal/page.rb +1 -1
- data/lib/openai/internal/stream.rb +1 -0
- data/lib/openai/internal/transport/base_client.rb +11 -7
- data/lib/openai/internal/type/base_page.rb +1 -1
- data/lib/openai/internal/type/base_stream.rb +9 -1
- data/lib/openai/internal/util.rb +1 -1
- data/lib/openai/models/conversations/computer_screenshot_content.rb +2 -0
- data/lib/openai/models/conversations/conversation_item.rb +1 -0
- data/lib/openai/models/conversations/input_file_content.rb +1 -34
- data/lib/openai/models/conversations/input_image_content.rb +1 -54
- data/lib/openai/models/conversations/input_text_content.rb +1 -18
- data/lib/openai/models/conversations/message.rb +43 -8
- data/lib/openai/models/conversations/output_text_content.rb +1 -49
- data/lib/openai/models/conversations/refusal_content.rb +1 -18
- data/lib/openai/models/conversations/summary_text_content.rb +7 -2
- data/lib/openai/models/conversations/text_content.rb +2 -0
- data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +13 -1
- data/lib/openai/models/evals/run_cancel_response.rb +13 -1
- data/lib/openai/models/evals/run_create_params.rb +13 -1
- data/lib/openai/models/evals/run_create_response.rb +13 -1
- data/lib/openai/models/evals/run_list_response.rb +13 -1
- data/lib/openai/models/evals/run_retrieve_response.rb +13 -1
- data/lib/openai/models/evals/runs/output_item_list_response.rb +49 -4
- data/lib/openai/models/evals/runs/output_item_retrieve_response.rb +49 -4
- data/lib/openai/models/graders/score_model_grader.rb +56 -3
- data/lib/openai/models/responses/response_content.rb +25 -1
- data/lib/openai/models/responses/response_content_part_added_event.rb +27 -3
- data/lib/openai/models/responses/response_content_part_done_event.rb +27 -3
- data/lib/openai/models/responses/response_reasoning_item.rb +6 -8
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +5 -10
- data/rbi/openai/errors.rbi +29 -2
- data/rbi/openai/internal/transport/base_client.rbi +4 -5
- data/rbi/openai/internal/type/base_page.rbi +1 -1
- data/rbi/openai/internal/type/base_stream.rbi +16 -1
- data/rbi/openai/internal/util.rbi +1 -1
- data/rbi/openai/models/conversations/computer_screenshot_content.rbi +1 -0
- data/rbi/openai/models/conversations/input_file_content.rbi +1 -64
- data/rbi/openai/models/conversations/input_image_content.rbi +1 -105
- data/rbi/openai/models/conversations/input_text_content.rbi +1 -30
- data/rbi/openai/models/conversations/message.rbi +46 -10
- data/rbi/openai/models/conversations/output_text_content.rbi +1 -102
- data/rbi/openai/models/conversations/refusal_content.rbi +1 -30
- data/rbi/openai/models/conversations/summary_text_content.rbi +9 -1
- data/rbi/openai/models/conversations/text_content.rbi +1 -0
- data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +16 -0
- data/rbi/openai/models/evals/run_cancel_response.rbi +18 -0
- data/rbi/openai/models/evals/run_create_params.rbi +18 -0
- data/rbi/openai/models/evals/run_create_response.rbi +18 -0
- data/rbi/openai/models/evals/run_list_response.rbi +18 -0
- data/rbi/openai/models/evals/run_retrieve_response.rbi +18 -0
- data/rbi/openai/models/evals/runs/output_item_list_response.rbi +88 -5
- data/rbi/openai/models/evals/runs/output_item_retrieve_response.rbi +88 -5
- data/rbi/openai/models/graders/score_model_grader.rbi +88 -4
- data/rbi/openai/models/responses/response_content.rbi +34 -1
- data/rbi/openai/models/responses/response_content_part_added_event.rbi +36 -2
- data/rbi/openai/models/responses/response_content_part_done_event.rbi +36 -2
- data/rbi/openai/models/responses/response_reasoning_item.rbi +6 -4
- data/sig/openai/errors.rbs +7 -0
- data/sig/openai/internal/type/base_stream.rbs +5 -0
- data/sig/openai/models/conversations/input_file_content.rbs +1 -35
- data/sig/openai/models/conversations/input_image_content.rbs +1 -43
- data/sig/openai/models/conversations/input_text_content.rbs +1 -11
- data/sig/openai/models/conversations/message.rbs +18 -5
- data/sig/openai/models/conversations/output_text_content.rbs +1 -46
- data/sig/openai/models/conversations/refusal_content.rbs +1 -11
- data/sig/openai/models/evals/create_eval_completions_run_data_source.rbs +5 -0
- data/sig/openai/models/evals/run_cancel_response.rbs +5 -0
- data/sig/openai/models/evals/run_create_params.rbs +5 -0
- data/sig/openai/models/evals/run_create_response.rbs +5 -0
- data/sig/openai/models/evals/run_list_response.rbs +5 -0
- data/sig/openai/models/evals/run_retrieve_response.rbs +5 -0
- data/sig/openai/models/evals/runs/output_item_list_response.rbs +43 -4
- data/sig/openai/models/evals/runs/output_item_retrieve_response.rbs +43 -4
- data/sig/openai/models/graders/score_model_grader.rbs +44 -5
- data/sig/openai/models/responses/response_content.rbs +13 -0
- data/sig/openai/models/responses/response_content_part_added_event.rbs +13 -0
- data/sig/openai/models/responses/response_content_part_done_event.rbs +13 -0
- metadata +2 -17
- data/lib/openai/models/conversations/container_file_citation_body.rb +0 -58
- data/lib/openai/models/conversations/file_citation_body.rb +0 -42
- data/lib/openai/models/conversations/lob_prob.rb +0 -35
- data/lib/openai/models/conversations/top_log_prob.rb +0 -29
- data/lib/openai/models/conversations/url_citation_body.rb +0 -50
- data/rbi/openai/models/conversations/container_file_citation_body.rbi +0 -82
- data/rbi/openai/models/conversations/file_citation_body.rbi +0 -61
- data/rbi/openai/models/conversations/lob_prob.rbi +0 -50
- data/rbi/openai/models/conversations/top_log_prob.rbi +0 -41
- data/rbi/openai/models/conversations/url_citation_body.rbi +0 -74
- data/sig/openai/models/conversations/container_file_citation_body.rbs +0 -47
- data/sig/openai/models/conversations/file_citation_body.rbs +0 -37
- data/sig/openai/models/conversations/lob_prob.rbs +0 -37
- data/sig/openai/models/conversations/top_log_prob.rbs +0 -28
- data/sig/openai/models/conversations/url_citation_body.rbs +0 -42
@@ -422,6 +422,7 @@ module OpenAI
|
|
422
422
|
type sampling_params =
|
423
423
|
{
|
424
424
|
max_completion_tokens: Integer,
|
425
|
+
reasoning_effort: OpenAI::Models::reasoning_effort?,
|
425
426
|
seed: Integer,
|
426
427
|
temperature: Float,
|
427
428
|
text: OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text,
|
@@ -434,6 +435,8 @@ module OpenAI
|
|
434
435
|
|
435
436
|
def max_completion_tokens=: (Integer) -> Integer
|
436
437
|
|
438
|
+
attr_accessor reasoning_effort: OpenAI::Models::reasoning_effort?
|
439
|
+
|
437
440
|
attr_reader seed: Integer?
|
438
441
|
|
439
442
|
def seed=: (Integer) -> Integer
|
@@ -460,6 +463,7 @@ module OpenAI
|
|
460
463
|
|
461
464
|
def initialize: (
|
462
465
|
?max_completion_tokens: Integer,
|
466
|
+
?reasoning_effort: OpenAI::Models::reasoning_effort?,
|
463
467
|
?seed: Integer,
|
464
468
|
?temperature: Float,
|
465
469
|
?text: OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text,
|
@@ -469,6 +473,7 @@ module OpenAI
|
|
469
473
|
|
470
474
|
def to_hash: -> {
|
471
475
|
max_completion_tokens: Integer,
|
476
|
+
reasoning_effort: OpenAI::Models::reasoning_effort?,
|
472
477
|
seed: Integer,
|
473
478
|
temperature: Float,
|
474
479
|
text: OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams::Text,
|
@@ -459,6 +459,7 @@ module OpenAI
|
|
459
459
|
type sampling_params =
|
460
460
|
{
|
461
461
|
max_completion_tokens: Integer,
|
462
|
+
reasoning_effort: OpenAI::Models::reasoning_effort?,
|
462
463
|
seed: Integer,
|
463
464
|
temperature: Float,
|
464
465
|
text: OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams::Text,
|
@@ -471,6 +472,8 @@ module OpenAI
|
|
471
472
|
|
472
473
|
def max_completion_tokens=: (Integer) -> Integer
|
473
474
|
|
475
|
+
attr_accessor reasoning_effort: OpenAI::Models::reasoning_effort?
|
476
|
+
|
474
477
|
attr_reader seed: Integer?
|
475
478
|
|
476
479
|
def seed=: (Integer) -> Integer
|
@@ -497,6 +500,7 @@ module OpenAI
|
|
497
500
|
|
498
501
|
def initialize: (
|
499
502
|
?max_completion_tokens: Integer,
|
503
|
+
?reasoning_effort: OpenAI::Models::reasoning_effort?,
|
500
504
|
?seed: Integer,
|
501
505
|
?temperature: Float,
|
502
506
|
?text: OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams::Text,
|
@@ -506,6 +510,7 @@ module OpenAI
|
|
506
510
|
|
507
511
|
def to_hash: -> {
|
508
512
|
max_completion_tokens: Integer,
|
513
|
+
reasoning_effort: OpenAI::Models::reasoning_effort?,
|
509
514
|
seed: Integer,
|
510
515
|
temperature: Float,
|
511
516
|
text: OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams::Text,
|
@@ -459,6 +459,7 @@ module OpenAI
|
|
459
459
|
type sampling_params =
|
460
460
|
{
|
461
461
|
max_completion_tokens: Integer,
|
462
|
+
reasoning_effort: OpenAI::Models::reasoning_effort?,
|
462
463
|
seed: Integer,
|
463
464
|
temperature: Float,
|
464
465
|
text: OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams::Text,
|
@@ -471,6 +472,8 @@ module OpenAI
|
|
471
472
|
|
472
473
|
def max_completion_tokens=: (Integer) -> Integer
|
473
474
|
|
475
|
+
attr_accessor reasoning_effort: OpenAI::Models::reasoning_effort?
|
476
|
+
|
474
477
|
attr_reader seed: Integer?
|
475
478
|
|
476
479
|
def seed=: (Integer) -> Integer
|
@@ -497,6 +500,7 @@ module OpenAI
|
|
497
500
|
|
498
501
|
def initialize: (
|
499
502
|
?max_completion_tokens: Integer,
|
503
|
+
?reasoning_effort: OpenAI::Models::reasoning_effort?,
|
500
504
|
?seed: Integer,
|
501
505
|
?temperature: Float,
|
502
506
|
?text: OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams::Text,
|
@@ -506,6 +510,7 @@ module OpenAI
|
|
506
510
|
|
507
511
|
def to_hash: -> {
|
508
512
|
max_completion_tokens: Integer,
|
513
|
+
reasoning_effort: OpenAI::Models::reasoning_effort?,
|
509
514
|
seed: Integer,
|
510
515
|
temperature: Float,
|
511
516
|
text: OpenAI::Models::Evals::RunListResponse::DataSource::Responses::SamplingParams::Text,
|
@@ -459,6 +459,7 @@ module OpenAI
|
|
459
459
|
type sampling_params =
|
460
460
|
{
|
461
461
|
max_completion_tokens: Integer,
|
462
|
+
reasoning_effort: OpenAI::Models::reasoning_effort?,
|
462
463
|
seed: Integer,
|
463
464
|
temperature: Float,
|
464
465
|
text: OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams::Text,
|
@@ -471,6 +472,8 @@ module OpenAI
|
|
471
472
|
|
472
473
|
def max_completion_tokens=: (Integer) -> Integer
|
473
474
|
|
475
|
+
attr_accessor reasoning_effort: OpenAI::Models::reasoning_effort?
|
476
|
+
|
474
477
|
attr_reader seed: Integer?
|
475
478
|
|
476
479
|
def seed=: (Integer) -> Integer
|
@@ -497,6 +500,7 @@ module OpenAI
|
|
497
500
|
|
498
501
|
def initialize: (
|
499
502
|
?max_completion_tokens: Integer,
|
503
|
+
?reasoning_effort: OpenAI::Models::reasoning_effort?,
|
500
504
|
?seed: Integer,
|
501
505
|
?temperature: Float,
|
502
506
|
?text: OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams::Text,
|
@@ -506,6 +510,7 @@ module OpenAI
|
|
506
510
|
|
507
511
|
def to_hash: -> {
|
508
512
|
max_completion_tokens: Integer,
|
513
|
+
reasoning_effort: OpenAI::Models::reasoning_effort?,
|
509
514
|
seed: Integer,
|
510
515
|
temperature: Float,
|
511
516
|
text: OpenAI::Models::Evals::RunRetrieveResponse::DataSource::Responses::SamplingParams::Text,
|
@@ -10,7 +10,7 @@ module OpenAI
|
|
10
10
|
datasource_item_id: Integer,
|
11
11
|
eval_id: String,
|
12
12
|
object: :"eval.run.output_item",
|
13
|
-
results: ::Array[::
|
13
|
+
results: ::Array[OpenAI::Models::Evals::Runs::OutputItemListResponse::Result],
|
14
14
|
run_id: String,
|
15
15
|
sample: OpenAI::Models::Evals::Runs::OutputItemListResponse::Sample,
|
16
16
|
status: String
|
@@ -29,7 +29,7 @@ module OpenAI
|
|
29
29
|
|
30
30
|
attr_accessor object: :"eval.run.output_item"
|
31
31
|
|
32
|
-
attr_accessor results: ::Array[::
|
32
|
+
attr_accessor results: ::Array[OpenAI::Models::Evals::Runs::OutputItemListResponse::Result]
|
33
33
|
|
34
34
|
attr_accessor run_id: String
|
35
35
|
|
@@ -43,7 +43,7 @@ module OpenAI
|
|
43
43
|
datasource_item: ::Hash[Symbol, top],
|
44
44
|
datasource_item_id: Integer,
|
45
45
|
eval_id: String,
|
46
|
-
results: ::Array[::
|
46
|
+
results: ::Array[OpenAI::Models::Evals::Runs::OutputItemListResponse::Result],
|
47
47
|
run_id: String,
|
48
48
|
sample: OpenAI::Models::Evals::Runs::OutputItemListResponse::Sample,
|
49
49
|
status: String,
|
@@ -57,12 +57,51 @@ module OpenAI
|
|
57
57
|
datasource_item_id: Integer,
|
58
58
|
eval_id: String,
|
59
59
|
object: :"eval.run.output_item",
|
60
|
-
results: ::Array[::
|
60
|
+
results: ::Array[OpenAI::Models::Evals::Runs::OutputItemListResponse::Result],
|
61
61
|
run_id: String,
|
62
62
|
sample: OpenAI::Models::Evals::Runs::OutputItemListResponse::Sample,
|
63
63
|
status: String
|
64
64
|
}
|
65
65
|
|
66
|
+
type result =
|
67
|
+
{
|
68
|
+
name: String,
|
69
|
+
passed: bool,
|
70
|
+
score: Float,
|
71
|
+
sample: ::Hash[Symbol, top]?,
|
72
|
+
type: String
|
73
|
+
}
|
74
|
+
|
75
|
+
class Result < OpenAI::Internal::Type::BaseModel
|
76
|
+
attr_accessor name: String
|
77
|
+
|
78
|
+
attr_accessor passed: bool
|
79
|
+
|
80
|
+
attr_accessor score: Float
|
81
|
+
|
82
|
+
attr_accessor sample: ::Hash[Symbol, top]?
|
83
|
+
|
84
|
+
attr_reader type: String?
|
85
|
+
|
86
|
+
def type=: (String) -> String
|
87
|
+
|
88
|
+
def initialize: (
|
89
|
+
name: String,
|
90
|
+
passed: bool,
|
91
|
+
score: Float,
|
92
|
+
?sample: ::Hash[Symbol, top]?,
|
93
|
+
?type: String
|
94
|
+
) -> void
|
95
|
+
|
96
|
+
def to_hash: -> {
|
97
|
+
name: String,
|
98
|
+
passed: bool,
|
99
|
+
score: Float,
|
100
|
+
sample: ::Hash[Symbol, top]?,
|
101
|
+
type: String
|
102
|
+
}
|
103
|
+
end
|
104
|
+
|
66
105
|
type sample =
|
67
106
|
{
|
68
107
|
error: OpenAI::Evals::EvalAPIError,
|
@@ -10,7 +10,7 @@ module OpenAI
|
|
10
10
|
datasource_item_id: Integer,
|
11
11
|
eval_id: String,
|
12
12
|
object: :"eval.run.output_item",
|
13
|
-
results: ::Array[::
|
13
|
+
results: ::Array[OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Result],
|
14
14
|
run_id: String,
|
15
15
|
sample: OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample,
|
16
16
|
status: String
|
@@ -29,7 +29,7 @@ module OpenAI
|
|
29
29
|
|
30
30
|
attr_accessor object: :"eval.run.output_item"
|
31
31
|
|
32
|
-
attr_accessor results: ::Array[::
|
32
|
+
attr_accessor results: ::Array[OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Result]
|
33
33
|
|
34
34
|
attr_accessor run_id: String
|
35
35
|
|
@@ -43,7 +43,7 @@ module OpenAI
|
|
43
43
|
datasource_item: ::Hash[Symbol, top],
|
44
44
|
datasource_item_id: Integer,
|
45
45
|
eval_id: String,
|
46
|
-
results: ::Array[::
|
46
|
+
results: ::Array[OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Result],
|
47
47
|
run_id: String,
|
48
48
|
sample: OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample,
|
49
49
|
status: String,
|
@@ -57,12 +57,51 @@ module OpenAI
|
|
57
57
|
datasource_item_id: Integer,
|
58
58
|
eval_id: String,
|
59
59
|
object: :"eval.run.output_item",
|
60
|
-
results: ::Array[::
|
60
|
+
results: ::Array[OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Result],
|
61
61
|
run_id: String,
|
62
62
|
sample: OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample,
|
63
63
|
status: String
|
64
64
|
}
|
65
65
|
|
66
|
+
type result =
|
67
|
+
{
|
68
|
+
name: String,
|
69
|
+
passed: bool,
|
70
|
+
score: Float,
|
71
|
+
sample: ::Hash[Symbol, top]?,
|
72
|
+
type: String
|
73
|
+
}
|
74
|
+
|
75
|
+
class Result < OpenAI::Internal::Type::BaseModel
|
76
|
+
attr_accessor name: String
|
77
|
+
|
78
|
+
attr_accessor passed: bool
|
79
|
+
|
80
|
+
attr_accessor score: Float
|
81
|
+
|
82
|
+
attr_accessor sample: ::Hash[Symbol, top]?
|
83
|
+
|
84
|
+
attr_reader type: String?
|
85
|
+
|
86
|
+
def type=: (String) -> String
|
87
|
+
|
88
|
+
def initialize: (
|
89
|
+
name: String,
|
90
|
+
passed: bool,
|
91
|
+
score: Float,
|
92
|
+
?sample: ::Hash[Symbol, top]?,
|
93
|
+
?type: String
|
94
|
+
) -> void
|
95
|
+
|
96
|
+
def to_hash: -> {
|
97
|
+
name: String,
|
98
|
+
passed: bool,
|
99
|
+
score: Float,
|
100
|
+
sample: ::Hash[Symbol, top]?,
|
101
|
+
type: String
|
102
|
+
}
|
103
|
+
end
|
104
|
+
|
66
105
|
type sample =
|
67
106
|
{
|
68
107
|
error: OpenAI::Evals::EvalAPIError,
|
@@ -10,7 +10,7 @@ module OpenAI
|
|
10
10
|
name: String,
|
11
11
|
type: :score_model,
|
12
12
|
range: ::Array[Float],
|
13
|
-
sampling_params:
|
13
|
+
sampling_params: OpenAI::Graders::ScoreModelGrader::SamplingParams
|
14
14
|
}
|
15
15
|
|
16
16
|
class ScoreModelGrader < OpenAI::Internal::Type::BaseModel
|
@@ -26,16 +26,18 @@ module OpenAI
|
|
26
26
|
|
27
27
|
def range=: (::Array[Float]) -> ::Array[Float]
|
28
28
|
|
29
|
-
attr_reader sampling_params:
|
29
|
+
attr_reader sampling_params: OpenAI::Graders::ScoreModelGrader::SamplingParams?
|
30
30
|
|
31
|
-
def sampling_params=: (
|
31
|
+
def sampling_params=: (
|
32
|
+
OpenAI::Graders::ScoreModelGrader::SamplingParams
|
33
|
+
) -> OpenAI::Graders::ScoreModelGrader::SamplingParams
|
32
34
|
|
33
35
|
def initialize: (
|
34
36
|
input: ::Array[OpenAI::Graders::ScoreModelGrader::Input],
|
35
37
|
model: String,
|
36
38
|
name: String,
|
37
39
|
?range: ::Array[Float],
|
38
|
-
?sampling_params:
|
40
|
+
?sampling_params: OpenAI::Graders::ScoreModelGrader::SamplingParams,
|
39
41
|
?type: :score_model
|
40
42
|
) -> void
|
41
43
|
|
@@ -45,7 +47,7 @@ module OpenAI
|
|
45
47
|
name: String,
|
46
48
|
type: :score_model,
|
47
49
|
range: ::Array[Float],
|
48
|
-
sampling_params:
|
50
|
+
sampling_params: OpenAI::Graders::ScoreModelGrader::SamplingParams
|
49
51
|
}
|
50
52
|
|
51
53
|
type input =
|
@@ -154,6 +156,43 @@ module OpenAI
|
|
154
156
|
def self?.values: -> ::Array[OpenAI::Models::Graders::ScoreModelGrader::Input::type_]
|
155
157
|
end
|
156
158
|
end
|
159
|
+
|
160
|
+
type sampling_params =
|
161
|
+
{
|
162
|
+
max_completions_tokens: Integer?,
|
163
|
+
reasoning_effort: OpenAI::Models::reasoning_effort?,
|
164
|
+
seed: Integer?,
|
165
|
+
temperature: Float?,
|
166
|
+
top_p: Float?
|
167
|
+
}
|
168
|
+
|
169
|
+
class SamplingParams < OpenAI::Internal::Type::BaseModel
|
170
|
+
attr_accessor max_completions_tokens: Integer?
|
171
|
+
|
172
|
+
attr_accessor reasoning_effort: OpenAI::Models::reasoning_effort?
|
173
|
+
|
174
|
+
attr_accessor seed: Integer?
|
175
|
+
|
176
|
+
attr_accessor temperature: Float?
|
177
|
+
|
178
|
+
attr_accessor top_p: Float?
|
179
|
+
|
180
|
+
def initialize: (
|
181
|
+
?max_completions_tokens: Integer?,
|
182
|
+
?reasoning_effort: OpenAI::Models::reasoning_effort?,
|
183
|
+
?seed: Integer?,
|
184
|
+
?temperature: Float?,
|
185
|
+
?top_p: Float?
|
186
|
+
) -> void
|
187
|
+
|
188
|
+
def to_hash: -> {
|
189
|
+
max_completions_tokens: Integer?,
|
190
|
+
reasoning_effort: OpenAI::Models::reasoning_effort?,
|
191
|
+
seed: Integer?,
|
192
|
+
temperature: Float?,
|
193
|
+
top_p: Float?
|
194
|
+
}
|
195
|
+
end
|
157
196
|
end
|
158
197
|
end
|
159
198
|
end
|
@@ -8,10 +8,23 @@ module OpenAI
|
|
8
8
|
| OpenAI::Responses::ResponseInputAudio
|
9
9
|
| OpenAI::Responses::ResponseOutputText
|
10
10
|
| OpenAI::Responses::ResponseOutputRefusal
|
11
|
+
| OpenAI::Responses::ResponseContent::ReasoningTextContent
|
11
12
|
|
12
13
|
module ResponseContent
|
13
14
|
extend OpenAI::Internal::Type::Union
|
14
15
|
|
16
|
+
type reasoning_text_content = { text: String, type: :reasoning_text }
|
17
|
+
|
18
|
+
class ReasoningTextContent < OpenAI::Internal::Type::BaseModel
|
19
|
+
attr_accessor text: String
|
20
|
+
|
21
|
+
attr_accessor type: :reasoning_text
|
22
|
+
|
23
|
+
def initialize: (text: String, ?type: :reasoning_text) -> void
|
24
|
+
|
25
|
+
def to_hash: -> { text: String, type: :reasoning_text }
|
26
|
+
end
|
27
|
+
|
15
28
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::response_content]
|
16
29
|
end
|
17
30
|
end
|
@@ -45,10 +45,23 @@ module OpenAI
|
|
45
45
|
type part =
|
46
46
|
OpenAI::Responses::ResponseOutputText
|
47
47
|
| OpenAI::Responses::ResponseOutputRefusal
|
48
|
+
| OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText
|
48
49
|
|
49
50
|
module Part
|
50
51
|
extend OpenAI::Internal::Type::Union
|
51
52
|
|
53
|
+
type reasoning_text = { text: String, type: :reasoning_text }
|
54
|
+
|
55
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
56
|
+
attr_accessor text: String
|
57
|
+
|
58
|
+
attr_accessor type: :reasoning_text
|
59
|
+
|
60
|
+
def initialize: (text: String, ?type: :reasoning_text) -> void
|
61
|
+
|
62
|
+
def to_hash: -> { text: String, type: :reasoning_text }
|
63
|
+
end
|
64
|
+
|
52
65
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::ResponseContentPartAddedEvent::part]
|
53
66
|
end
|
54
67
|
end
|
@@ -45,10 +45,23 @@ module OpenAI
|
|
45
45
|
type part =
|
46
46
|
OpenAI::Responses::ResponseOutputText
|
47
47
|
| OpenAI::Responses::ResponseOutputRefusal
|
48
|
+
| OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText
|
48
49
|
|
49
50
|
module Part
|
50
51
|
extend OpenAI::Internal::Type::Union
|
51
52
|
|
53
|
+
type reasoning_text = { text: String, type: :reasoning_text }
|
54
|
+
|
55
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
56
|
+
attr_accessor text: String
|
57
|
+
|
58
|
+
attr_accessor type: :reasoning_text
|
59
|
+
|
60
|
+
def initialize: (text: String, ?type: :reasoning_text) -> void
|
61
|
+
|
62
|
+
def to_hash: -> { text: String, type: :reasoning_text }
|
63
|
+
end
|
64
|
+
|
52
65
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::ResponseContentPartDoneEvent::part]
|
53
66
|
end
|
54
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
@@ -252,7 +252,6 @@ files:
|
|
252
252
|
- lib/openai/models/containers/file_retrieve_response.rb
|
253
253
|
- lib/openai/models/containers/files/content_retrieve_params.rb
|
254
254
|
- lib/openai/models/conversations/computer_screenshot_content.rb
|
255
|
-
- lib/openai/models/conversations/container_file_citation_body.rb
|
256
255
|
- lib/openai/models/conversations/conversation.rb
|
257
256
|
- lib/openai/models/conversations/conversation_create_params.rb
|
258
257
|
- lib/openai/models/conversations/conversation_delete_params.rb
|
@@ -262,7 +261,6 @@ files:
|
|
262
261
|
- lib/openai/models/conversations/conversation_item_list.rb
|
263
262
|
- lib/openai/models/conversations/conversation_retrieve_params.rb
|
264
263
|
- lib/openai/models/conversations/conversation_update_params.rb
|
265
|
-
- lib/openai/models/conversations/file_citation_body.rb
|
266
264
|
- lib/openai/models/conversations/input_file_content.rb
|
267
265
|
- lib/openai/models/conversations/input_image_content.rb
|
268
266
|
- lib/openai/models/conversations/input_text_content.rb
|
@@ -270,14 +268,11 @@ files:
|
|
270
268
|
- lib/openai/models/conversations/item_delete_params.rb
|
271
269
|
- lib/openai/models/conversations/item_list_params.rb
|
272
270
|
- lib/openai/models/conversations/item_retrieve_params.rb
|
273
|
-
- lib/openai/models/conversations/lob_prob.rb
|
274
271
|
- lib/openai/models/conversations/message.rb
|
275
272
|
- lib/openai/models/conversations/output_text_content.rb
|
276
273
|
- lib/openai/models/conversations/refusal_content.rb
|
277
274
|
- lib/openai/models/conversations/summary_text_content.rb
|
278
275
|
- lib/openai/models/conversations/text_content.rb
|
279
|
-
- lib/openai/models/conversations/top_log_prob.rb
|
280
|
-
- lib/openai/models/conversations/url_citation_body.rb
|
281
276
|
- lib/openai/models/create_embedding_response.rb
|
282
277
|
- lib/openai/models/custom_tool_input_format.rb
|
283
278
|
- lib/openai/models/embedding.rb
|
@@ -931,7 +926,6 @@ files:
|
|
931
926
|
- rbi/openai/models/containers/file_retrieve_response.rbi
|
932
927
|
- rbi/openai/models/containers/files/content_retrieve_params.rbi
|
933
928
|
- rbi/openai/models/conversations/computer_screenshot_content.rbi
|
934
|
-
- rbi/openai/models/conversations/container_file_citation_body.rbi
|
935
929
|
- rbi/openai/models/conversations/conversation.rbi
|
936
930
|
- rbi/openai/models/conversations/conversation_create_params.rbi
|
937
931
|
- rbi/openai/models/conversations/conversation_delete_params.rbi
|
@@ -941,7 +935,6 @@ files:
|
|
941
935
|
- rbi/openai/models/conversations/conversation_item_list.rbi
|
942
936
|
- rbi/openai/models/conversations/conversation_retrieve_params.rbi
|
943
937
|
- rbi/openai/models/conversations/conversation_update_params.rbi
|
944
|
-
- rbi/openai/models/conversations/file_citation_body.rbi
|
945
938
|
- rbi/openai/models/conversations/input_file_content.rbi
|
946
939
|
- rbi/openai/models/conversations/input_image_content.rbi
|
947
940
|
- rbi/openai/models/conversations/input_text_content.rbi
|
@@ -949,14 +942,11 @@ files:
|
|
949
942
|
- rbi/openai/models/conversations/item_delete_params.rbi
|
950
943
|
- rbi/openai/models/conversations/item_list_params.rbi
|
951
944
|
- rbi/openai/models/conversations/item_retrieve_params.rbi
|
952
|
-
- rbi/openai/models/conversations/lob_prob.rbi
|
953
945
|
- rbi/openai/models/conversations/message.rbi
|
954
946
|
- rbi/openai/models/conversations/output_text_content.rbi
|
955
947
|
- rbi/openai/models/conversations/refusal_content.rbi
|
956
948
|
- rbi/openai/models/conversations/summary_text_content.rbi
|
957
949
|
- rbi/openai/models/conversations/text_content.rbi
|
958
|
-
- rbi/openai/models/conversations/top_log_prob.rbi
|
959
|
-
- rbi/openai/models/conversations/url_citation_body.rbi
|
960
950
|
- rbi/openai/models/create_embedding_response.rbi
|
961
951
|
- rbi/openai/models/custom_tool_input_format.rbi
|
962
952
|
- rbi/openai/models/embedding.rbi
|
@@ -1600,7 +1590,6 @@ files:
|
|
1600
1590
|
- sig/openai/models/containers/file_retrieve_response.rbs
|
1601
1591
|
- sig/openai/models/containers/files/content_retrieve_params.rbs
|
1602
1592
|
- sig/openai/models/conversations/computer_screenshot_content.rbs
|
1603
|
-
- sig/openai/models/conversations/container_file_citation_body.rbs
|
1604
1593
|
- sig/openai/models/conversations/conversation.rbs
|
1605
1594
|
- sig/openai/models/conversations/conversation_create_params.rbs
|
1606
1595
|
- sig/openai/models/conversations/conversation_delete_params.rbs
|
@@ -1610,7 +1599,6 @@ files:
|
|
1610
1599
|
- sig/openai/models/conversations/conversation_item_list.rbs
|
1611
1600
|
- sig/openai/models/conversations/conversation_retrieve_params.rbs
|
1612
1601
|
- sig/openai/models/conversations/conversation_update_params.rbs
|
1613
|
-
- sig/openai/models/conversations/file_citation_body.rbs
|
1614
1602
|
- sig/openai/models/conversations/input_file_content.rbs
|
1615
1603
|
- sig/openai/models/conversations/input_image_content.rbs
|
1616
1604
|
- sig/openai/models/conversations/input_text_content.rbs
|
@@ -1618,14 +1606,11 @@ files:
|
|
1618
1606
|
- sig/openai/models/conversations/item_delete_params.rbs
|
1619
1607
|
- sig/openai/models/conversations/item_list_params.rbs
|
1620
1608
|
- sig/openai/models/conversations/item_retrieve_params.rbs
|
1621
|
-
- sig/openai/models/conversations/lob_prob.rbs
|
1622
1609
|
- sig/openai/models/conversations/message.rbs
|
1623
1610
|
- sig/openai/models/conversations/output_text_content.rbs
|
1624
1611
|
- sig/openai/models/conversations/refusal_content.rbs
|
1625
1612
|
- sig/openai/models/conversations/summary_text_content.rbs
|
1626
1613
|
- sig/openai/models/conversations/text_content.rbs
|
1627
|
-
- sig/openai/models/conversations/top_log_prob.rbs
|
1628
|
-
- sig/openai/models/conversations/url_citation_body.rbs
|
1629
1614
|
- sig/openai/models/create_embedding_response.rbs
|
1630
1615
|
- sig/openai/models/custom_tool_input_format.rbs
|
1631
1616
|
- sig/openai/models/embedding.rbs
|
@@ -1,58 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module OpenAI
|
4
|
-
module Models
|
5
|
-
module Conversations
|
6
|
-
class ContainerFileCitationBody < OpenAI::Internal::Type::BaseModel
|
7
|
-
# @!attribute container_id
|
8
|
-
# The ID of the container file.
|
9
|
-
#
|
10
|
-
# @return [String]
|
11
|
-
required :container_id, String
|
12
|
-
|
13
|
-
# @!attribute end_index
|
14
|
-
# The index of the last character of the container file citation in the message.
|
15
|
-
#
|
16
|
-
# @return [Integer]
|
17
|
-
required :end_index, Integer
|
18
|
-
|
19
|
-
# @!attribute file_id
|
20
|
-
# The ID of the file.
|
21
|
-
#
|
22
|
-
# @return [String]
|
23
|
-
required :file_id, String
|
24
|
-
|
25
|
-
# @!attribute filename
|
26
|
-
# The filename of the container file cited.
|
27
|
-
#
|
28
|
-
# @return [String]
|
29
|
-
required :filename, String
|
30
|
-
|
31
|
-
# @!attribute start_index
|
32
|
-
# The index of the first character of the container file citation in the message.
|
33
|
-
#
|
34
|
-
# @return [Integer]
|
35
|
-
required :start_index, Integer
|
36
|
-
|
37
|
-
# @!attribute type
|
38
|
-
# The type of the container file citation. Always `container_file_citation`.
|
39
|
-
#
|
40
|
-
# @return [Symbol, :container_file_citation]
|
41
|
-
required :type, const: :container_file_citation
|
42
|
-
|
43
|
-
# @!method initialize(container_id:, end_index:, file_id:, filename:, start_index:, type: :container_file_citation)
|
44
|
-
# @param container_id [String] The ID of the container file.
|
45
|
-
#
|
46
|
-
# @param end_index [Integer] The index of the last character of the container file citation in the message.
|
47
|
-
#
|
48
|
-
# @param file_id [String] The ID of the file.
|
49
|
-
#
|
50
|
-
# @param filename [String] The filename of the container file cited.
|
51
|
-
#
|
52
|
-
# @param start_index [Integer] The index of the first character of the container file citation in the message.
|
53
|
-
#
|
54
|
-
# @param type [Symbol, :container_file_citation] The type of the container file citation. Always `container_file_citation`.
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module OpenAI
|
4
|
-
module Models
|
5
|
-
module Conversations
|
6
|
-
class FileCitationBody < OpenAI::Internal::Type::BaseModel
|
7
|
-
# @!attribute file_id
|
8
|
-
# The ID of the file.
|
9
|
-
#
|
10
|
-
# @return [String]
|
11
|
-
required :file_id, String
|
12
|
-
|
13
|
-
# @!attribute filename
|
14
|
-
# The filename of the file cited.
|
15
|
-
#
|
16
|
-
# @return [String]
|
17
|
-
required :filename, String
|
18
|
-
|
19
|
-
# @!attribute index
|
20
|
-
# The index of the file in the list of files.
|
21
|
-
#
|
22
|
-
# @return [Integer]
|
23
|
-
required :index, Integer
|
24
|
-
|
25
|
-
# @!attribute type
|
26
|
-
# The type of the file citation. Always `file_citation`.
|
27
|
-
#
|
28
|
-
# @return [Symbol, :file_citation]
|
29
|
-
required :type, const: :file_citation
|
30
|
-
|
31
|
-
# @!method initialize(file_id:, filename:, index:, type: :file_citation)
|
32
|
-
# @param file_id [String] The ID of the file.
|
33
|
-
#
|
34
|
-
# @param filename [String] The filename of the file cited.
|
35
|
-
#
|
36
|
-
# @param index [Integer] The index of the file in the list of files.
|
37
|
-
#
|
38
|
-
# @param type [Symbol, :file_citation] The type of the file citation. Always `file_citation`.
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|