openai 0.111.0 → 0.112.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 +8 -0
- data/README.md +1 -1
- data/lib/openai/models/beta/agent.rb +2 -2
- data/lib/openai/models/beta/agent_create_params.rb +2 -2
- data/lib/openai/models/beta/agent_session.rb +2 -2
- data/lib/openai/models/beta/agent_tool.rb +18 -1
- data/lib/openai/models/beta/agent_tool_param.rb +18 -1
- data/lib/openai/models/beta/agent_update_params.rb +2 -2
- data/lib/openai/models/beta/agents/session_create_params.rb +2 -2
- data/lib/openai/models/beta/beta_response_input_file.rb +23 -1
- data/lib/openai/models/beta/beta_response_input_file_content.rb +23 -1
- data/lib/openai/models/beta/beta_response_input_image.rb +23 -1
- data/lib/openai/models/beta/beta_response_input_image_content.rb +23 -1
- data/lib/openai/models/beta/beta_response_input_text.rb +23 -1
- data/lib/openai/models/beta/beta_response_input_text_content.rb +23 -1
- data/lib/openai/models/beta/beta_response_item.rb +28 -1
- data/lib/openai/models/beta/beta_response_output_item.rb +28 -1
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +26 -15
- data/lib/openai/models/beta/beta_tool.rb +26 -15
- data/lib/openai/models/beta/persisted_agent_tool.rb +18 -1
- data/lib/openai/models/beta/persisted_agent_tool_param.rb +18 -1
- data/lib/openai/models/chat/chat_completion_content_part.rb +23 -1
- data/lib/openai/models/chat/chat_completion_content_part_image.rb +23 -1
- data/lib/openai/models/chat/chat_completion_content_part_input_audio.rb +23 -1
- data/lib/openai/models/chat/chat_completion_content_part_text.rb +23 -1
- data/lib/openai/models/conversations/computer_screenshot_content.rb +23 -1
- data/lib/openai/models/decision_create_params.rb +8 -4
- data/lib/openai/models/image_edit_params.rb +20 -4
- data/lib/openai/models/image_generate_params.rb +23 -7
- data/lib/openai/models/image_model.rb +2 -0
- data/lib/openai/models/live/client_delegation.rb +20 -1
- data/lib/openai/models/live/client_event.rb +4 -4
- data/lib/openai/models/live/commentary_append_event.rb +1 -1
- data/lib/openai/models/live/decision_assistant_message.rb +154 -0
- data/lib/openai/models/live/decision_choice_option.rb +35 -0
- data/lib/openai/models/live/decision_developer_message.rb +70 -0
- data/lib/openai/models/live/decision_input_text.rb +26 -0
- data/lib/openai/models/live/decision_item_create_event.rb +490 -131
- data/lib/openai/models/live/decision_item_created_event.rb +486 -131
- data/lib/openai/models/live/decision_json_object.rb +10 -0
- data/lib/openai/models/live/decision_question.rb +172 -0
- data/lib/openai/models/live/decision_stored_assistant_message.rb +152 -0
- data/lib/openai/models/live/decision_stored_developer_message.rb +68 -0
- data/lib/openai/models/live/decision_stored_system_message.rb +68 -0
- data/lib/openai/models/live/decision_stored_user_message.rb +195 -0
- data/lib/openai/models/live/decision_system_message.rb +70 -0
- data/lib/openai/models/live/decision_trigger.rb +6 -258
- data/lib/openai/models/live/decision_user_message.rb +193 -0
- data/lib/openai/models/live/decisions_delegation_config.rb +5 -250
- data/lib/openai/models/live/decisions_delegation_update_config.rb +5 -257
- data/lib/openai/models/live/fork_client_event.rb +4 -4
- data/lib/openai/models/live/fork_server_event.rb +2 -2
- data/lib/openai/models/live/fork_session_config.rb +20 -1
- data/lib/openai/models/live/input_audio_muted_event.rb +3 -2
- data/lib/openai/models/live/input_audio_unmute_event.rb +2 -1
- data/lib/openai/models/live/input_audio_unmuted_event.rb +3 -2
- data/lib/openai/models/live/instructions_append_event.rb +5 -2
- data/lib/openai/models/live/media_session_config.rb +39 -2
- data/lib/openai/models/live/media_session_fork_config.rb +20 -1
- data/lib/openai/models/live/server_event.rb +2 -2
- data/lib/openai/models/live/session_accept_params.rb +39 -2
- data/lib/openai/models/live/session_config.rb +39 -2
- data/lib/openai/models/live/session_resource.rb +39 -2
- data/lib/openai/models/live/session_update_config.rb +41 -2
- data/lib/openai/models/live/sideband_client_event.rb +4 -4
- data/lib/openai/models/live/sideband_server_event.rb +2 -2
- data/lib/openai/models/live/thinking_append_event.rb +1 -1
- data/lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb +10 -12
- data/lib/openai/models/realtime/realtime_error_event.rb +1 -1
- data/lib/openai/models/realtime/realtime_server_event.rb +1 -1
- data/lib/openai/models/realtime/realtime_translation_server_event.rb +1 -1
- data/lib/openai/models/responses/response_input_file.rb +23 -1
- data/lib/openai/models/responses/response_input_file_content.rb +23 -1
- data/lib/openai/models/responses/response_input_image.rb +23 -1
- data/lib/openai/models/responses/response_input_image_content.rb +23 -1
- data/lib/openai/models/responses/response_input_text.rb +23 -1
- data/lib/openai/models/responses/response_input_text_content.rb +23 -1
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +26 -15
- data/lib/openai/models/responses/tool.rb +26 -15
- data/lib/openai/resources/beta/agents.rb +2 -2
- data/lib/openai/resources/beta/responses.rb +2 -2
- data/lib/openai/resources/images.rb +18 -6
- data/lib/openai/resources/live/forks.rb +2 -2
- data/lib/openai/resources/live/sideband.rb +2 -2
- data/lib/openai/resources/live.rb +2 -2
- data/lib/openai/resources/realtime/translations.rb +2 -2
- data/lib/openai/resources/realtime.rb +2 -2
- data/lib/openai/resources/responses.rb +2 -2
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +12 -0
- data/rbi/openai/models/beta/agent.rbi +2 -1
- data/rbi/openai/models/beta/agent_create_params.rbi +6 -3
- data/rbi/openai/models/beta/agent_session.rbi +2 -1
- data/rbi/openai/models/beta/agent_tool.rbi +40 -1
- data/rbi/openai/models/beta/agent_tool_param.rbi +40 -1
- data/rbi/openai/models/beta/agent_update_params.rbi +6 -3
- data/rbi/openai/models/beta/agents/session_create_params.rbi +6 -3
- data/rbi/openai/models/beta/beta_response_input_file.rbi +31 -1
- data/rbi/openai/models/beta/beta_response_input_file_content.rbi +39 -1
- data/rbi/openai/models/beta/beta_response_input_image.rbi +31 -1
- data/rbi/openai/models/beta/beta_response_input_image_content.rbi +39 -1
- data/rbi/openai/models/beta/beta_response_input_text.rbi +31 -1
- data/rbi/openai/models/beta/beta_response_input_text_content.rbi +39 -1
- data/rbi/openai/models/beta/beta_response_item.rbi +58 -1
- data/rbi/openai/models/beta/beta_response_output_item.rbi +58 -1
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +24 -15
- data/rbi/openai/models/beta/beta_tool.rbi +24 -15
- data/rbi/openai/models/beta/persisted_agent_tool.rbi +40 -1
- data/rbi/openai/models/beta/persisted_agent_tool_param.rbi +40 -1
- data/rbi/openai/models/chat/chat_completion_content_part.rbi +43 -1
- data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +41 -1
- data/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi +46 -1
- data/rbi/openai/models/chat/chat_completion_content_part_text.rbi +39 -1
- data/rbi/openai/models/conversations/computer_screenshot_content.rbi +48 -1
- data/rbi/openai/models/image_edit_params.rbi +12 -3
- data/rbi/openai/models/image_generate_params.rbi +15 -6
- data/rbi/openai/models/live/client_delegation.rbi +23 -1
- data/rbi/openai/models/live/commentary_append_event.rbi +1 -1
- data/rbi/openai/models/live/decision_assistant_message.rbi +247 -0
- data/rbi/openai/models/live/decision_choice_option.rbi +67 -0
- data/rbi/openai/models/live/decision_developer_message.rbi +109 -0
- data/rbi/openai/models/live/decision_input_text.rbi +55 -0
- data/rbi/openai/models/live/decision_item_create_event.rbi +765 -184
- data/rbi/openai/models/live/decision_item_created_event.rbi +737 -184
- data/rbi/openai/models/live/decision_json_object.rbi +16 -0
- data/rbi/openai/models/live/decision_question.rbi +300 -0
- data/rbi/openai/models/live/decision_stored_assistant_message.rbi +245 -0
- data/rbi/openai/models/live/decision_stored_developer_message.rbi +107 -0
- data/rbi/openai/models/live/decision_stored_system_message.rbi +107 -0
- data/rbi/openai/models/live/decision_stored_user_message.rbi +333 -0
- data/rbi/openai/models/live/decision_system_message.rbi +109 -0
- data/rbi/openai/models/live/decision_trigger.rbi +11 -383
- data/rbi/openai/models/live/decision_user_message.rbi +320 -0
- data/rbi/openai/models/live/decisions_delegation_config.rbi +10 -384
- data/rbi/openai/models/live/decisions_delegation_update_config.rbi +13 -387
- data/rbi/openai/models/live/fork_session_config.rbi +27 -1
- data/rbi/openai/models/live/input_audio_muted_event.rbi +3 -2
- data/rbi/openai/models/live/input_audio_unmute_event.rbi +2 -1
- data/rbi/openai/models/live/input_audio_unmuted_event.rbi +3 -2
- data/rbi/openai/models/live/instructions_append_event.rbi +5 -2
- data/rbi/openai/models/live/media_session_config.rbi +44 -2
- data/rbi/openai/models/live/media_session_fork_config.rbi +27 -1
- data/rbi/openai/models/live/session_accept_params.rbi +44 -2
- data/rbi/openai/models/live/session_config.rbi +44 -2
- data/rbi/openai/models/live/session_resource.rbi +44 -2
- data/rbi/openai/models/live/session_update_config.rbi +54 -2
- data/rbi/openai/models/live/thinking_append_event.rbi +1 -1
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbi +10 -12
- data/rbi/openai/models/realtime/realtime_error_event.rbi +1 -1
- data/rbi/openai/models/responses/response_input_file.rbi +31 -1
- data/rbi/openai/models/responses/response_input_file_content.rbi +39 -1
- data/rbi/openai/models/responses/response_input_image.rbi +33 -1
- data/rbi/openai/models/responses/response_input_image_content.rbi +41 -1
- data/rbi/openai/models/responses/response_input_text.rbi +31 -1
- data/rbi/openai/models/responses/response_input_text_content.rbi +39 -1
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +24 -15
- data/rbi/openai/models/responses/tool.rbi +24 -15
- data/rbi/openai/resources/beta/agents.rbi +4 -2
- data/rbi/openai/resources/beta/responses.rbi +8 -1
- data/rbi/openai/resources/images.rbi +18 -6
- data/rbi/openai/resources/live/forks.rbi +8 -1
- data/rbi/openai/resources/live/sideband.rbi +8 -1
- data/rbi/openai/resources/live.rbi +8 -1
- data/rbi/openai/resources/realtime/translations.rbi +8 -1
- data/rbi/openai/resources/realtime.rbi +8 -1
- data/rbi/openai/resources/responses.rbi +8 -1
- data/sig/openai/models/beta/agent_tool.rbs +14 -0
- data/sig/openai/models/beta/agent_tool_param.rbs +14 -0
- data/sig/openai/models/beta/beta_response_input_file.rbs +34 -3
- data/sig/openai/models/beta/beta_response_input_file_content.rbs +34 -3
- data/sig/openai/models/beta/beta_response_input_image.rbs +34 -3
- data/sig/openai/models/beta/beta_response_input_image_content.rbs +34 -3
- data/sig/openai/models/beta/beta_response_input_text.rbs +34 -3
- data/sig/openai/models/beta/beta_response_input_text_content.rbs +34 -3
- data/sig/openai/models/beta/beta_response_item.rbs +34 -3
- data/sig/openai/models/beta/beta_response_output_item.rbs +34 -3
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +24 -15
- data/sig/openai/models/beta/beta_tool.rbs +24 -15
- data/sig/openai/models/beta/persisted_agent_tool.rbs +14 -0
- data/sig/openai/models/beta/persisted_agent_tool_param.rbs +14 -0
- data/sig/openai/models/chat/chat_completion_content_part.rbs +34 -3
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +34 -3
- data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +34 -3
- data/sig/openai/models/chat/chat_completion_content_part_text.rbs +34 -3
- data/sig/openai/models/conversations/computer_screenshot_content.rbs +34 -3
- data/sig/openai/models/image_edit_params.rbs +8 -2
- data/sig/openai/models/image_generate_params.rbs +10 -4
- data/sig/openai/models/live/client_delegation.rbs +30 -3
- data/sig/openai/models/live/decision_assistant_message.rbs +134 -0
- data/sig/openai/models/live/decision_choice_option.rbs +37 -0
- data/sig/openai/models/live/decision_developer_message.rbs +67 -0
- data/sig/openai/models/live/decision_input_text.rbs +20 -0
- data/sig/openai/models/live/decision_item_create_event.rbs +413 -131
- data/sig/openai/models/live/decision_item_created_event.rbs +401 -131
- data/sig/openai/models/live/decision_json_object.rbs +9 -0
- data/sig/openai/models/live/decision_question.rbs +164 -0
- data/sig/openai/models/live/decision_stored_assistant_message.rbs +131 -0
- data/sig/openai/models/live/decision_stored_developer_message.rbs +64 -0
- data/sig/openai/models/live/decision_stored_system_message.rbs +64 -0
- data/sig/openai/models/live/decision_stored_user_message.rbs +177 -0
- data/sig/openai/models/live/decision_system_message.rbs +67 -0
- data/sig/openai/models/live/decision_trigger.rbs +8 -208
- data/sig/openai/models/live/decision_user_message.rbs +180 -0
- data/sig/openai/models/live/decisions_delegation_config.rbs +6 -204
- data/sig/openai/models/live/decisions_delegation_update_config.rbs +8 -206
- data/sig/openai/models/live/fork_session_config.rbs +26 -0
- data/sig/openai/models/live/media_session_config.rbs +53 -4
- data/sig/openai/models/live/media_session_fork_config.rbs +26 -0
- data/sig/openai/models/live/session_accept_params.rbs +53 -4
- data/sig/openai/models/live/session_config.rbs +53 -4
- data/sig/openai/models/live/session_resource.rbs +53 -4
- data/sig/openai/models/live/session_update_config.rbs +52 -0
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbs +10 -12
- data/sig/openai/models/responses/response_input_file.rbs +34 -3
- data/sig/openai/models/responses/response_input_file_content.rbs +34 -3
- data/sig/openai/models/responses/response_input_image.rbs +34 -3
- data/sig/openai/models/responses/response_input_image_content.rbs +34 -3
- data/sig/openai/models/responses/response_input_text.rbs +34 -3
- data/sig/openai/models/responses/response_input_text_content.rbs +34 -3
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +24 -15
- data/sig/openai/models/responses/tool.rbs +24 -15
- data/sig/openai/resources/beta/responses.rbs +2 -1
- data/sig/openai/resources/live/forks.rbs +2 -1
- data/sig/openai/resources/live/sideband.rbs +2 -1
- data/sig/openai/resources/live.rbs +2 -1
- data/sig/openai/resources/realtime/translations.rbs +2 -1
- data/sig/openai/resources/realtime.rbs +2 -1
- data/sig/openai/resources/responses.rbs +2 -1
- metadata +37 -1
|
@@ -22,9 +22,9 @@ module OpenAI
|
|
|
22
22
|
returns(
|
|
23
23
|
T::Array[
|
|
24
24
|
T.any(
|
|
25
|
-
OpenAI::Live::
|
|
26
|
-
OpenAI::Live::
|
|
27
|
-
OpenAI::Live::
|
|
25
|
+
OpenAI::Live::DecisionQuestion::Choice,
|
|
26
|
+
OpenAI::Live::DecisionQuestion::Predicate,
|
|
27
|
+
OpenAI::Live::DecisionQuestion::Score
|
|
28
28
|
)
|
|
29
29
|
]
|
|
30
30
|
)
|
|
@@ -38,9 +38,9 @@ module OpenAI
|
|
|
38
38
|
|
|
39
39
|
questions: T::Array[
|
|
40
40
|
T.any(
|
|
41
|
-
OpenAI::Live::
|
|
42
|
-
OpenAI::Live::
|
|
43
|
-
OpenAI::Live::
|
|
41
|
+
OpenAI::Live::DecisionQuestion::Choice::OrHash,
|
|
42
|
+
OpenAI::Live::DecisionQuestion::Predicate::OrHash,
|
|
43
|
+
OpenAI::Live::DecisionQuestion::Score::OrHash
|
|
44
44
|
)
|
|
45
45
|
]
|
|
46
46
|
)
|
|
@@ -62,9 +62,9 @@ module OpenAI
|
|
|
62
62
|
model: String,
|
|
63
63
|
questions: T::Array[
|
|
64
64
|
T.any(
|
|
65
|
-
OpenAI::Live::
|
|
66
|
-
OpenAI::Live::
|
|
67
|
-
OpenAI::Live::
|
|
65
|
+
OpenAI::Live::DecisionQuestion::Choice,
|
|
66
|
+
OpenAI::Live::DecisionQuestion::Predicate,
|
|
67
|
+
OpenAI::Live::DecisionQuestion::Score
|
|
68
68
|
)
|
|
69
69
|
]
|
|
70
70
|
}
|
|
@@ -73,381 +73,7 @@ module OpenAI
|
|
|
73
73
|
def to_hash
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
module Question
|
|
78
|
-
extend OpenAI::Internal::Type::Union
|
|
79
|
-
|
|
80
|
-
Variants = T.type_alias {
|
|
81
|
-
T.any(
|
|
82
|
-
OpenAI::Live::DecisionsDelegationConfig::Question::Predicate,
|
|
83
|
-
OpenAI::Live::DecisionsDelegationConfig::Question::Choice,
|
|
84
|
-
OpenAI::Live::DecisionsDelegationConfig::Question::Score
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
89
|
-
OrHash = T.type_alias do
|
|
90
|
-
T.any(
|
|
91
|
-
OpenAI::Live::DecisionsDelegationConfig::Question::Predicate,
|
|
92
|
-
OpenAI::Internal::AnyHash
|
|
93
|
-
)
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
sig { returns(OpenAI::Live::DecisionsDelegationConfig::Question::Predicate::Instructions::Variants) }
|
|
97
|
-
attr_accessor :instructions
|
|
98
|
-
|
|
99
|
-
# The type of the object. Always `predicate`.
|
|
100
|
-
sig { returns(Symbol) }
|
|
101
|
-
attr_accessor :type
|
|
102
|
-
|
|
103
|
-
sig { returns(T.nilable(String)) }
|
|
104
|
-
attr_reader :name
|
|
105
|
-
|
|
106
|
-
sig { params(name: String).void }
|
|
107
|
-
attr_writer :name
|
|
108
|
-
|
|
109
|
-
# Estimate how likely it is that a statement about the input is true.
|
|
110
|
-
sig do
|
|
111
|
-
params(
|
|
112
|
-
|
|
113
|
-
instructions: OpenAI::Live::DecisionsDelegationConfig::Question::Predicate::Instructions::Variants,
|
|
114
|
-
|
|
115
|
-
name: String,
|
|
116
|
-
|
|
117
|
-
type: Symbol
|
|
118
|
-
)
|
|
119
|
-
.returns(T.attached_class)
|
|
120
|
-
end
|
|
121
|
-
def self.new(
|
|
122
|
-
|
|
123
|
-
instructions:,
|
|
124
|
-
|
|
125
|
-
name: nil,
|
|
126
|
-
|
|
127
|
-
# The type of the object. Always `predicate`.
|
|
128
|
-
|
|
129
|
-
type: :predicate
|
|
130
|
-
)
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
sig do
|
|
134
|
-
override.returns(
|
|
135
|
-
{
|
|
136
|
-
instructions: OpenAI::Live::DecisionsDelegationConfig::Question::Predicate::Instructions::Variants,
|
|
137
|
-
type: Symbol,
|
|
138
|
-
name: String
|
|
139
|
-
}
|
|
140
|
-
)
|
|
141
|
-
end
|
|
142
|
-
def to_hash
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
module Instructions
|
|
146
|
-
extend OpenAI::Internal::Type::Union
|
|
147
|
-
|
|
148
|
-
Variants = T.type_alias { T.any(String, T::Array[OpenAI::DecisionQuestionInputPart::Variants]) }
|
|
149
|
-
|
|
150
|
-
sig {
|
|
151
|
-
override.returns(
|
|
152
|
-
T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Predicate::Instructions::Variants]
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
def self.variants
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
DecisionQuestionInputPartArray = T.let(
|
|
159
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::DecisionQuestionInputPart],
|
|
160
|
-
OpenAI::Internal::Type::Converter
|
|
161
|
-
)
|
|
162
|
-
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
class Choice < OpenAI::Internal::Type::BaseModel
|
|
167
|
-
OrHash = T.type_alias do
|
|
168
|
-
T.any(
|
|
169
|
-
OpenAI::Live::DecisionsDelegationConfig::Question::Choice,
|
|
170
|
-
OpenAI::Internal::AnyHash
|
|
171
|
-
)
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
175
|
-
sig { returns(T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Choice]) }
|
|
176
|
-
attr_accessor :choices
|
|
177
|
-
|
|
178
|
-
sig { returns(OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Instructions::Variants) }
|
|
179
|
-
attr_accessor :instructions
|
|
180
|
-
|
|
181
|
-
# The type of the object. Always `choice`.
|
|
182
|
-
sig { returns(Symbol) }
|
|
183
|
-
attr_accessor :type
|
|
184
|
-
|
|
185
|
-
sig { returns(T.nilable(String)) }
|
|
186
|
-
attr_reader :name
|
|
187
|
-
|
|
188
|
-
sig { params(name: String).void }
|
|
189
|
-
attr_writer :name
|
|
190
|
-
|
|
191
|
-
# Choose from the supplied options based on the input.
|
|
192
|
-
sig do
|
|
193
|
-
params(
|
|
194
|
-
|
|
195
|
-
choices: T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Choice::OrHash],
|
|
196
|
-
|
|
197
|
-
instructions: OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Instructions::Variants,
|
|
198
|
-
|
|
199
|
-
name: String,
|
|
200
|
-
|
|
201
|
-
type: Symbol
|
|
202
|
-
)
|
|
203
|
-
.returns(T.attached_class)
|
|
204
|
-
end
|
|
205
|
-
def self.new(
|
|
206
|
-
|
|
207
|
-
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
208
|
-
choices:,
|
|
209
|
-
|
|
210
|
-
instructions:,
|
|
211
|
-
|
|
212
|
-
name: nil,
|
|
213
|
-
|
|
214
|
-
# The type of the object. Always `choice`.
|
|
215
|
-
|
|
216
|
-
type: :choice
|
|
217
|
-
)
|
|
218
|
-
end
|
|
219
|
-
|
|
220
|
-
sig do
|
|
221
|
-
override.returns(
|
|
222
|
-
{
|
|
223
|
-
choices: T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Choice],
|
|
224
|
-
instructions: OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Instructions::Variants,
|
|
225
|
-
type: Symbol,
|
|
226
|
-
name: String
|
|
227
|
-
}
|
|
228
|
-
)
|
|
229
|
-
end
|
|
230
|
-
def to_hash
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
class Choice < OpenAI::Internal::Type::BaseModel
|
|
234
|
-
OrHash = T.type_alias do
|
|
235
|
-
T.any(
|
|
236
|
-
OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Choice,
|
|
237
|
-
OpenAI::Internal::AnyHash
|
|
238
|
-
)
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
242
|
-
sig { returns(T.any(String, T::Boolean)) }
|
|
243
|
-
attr_accessor :value
|
|
244
|
-
|
|
245
|
-
sig { returns(T.nilable(String)) }
|
|
246
|
-
attr_reader :description
|
|
247
|
-
|
|
248
|
-
sig { params(description: String).void }
|
|
249
|
-
attr_writer :description
|
|
250
|
-
|
|
251
|
-
sig do
|
|
252
|
-
params(
|
|
253
|
-
|
|
254
|
-
value: T.any(String, T::Boolean),
|
|
255
|
-
|
|
256
|
-
description: String
|
|
257
|
-
)
|
|
258
|
-
.returns(T.attached_class)
|
|
259
|
-
end
|
|
260
|
-
def self.new(
|
|
261
|
-
|
|
262
|
-
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
263
|
-
value:,
|
|
264
|
-
|
|
265
|
-
description: nil
|
|
266
|
-
)
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
sig do
|
|
270
|
-
override.returns(
|
|
271
|
-
{value: T.any(String, T::Boolean), description: String}
|
|
272
|
-
)
|
|
273
|
-
end
|
|
274
|
-
def to_hash
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
278
|
-
module Value
|
|
279
|
-
extend OpenAI::Internal::Type::Union
|
|
280
|
-
|
|
281
|
-
Variants = T.type_alias { T.any(String, T::Boolean) }
|
|
282
|
-
|
|
283
|
-
sig {
|
|
284
|
-
override.returns(
|
|
285
|
-
T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Choice::Value::Variants]
|
|
286
|
-
)
|
|
287
|
-
}
|
|
288
|
-
def self.variants
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
end
|
|
292
|
-
end
|
|
293
|
-
|
|
294
|
-
module Instructions
|
|
295
|
-
extend OpenAI::Internal::Type::Union
|
|
296
|
-
|
|
297
|
-
Variants = T.type_alias { T.any(String, T::Array[OpenAI::DecisionQuestionInputPart::Variants]) }
|
|
298
|
-
|
|
299
|
-
sig {
|
|
300
|
-
override.returns(
|
|
301
|
-
T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Instructions::Variants]
|
|
302
|
-
)
|
|
303
|
-
}
|
|
304
|
-
def self.variants
|
|
305
|
-
end
|
|
306
|
-
|
|
307
|
-
DecisionQuestionInputPartArray = T.let(
|
|
308
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::DecisionQuestionInputPart],
|
|
309
|
-
OpenAI::Internal::Type::Converter
|
|
310
|
-
)
|
|
311
|
-
|
|
312
|
-
end
|
|
313
|
-
end
|
|
314
|
-
|
|
315
|
-
class Score < OpenAI::Internal::Type::BaseModel
|
|
316
|
-
OrHash = T.type_alias do
|
|
317
|
-
T.any(
|
|
318
|
-
OpenAI::Live::DecisionsDelegationConfig::Question::Score,
|
|
319
|
-
OpenAI::Internal::AnyHash
|
|
320
|
-
)
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
sig { returns(OpenAI::Live::DecisionsDelegationConfig::Question::Score::Instructions::Variants) }
|
|
324
|
-
attr_accessor :instructions
|
|
325
|
-
|
|
326
|
-
sig { returns(T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Score::Level]) }
|
|
327
|
-
attr_accessor :levels
|
|
328
|
-
|
|
329
|
-
# The type of the object. Always `score`.
|
|
330
|
-
sig { returns(Symbol) }
|
|
331
|
-
attr_accessor :type
|
|
332
|
-
|
|
333
|
-
sig { returns(T.nilable(String)) }
|
|
334
|
-
attr_reader :name
|
|
335
|
-
|
|
336
|
-
sig { params(name: String).void }
|
|
337
|
-
attr_writer :name
|
|
338
|
-
|
|
339
|
-
# Rate the input against the supplied ordered levels.
|
|
340
|
-
sig do
|
|
341
|
-
params(
|
|
342
|
-
|
|
343
|
-
instructions: OpenAI::Live::DecisionsDelegationConfig::Question::Score::Instructions::Variants,
|
|
344
|
-
|
|
345
|
-
levels: T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Score::Level::OrHash],
|
|
346
|
-
|
|
347
|
-
name: String,
|
|
348
|
-
|
|
349
|
-
type: Symbol
|
|
350
|
-
)
|
|
351
|
-
.returns(T.attached_class)
|
|
352
|
-
end
|
|
353
|
-
def self.new(
|
|
354
|
-
|
|
355
|
-
instructions:,
|
|
356
|
-
|
|
357
|
-
levels:,
|
|
358
|
-
|
|
359
|
-
name: nil,
|
|
360
|
-
|
|
361
|
-
# The type of the object. Always `score`.
|
|
362
|
-
|
|
363
|
-
type: :score
|
|
364
|
-
)
|
|
365
|
-
end
|
|
366
|
-
|
|
367
|
-
sig do
|
|
368
|
-
override.returns(
|
|
369
|
-
{
|
|
370
|
-
instructions: OpenAI::Live::DecisionsDelegationConfig::Question::Score::Instructions::Variants,
|
|
371
|
-
levels: T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Score::Level],
|
|
372
|
-
type: Symbol,
|
|
373
|
-
name: String
|
|
374
|
-
}
|
|
375
|
-
)
|
|
376
|
-
end
|
|
377
|
-
def to_hash
|
|
378
|
-
end
|
|
379
|
-
|
|
380
|
-
module Instructions
|
|
381
|
-
extend OpenAI::Internal::Type::Union
|
|
382
|
-
|
|
383
|
-
Variants = T.type_alias { T.any(String, T::Array[OpenAI::DecisionQuestionInputPart::Variants]) }
|
|
384
|
-
|
|
385
|
-
sig {
|
|
386
|
-
override.returns(
|
|
387
|
-
T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Score::Instructions::Variants]
|
|
388
|
-
)
|
|
389
|
-
}
|
|
390
|
-
def self.variants
|
|
391
|
-
end
|
|
392
|
-
|
|
393
|
-
DecisionQuestionInputPartArray = T.let(
|
|
394
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::DecisionQuestionInputPart],
|
|
395
|
-
OpenAI::Internal::Type::Converter
|
|
396
|
-
)
|
|
397
|
-
|
|
398
|
-
end
|
|
399
|
-
|
|
400
|
-
class Level < OpenAI::Internal::Type::BaseModel
|
|
401
|
-
OrHash = T.type_alias do
|
|
402
|
-
T.any(
|
|
403
|
-
OpenAI::Live::DecisionsDelegationConfig::Question::Score::Level,
|
|
404
|
-
OpenAI::Internal::AnyHash
|
|
405
|
-
)
|
|
406
|
-
end
|
|
407
|
-
|
|
408
|
-
sig { returns(String) }
|
|
409
|
-
attr_accessor :label
|
|
410
|
-
|
|
411
|
-
sig { returns(T.nilable(String)) }
|
|
412
|
-
attr_reader :description
|
|
413
|
-
|
|
414
|
-
sig { params(description: String).void }
|
|
415
|
-
attr_writer :description
|
|
416
|
-
|
|
417
|
-
sig do
|
|
418
|
-
params(
|
|
419
|
-
|
|
420
|
-
label: String,
|
|
421
|
-
|
|
422
|
-
description: String
|
|
423
|
-
)
|
|
424
|
-
.returns(T.attached_class)
|
|
425
|
-
end
|
|
426
|
-
def self.new(
|
|
427
|
-
|
|
428
|
-
label:,
|
|
429
|
-
|
|
430
|
-
description: nil
|
|
431
|
-
)
|
|
432
|
-
end
|
|
433
|
-
|
|
434
|
-
sig do
|
|
435
|
-
override.returns(
|
|
436
|
-
{label: String, description: String}
|
|
437
|
-
)
|
|
438
|
-
end
|
|
439
|
-
def to_hash
|
|
440
|
-
end
|
|
441
|
-
|
|
442
|
-
end
|
|
443
|
-
end
|
|
444
|
-
|
|
445
|
-
sig { override.returns(T::Array[OpenAI::Live::DecisionsDelegationConfig::Question::Variants]) }
|
|
446
|
-
def self.variants
|
|
447
|
-
end
|
|
448
|
-
|
|
449
|
-
end
|
|
450
|
-
|
|
76
|
+
Question = ::OpenAI::Models::Live::DecisionQuestion
|
|
451
77
|
end
|
|
452
78
|
|
|
453
79
|
end
|