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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
class DecisionSystemMessage < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute content
|
|
8
|
+
# The text input to the model.
|
|
9
|
+
#
|
|
10
|
+
# @return [String, Array<OpenAI::Models::Live::DecisionInputText>]
|
|
11
|
+
required :content, union: -> { OpenAI::Live::DecisionSystemMessage::Content }
|
|
12
|
+
|
|
13
|
+
# @!attribute role
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, :system]
|
|
16
|
+
required :role, const: :system
|
|
17
|
+
|
|
18
|
+
# @!attribute id
|
|
19
|
+
# The unique ID of this message item.
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :id, String, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!attribute type
|
|
25
|
+
#
|
|
26
|
+
# @return [Symbol, OpenAI::Models::Live::DecisionSystemMessage::Type, nil]
|
|
27
|
+
optional :type, enum: -> { OpenAI::Live::DecisionSystemMessage::Type }
|
|
28
|
+
|
|
29
|
+
# @!method initialize(content:, id: nil, type: nil, role: :system)
|
|
30
|
+
# @param content [String, Array<OpenAI::Models::Live::DecisionInputText>]
|
|
31
|
+
# The text input to the model.
|
|
32
|
+
#
|
|
33
|
+
# @param id [String, nil]
|
|
34
|
+
# The unique ID of this message item.
|
|
35
|
+
#
|
|
36
|
+
# @param type [Symbol, OpenAI::Models::Live::DecisionSystemMessage::Type]
|
|
37
|
+
#
|
|
38
|
+
# @param role [Symbol, :system]
|
|
39
|
+
|
|
40
|
+
# The text input to the model.
|
|
41
|
+
#
|
|
42
|
+
# @see OpenAI::Models::Live::DecisionSystemMessage#content
|
|
43
|
+
module Content
|
|
44
|
+
extend OpenAI::Internal::Type::Union
|
|
45
|
+
|
|
46
|
+
# The text input to the model.
|
|
47
|
+
variant String
|
|
48
|
+
|
|
49
|
+
variant -> { OpenAI::Models::Live::DecisionSystemMessage::Content::DecisionInputTextArray }
|
|
50
|
+
|
|
51
|
+
# @!method self.variants
|
|
52
|
+
# @return [Array(String, Array<OpenAI::Models::Live::DecisionInputText>)]
|
|
53
|
+
|
|
54
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
55
|
+
DecisionInputTextArray = OpenAI::Internal::Type::ArrayOf[-> { OpenAI::Live::DecisionInputText }]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# @see OpenAI::Models::Live::DecisionSystemMessage#type
|
|
59
|
+
module Type
|
|
60
|
+
extend OpenAI::Internal::Type::Enum
|
|
61
|
+
|
|
62
|
+
MESSAGE = :message
|
|
63
|
+
|
|
64
|
+
# @!method self.values
|
|
65
|
+
# @return [Array<Symbol>]
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -32,273 +32,21 @@ module OpenAI
|
|
|
32
32
|
|
|
33
33
|
# @see OpenAI::Models::Live::DecisionTrigger#decisions
|
|
34
34
|
class Decisions < OpenAI::Internal::Type::BaseModel
|
|
35
|
+
require_relative "decision_question"
|
|
36
|
+
Question = ::OpenAI::Models::Live::DecisionQuestion
|
|
37
|
+
|
|
35
38
|
# @!attribute questions
|
|
36
39
|
# Native Decision API questions evaluated together, in order.
|
|
37
40
|
#
|
|
38
|
-
# @return [Array<OpenAI::Models::Live::
|
|
39
|
-
required
|
|
40
|
-
:questions,
|
|
41
|
-
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Live::DecisionTrigger::Decisions::Question] }
|
|
42
|
-
)
|
|
41
|
+
# @return [Array<OpenAI::Models::Live::DecisionQuestion::Choice, OpenAI::Models::Live::DecisionQuestion::Predicate, OpenAI::Models::Live::DecisionQuestion::Score>]
|
|
42
|
+
required :questions, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Live::DecisionQuestion] }
|
|
43
43
|
|
|
44
44
|
# @!method initialize(questions:)
|
|
45
45
|
# Questions evaluated using the current transcript and the session's shared
|
|
46
46
|
# Decision items.
|
|
47
47
|
#
|
|
48
|
-
# @param questions [Array<OpenAI::Models::Live::
|
|
48
|
+
# @param questions [Array<OpenAI::Models::Live::DecisionQuestion::Choice, OpenAI::Models::Live::DecisionQuestion::Predicate, OpenAI::Models::Live::DecisionQuestion::Score>]
|
|
49
49
|
# Native Decision API questions evaluated together, in order.
|
|
50
|
-
|
|
51
|
-
# A question about the request's input, with an optional correlation name.
|
|
52
|
-
module Question
|
|
53
|
-
extend OpenAI::Internal::Type::Union
|
|
54
|
-
|
|
55
|
-
discriminator :type
|
|
56
|
-
|
|
57
|
-
# Estimate how likely it is that a statement about the input is true.
|
|
58
|
-
variant :predicate, -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Predicate }
|
|
59
|
-
|
|
60
|
-
# Choose from the supplied options based on the input.
|
|
61
|
-
variant :choice, -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Choice }
|
|
62
|
-
|
|
63
|
-
# Rate the input against the supplied ordered levels.
|
|
64
|
-
variant :score, -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Score }
|
|
65
|
-
|
|
66
|
-
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
67
|
-
# @!attribute instructions
|
|
68
|
-
#
|
|
69
|
-
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
70
|
-
required(
|
|
71
|
-
:instructions,
|
|
72
|
-
union: -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Predicate::Instructions }
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
# @!attribute type
|
|
76
|
-
# The type of the object. Always `predicate`.
|
|
77
|
-
#
|
|
78
|
-
# @return [Symbol, :predicate]
|
|
79
|
-
required :type, const: :predicate
|
|
80
|
-
|
|
81
|
-
# @!attribute name
|
|
82
|
-
#
|
|
83
|
-
# @return [String, nil]
|
|
84
|
-
optional :name, String
|
|
85
|
-
|
|
86
|
-
# @!method initialize(instructions:, name: nil, type: :predicate)
|
|
87
|
-
# Estimate how likely it is that a statement about the input is true.
|
|
88
|
-
#
|
|
89
|
-
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
90
|
-
#
|
|
91
|
-
# @param name [String]
|
|
92
|
-
#
|
|
93
|
-
# @param type [Symbol, :predicate]
|
|
94
|
-
# The type of the object. Always `predicate`.
|
|
95
|
-
|
|
96
|
-
# @see OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Predicate#instructions
|
|
97
|
-
module Instructions
|
|
98
|
-
extend OpenAI::Internal::Type::Union
|
|
99
|
-
|
|
100
|
-
variant String
|
|
101
|
-
|
|
102
|
-
variant(
|
|
103
|
-
-> {
|
|
104
|
-
OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Predicate::Instructions::DecisionQuestionInputPartArray
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
# @!method self.variants
|
|
109
|
-
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
110
|
-
|
|
111
|
-
# @type [OpenAI::Internal::Type::Converter]
|
|
112
|
-
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
113
|
-
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
114
|
-
]
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
class Choice < OpenAI::Internal::Type::BaseModel
|
|
119
|
-
# @!attribute choices
|
|
120
|
-
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
121
|
-
#
|
|
122
|
-
# @return [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice::Choice>]
|
|
123
|
-
required(
|
|
124
|
-
:choices,
|
|
125
|
-
-> {
|
|
126
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionTrigger::Decisions::Question::Choice::Choice]
|
|
127
|
-
}
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
# @!attribute instructions
|
|
131
|
-
#
|
|
132
|
-
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
133
|
-
required(
|
|
134
|
-
:instructions,
|
|
135
|
-
union: -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Choice::Instructions }
|
|
136
|
-
)
|
|
137
|
-
|
|
138
|
-
# @!attribute type
|
|
139
|
-
# The type of the object. Always `choice`.
|
|
140
|
-
#
|
|
141
|
-
# @return [Symbol, :choice]
|
|
142
|
-
required :type, const: :choice
|
|
143
|
-
|
|
144
|
-
# @!attribute name
|
|
145
|
-
#
|
|
146
|
-
# @return [String, nil]
|
|
147
|
-
optional :name, String
|
|
148
|
-
|
|
149
|
-
# @!method initialize(choices:, instructions:, name: nil, type: :choice)
|
|
150
|
-
# Choose from the supplied options based on the input.
|
|
151
|
-
#
|
|
152
|
-
# @param choices [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice::Choice>]
|
|
153
|
-
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
154
|
-
#
|
|
155
|
-
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
156
|
-
#
|
|
157
|
-
# @param name [String]
|
|
158
|
-
#
|
|
159
|
-
# @param type [Symbol, :choice]
|
|
160
|
-
# The type of the object. Always `choice`.
|
|
161
|
-
class Choice < OpenAI::Internal::Type::BaseModel
|
|
162
|
-
# @!attribute value
|
|
163
|
-
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
164
|
-
#
|
|
165
|
-
# @return [String, Boolean]
|
|
166
|
-
required(
|
|
167
|
-
:value,
|
|
168
|
-
union: -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Choice::Choice::Value }
|
|
169
|
-
)
|
|
170
|
-
|
|
171
|
-
# @!attribute description
|
|
172
|
-
#
|
|
173
|
-
# @return [String, nil]
|
|
174
|
-
optional :description, String
|
|
175
|
-
|
|
176
|
-
# @!method initialize(value:, description: nil)
|
|
177
|
-
# @param value [String, Boolean]
|
|
178
|
-
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
179
|
-
#
|
|
180
|
-
# @param description [String]
|
|
181
|
-
|
|
182
|
-
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
183
|
-
#
|
|
184
|
-
# @see OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice::Choice#value
|
|
185
|
-
module Value
|
|
186
|
-
extend OpenAI::Internal::Type::Union
|
|
187
|
-
|
|
188
|
-
variant String
|
|
189
|
-
|
|
190
|
-
variant OpenAI::Internal::Type::Boolean
|
|
191
|
-
|
|
192
|
-
# @!method self.variants
|
|
193
|
-
# @return [Array(String, Boolean)]
|
|
194
|
-
end
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
# @see OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice#instructions
|
|
198
|
-
module Instructions
|
|
199
|
-
extend OpenAI::Internal::Type::Union
|
|
200
|
-
|
|
201
|
-
variant String
|
|
202
|
-
|
|
203
|
-
variant(
|
|
204
|
-
-> {
|
|
205
|
-
OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice::Instructions::DecisionQuestionInputPartArray
|
|
206
|
-
}
|
|
207
|
-
)
|
|
208
|
-
|
|
209
|
-
# @!method self.variants
|
|
210
|
-
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
211
|
-
|
|
212
|
-
# @type [OpenAI::Internal::Type::Converter]
|
|
213
|
-
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
214
|
-
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
215
|
-
]
|
|
216
|
-
end
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
class Score < OpenAI::Internal::Type::BaseModel
|
|
220
|
-
# @!attribute instructions
|
|
221
|
-
#
|
|
222
|
-
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
223
|
-
required(
|
|
224
|
-
:instructions,
|
|
225
|
-
union: -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Score::Instructions }
|
|
226
|
-
)
|
|
227
|
-
|
|
228
|
-
# @!attribute levels
|
|
229
|
-
#
|
|
230
|
-
# @return [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score::Level>]
|
|
231
|
-
required(
|
|
232
|
-
:levels,
|
|
233
|
-
-> {
|
|
234
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionTrigger::Decisions::Question::Score::Level]
|
|
235
|
-
}
|
|
236
|
-
)
|
|
237
|
-
|
|
238
|
-
# @!attribute type
|
|
239
|
-
# The type of the object. Always `score`.
|
|
240
|
-
#
|
|
241
|
-
# @return [Symbol, :score]
|
|
242
|
-
required :type, const: :score
|
|
243
|
-
|
|
244
|
-
# @!attribute name
|
|
245
|
-
#
|
|
246
|
-
# @return [String, nil]
|
|
247
|
-
optional :name, String
|
|
248
|
-
|
|
249
|
-
# @!method initialize(instructions:, levels:, name: nil, type: :score)
|
|
250
|
-
# Rate the input against the supplied ordered levels.
|
|
251
|
-
#
|
|
252
|
-
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
253
|
-
#
|
|
254
|
-
# @param levels [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score::Level>]
|
|
255
|
-
#
|
|
256
|
-
# @param name [String]
|
|
257
|
-
#
|
|
258
|
-
# @param type [Symbol, :score]
|
|
259
|
-
# The type of the object. Always `score`.
|
|
260
|
-
|
|
261
|
-
# @see OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score#instructions
|
|
262
|
-
module Instructions
|
|
263
|
-
extend OpenAI::Internal::Type::Union
|
|
264
|
-
|
|
265
|
-
variant String
|
|
266
|
-
|
|
267
|
-
variant(
|
|
268
|
-
-> {
|
|
269
|
-
OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score::Instructions::DecisionQuestionInputPartArray
|
|
270
|
-
}
|
|
271
|
-
)
|
|
272
|
-
|
|
273
|
-
# @!method self.variants
|
|
274
|
-
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
275
|
-
|
|
276
|
-
# @type [OpenAI::Internal::Type::Converter]
|
|
277
|
-
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
278
|
-
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
279
|
-
]
|
|
280
|
-
end
|
|
281
|
-
|
|
282
|
-
class Level < OpenAI::Internal::Type::BaseModel
|
|
283
|
-
# @!attribute label
|
|
284
|
-
#
|
|
285
|
-
# @return [String]
|
|
286
|
-
required :label, String
|
|
287
|
-
|
|
288
|
-
# @!attribute description
|
|
289
|
-
#
|
|
290
|
-
# @return [String, nil]
|
|
291
|
-
optional :description, String
|
|
292
|
-
|
|
293
|
-
# @!method initialize(label:, description: nil)
|
|
294
|
-
# @param label [String]
|
|
295
|
-
# @param description [String]
|
|
296
|
-
end
|
|
297
|
-
end
|
|
298
|
-
|
|
299
|
-
# @!method self.variants
|
|
300
|
-
# @return [Array(OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Predicate, OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice, OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score)]
|
|
301
|
-
end
|
|
302
50
|
end
|
|
303
51
|
|
|
304
52
|
# @see OpenAI::Models::Live::DecisionTrigger#event_type
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
class DecisionUserMessage < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute content
|
|
8
|
+
# The text input to the model.
|
|
9
|
+
#
|
|
10
|
+
# @return [String, Array<OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputText, OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage, OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputJSON>]
|
|
11
|
+
required :content, union: -> { OpenAI::Live::DecisionUserMessage::Content }
|
|
12
|
+
|
|
13
|
+
# @!attribute role
|
|
14
|
+
# The message role. Always `user`.
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, :user]
|
|
17
|
+
required :role, const: :user
|
|
18
|
+
|
|
19
|
+
# @!attribute id
|
|
20
|
+
# The unique ID of this message item.
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
optional :id, String, nil?: true
|
|
24
|
+
|
|
25
|
+
# @!attribute type
|
|
26
|
+
#
|
|
27
|
+
# @return [Symbol, OpenAI::Models::Live::DecisionUserMessage::Type, nil]
|
|
28
|
+
optional :type, enum: -> { OpenAI::Live::DecisionUserMessage::Type }
|
|
29
|
+
|
|
30
|
+
# @!method initialize(content:, id: nil, type: nil, role: :user)
|
|
31
|
+
# @param content [String, Array<OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputText, OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage, OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputJSON>]
|
|
32
|
+
# The text input to the model.
|
|
33
|
+
#
|
|
34
|
+
# @param id [String, nil]
|
|
35
|
+
# The unique ID of this message item.
|
|
36
|
+
#
|
|
37
|
+
# @param type [Symbol, OpenAI::Models::Live::DecisionUserMessage::Type]
|
|
38
|
+
#
|
|
39
|
+
# @param role [Symbol, :user]
|
|
40
|
+
# The message role. Always `user`.
|
|
41
|
+
|
|
42
|
+
# The text input to the model.
|
|
43
|
+
#
|
|
44
|
+
# @see OpenAI::Models::Live::DecisionUserMessage#content
|
|
45
|
+
module Content
|
|
46
|
+
extend OpenAI::Internal::Type::Union
|
|
47
|
+
|
|
48
|
+
# The text input to the model.
|
|
49
|
+
variant String
|
|
50
|
+
|
|
51
|
+
variant -> { OpenAI::Models::Live::DecisionUserMessage::Content::PartsArray }
|
|
52
|
+
|
|
53
|
+
module Part
|
|
54
|
+
extend OpenAI::Internal::Type::Union
|
|
55
|
+
|
|
56
|
+
discriminator :type
|
|
57
|
+
|
|
58
|
+
variant :input_text, -> { OpenAI::Live::DecisionUserMessage::Content::Part::InputText }
|
|
59
|
+
|
|
60
|
+
variant :input_image, -> { OpenAI::Live::DecisionUserMessage::Content::Part::InputImage }
|
|
61
|
+
|
|
62
|
+
variant :input_json, -> { OpenAI::Live::DecisionUserMessage::Content::Part::InputJSON }
|
|
63
|
+
|
|
64
|
+
class InputText < OpenAI::Internal::Type::BaseModel
|
|
65
|
+
# @!attribute text
|
|
66
|
+
# The text input to the model.
|
|
67
|
+
#
|
|
68
|
+
# @return [String]
|
|
69
|
+
required :text, String
|
|
70
|
+
|
|
71
|
+
# @!attribute type
|
|
72
|
+
#
|
|
73
|
+
# @return [Symbol, :input_text]
|
|
74
|
+
required :type, const: :input_text
|
|
75
|
+
|
|
76
|
+
# @!method initialize(text:, type: :input_text)
|
|
77
|
+
# @param text [String]
|
|
78
|
+
# The text input to the model.
|
|
79
|
+
#
|
|
80
|
+
# @param type [Symbol, :input_text]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
class InputImage < OpenAI::Internal::Type::BaseModel
|
|
84
|
+
# @!attribute image_url
|
|
85
|
+
# A base64-encoded image data URL or a publicly accessible HTTP(S) image URL.
|
|
86
|
+
#
|
|
87
|
+
# @return [String]
|
|
88
|
+
required :image_url, String
|
|
89
|
+
|
|
90
|
+
# @!attribute type
|
|
91
|
+
#
|
|
92
|
+
# @return [Symbol, :input_image]
|
|
93
|
+
required :type, const: :input_image
|
|
94
|
+
|
|
95
|
+
# @!attribute detail
|
|
96
|
+
# The detail level of the image to be sent to the model. One of `high`, `low`,
|
|
97
|
+
# `auto`, or `original`. Defaults to `auto`.
|
|
98
|
+
#
|
|
99
|
+
# @return [Symbol, OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage::Detail, nil]
|
|
100
|
+
optional(
|
|
101
|
+
:detail,
|
|
102
|
+
enum: -> { OpenAI::Live::DecisionUserMessage::Content::Part::InputImage::Detail },
|
|
103
|
+
nil?: true
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
# @!method initialize(image_url:, detail: nil, type: :input_image)
|
|
107
|
+
# @param image_url [String]
|
|
108
|
+
# A base64-encoded image data URL or a publicly accessible HTTP(S) image URL.
|
|
109
|
+
#
|
|
110
|
+
# @param detail [Symbol, OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage::Detail, nil]
|
|
111
|
+
# The detail level of the image to be sent to the model. One of `high`, `low`,
|
|
112
|
+
# `auto`, or `original`. Defaults to `auto`.
|
|
113
|
+
#
|
|
114
|
+
# @param type [Symbol, :input_image]
|
|
115
|
+
|
|
116
|
+
# The detail level of the image to be sent to the model. One of `high`, `low`,
|
|
117
|
+
# `auto`, or `original`. Defaults to `auto`.
|
|
118
|
+
#
|
|
119
|
+
# @see OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage#detail
|
|
120
|
+
module Detail
|
|
121
|
+
extend OpenAI::Internal::Type::Enum
|
|
122
|
+
|
|
123
|
+
LOW = :low
|
|
124
|
+
HIGH = :high
|
|
125
|
+
AUTO = :auto
|
|
126
|
+
ORIGINAL = :original
|
|
127
|
+
|
|
128
|
+
# @!method self.values
|
|
129
|
+
# @return [Array<Symbol>]
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
class InputJSON < OpenAI::Internal::Type::BaseModel
|
|
134
|
+
# @!attribute data
|
|
135
|
+
#
|
|
136
|
+
# @return [Hash{Symbol=>Object}, Array<Hash{Symbol=>Object}>]
|
|
137
|
+
required :data, union: -> { OpenAI::Live::DecisionUserMessage::Content::Part::InputJSON::Data }
|
|
138
|
+
|
|
139
|
+
# @!attribute type
|
|
140
|
+
#
|
|
141
|
+
# @return [Symbol, :input_json]
|
|
142
|
+
required :type, const: :input_json
|
|
143
|
+
|
|
144
|
+
# @!method initialize(data:, type: :input_json)
|
|
145
|
+
# @param data [Hash{Symbol=>Object}, Array<Hash{Symbol=>Object}>]
|
|
146
|
+
# @param type [Symbol, :input_json]
|
|
147
|
+
|
|
148
|
+
# @see OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputJSON#data
|
|
149
|
+
module Data
|
|
150
|
+
extend OpenAI::Internal::Type::Union
|
|
151
|
+
|
|
152
|
+
variant OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown]
|
|
153
|
+
|
|
154
|
+
variant(
|
|
155
|
+
-> {
|
|
156
|
+
OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputJSON::Data::DecisionJSONObjectArray
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
# @!method self.variants
|
|
161
|
+
# @return [Array(Hash{Symbol=>Object}, Array<Hash{Symbol=>Object}>)]
|
|
162
|
+
|
|
163
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
164
|
+
DecisionJSONObjectArray = OpenAI::Internal::Type::ArrayOf[
|
|
165
|
+
OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown]
|
|
166
|
+
]
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# @!method self.variants
|
|
171
|
+
# @return [Array(OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputText, OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage, OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputJSON)]
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# @!method self.variants
|
|
175
|
+
# @return [Array(String, Array<OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputText, OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputImage, OpenAI::Models::Live::DecisionUserMessage::Content::Part::InputJSON>)]
|
|
176
|
+
|
|
177
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
178
|
+
PartsArray = OpenAI::Internal::Type::ArrayOf[union: -> { OpenAI::Live::DecisionUserMessage::Content::Part }]
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# @see OpenAI::Models::Live::DecisionUserMessage#type
|
|
182
|
+
module Type
|
|
183
|
+
extend OpenAI::Internal::Type::Enum
|
|
184
|
+
|
|
185
|
+
MESSAGE = :message
|
|
186
|
+
|
|
187
|
+
# @!method self.values
|
|
188
|
+
# @return [Array<Symbol>]
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|