openai 0.17.1 → 0.19.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 +50 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +4 -0
- data/lib/openai/helpers/structured_output/array_of.rb +2 -10
- data/lib/openai/helpers/structured_output/base_model.rb +4 -11
- data/lib/openai/helpers/structured_output/boolean.rb +1 -0
- data/lib/openai/helpers/structured_output/json_schema_converter.rb +19 -3
- data/lib/openai/helpers/structured_output/union_of.rb +2 -10
- data/lib/openai/internal/conversation_cursor_page.rb +92 -0
- data/lib/openai/internal/transport/base_client.rb +1 -4
- data/lib/openai/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/openai/internal/util.rb +1 -1
- data/lib/openai/models/audio/transcription.rb +1 -4
- data/lib/openai/models/audio/transcription_create_params.rb +2 -7
- data/lib/openai/models/audio/transcription_text_done_event.rb +1 -4
- data/lib/openai/models/batch_create_params.rb +38 -1
- data/lib/openai/models/beta/assistant_create_params.rb +6 -19
- data/lib/openai/models/beta/assistant_stream_event.rb +6 -24
- data/lib/openai/models/beta/assistant_update_params.rb +1 -4
- data/lib/openai/models/beta/message_stream_event.rb +1 -4
- data/lib/openai/models/beta/run_step_stream_event.rb +1 -4
- data/lib/openai/models/beta/thread_create_and_run_params.rb +12 -34
- data/lib/openai/models/beta/thread_create_params.rb +7 -22
- data/lib/openai/models/beta/threads/message.rb +3 -10
- data/lib/openai/models/beta/threads/message_create_params.rb +2 -7
- data/lib/openai/models/beta/threads/run.rb +4 -9
- data/lib/openai/models/beta/threads/run_create_params.rb +5 -12
- data/lib/openai/models/beta/threads/run_submit_tool_outputs_params.rb +1 -3
- data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call.rb +5 -17
- data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rb +1 -3
- data/lib/openai/models/beta/threads/runs/file_search_tool_call.rb +4 -12
- data/lib/openai/models/beta/threads/runs/run_step_delta_message_delta.rb +1 -4
- data/lib/openai/models/beta/threads/runs/tool_calls_step_details.rb +1 -4
- data/lib/openai/models/beta/threads/text.rb +1 -4
- data/lib/openai/models/chat/chat_completion.rb +6 -6
- data/lib/openai/models/chat/chat_completion_chunk.rb +7 -9
- data/lib/openai/models/chat/chat_completion_custom_tool.rb +2 -7
- data/lib/openai/models/chat/completion_create_params.rb +7 -7
- data/lib/openai/models/conversations/computer_screenshot_content.rb +38 -0
- data/lib/openai/models/conversations/container_file_citation_body.rb +58 -0
- data/lib/openai/models/conversations/conversation.rb +51 -0
- data/lib/openai/models/conversations/conversation_create_params.rb +39 -0
- data/lib/openai/models/conversations/conversation_delete_params.rb +16 -0
- data/lib/openai/models/conversations/conversation_deleted.rb +29 -0
- data/lib/openai/models/conversations/conversation_deleted_resource.rb +30 -0
- data/lib/openai/models/conversations/conversation_item.rb +568 -0
- data/lib/openai/models/conversations/conversation_item_list.rb +55 -0
- data/lib/openai/models/conversations/conversation_retrieve_params.rb +16 -0
- data/lib/openai/models/conversations/conversation_update_params.rb +31 -0
- data/lib/openai/models/conversations/file_citation_body.rb +42 -0
- data/lib/openai/models/conversations/input_file_content.rb +42 -0
- data/lib/openai/models/conversations/input_image_content.rb +62 -0
- data/lib/openai/models/conversations/input_text_content.rb +26 -0
- data/lib/openai/models/conversations/item_create_params.rb +37 -0
- data/lib/openai/models/conversations/item_delete_params.rb +22 -0
- data/lib/openai/models/conversations/item_list_params.rb +84 -0
- data/lib/openai/models/conversations/item_retrieve_params.rb +36 -0
- data/lib/openai/models/conversations/lob_prob.rb +35 -0
- data/lib/openai/models/conversations/message.rb +115 -0
- data/lib/openai/models/conversations/output_text_content.rb +57 -0
- data/lib/openai/models/conversations/refusal_content.rb +26 -0
- data/lib/openai/models/conversations/summary_text_content.rb +23 -0
- data/lib/openai/models/conversations/text_content.rb +23 -0
- data/lib/openai/models/conversations/top_log_prob.rb +29 -0
- data/lib/openai/models/conversations/url_citation_body.rb +50 -0
- data/lib/openai/models/eval_create_params.rb +6 -20
- data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +29 -53
- data/lib/openai/models/evals/create_eval_jsonl_run_data_source.rb +1 -3
- data/lib/openai/models/evals/run_create_params.rb +18 -54
- data/lib/openai/models/file_create_params.rb +37 -1
- data/lib/openai/models/fine_tuning/reinforcement_hyperparameters.rb +1 -4
- data/lib/openai/models/graders/text_similarity_grader.rb +6 -5
- data/lib/openai/models/moderation.rb +5 -15
- data/lib/openai/models/reasoning.rb +1 -1
- data/lib/openai/models/responses/input_item_list_params.rb +1 -9
- data/lib/openai/models/responses/response.rb +32 -9
- data/lib/openai/models/responses/response_computer_tool_call.rb +2 -6
- data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +1 -3
- data/lib/openai/models/responses/response_conversation_param.rb +20 -0
- data/lib/openai/models/responses/response_create_params.rb +40 -9
- data/lib/openai/models/responses/response_input_item.rb +2 -7
- data/lib/openai/models/responses/response_input_message_item.rb +1 -4
- data/lib/openai/models/responses/response_output_item.rb +1 -3
- data/lib/openai/models/responses/response_output_message.rb +1 -3
- data/lib/openai/models/responses/response_output_text.rb +3 -10
- data/lib/openai/models/responses/response_stream_event.rb +4 -16
- data/lib/openai/models/responses/response_text_delta_event.rb +1 -3
- data/lib/openai/models/responses/response_text_done_event.rb +1 -3
- data/lib/openai/models/responses/tool.rb +145 -34
- data/lib/openai/models/upload_create_params.rb +37 -1
- data/lib/openai/models.rb +2 -0
- data/lib/openai/resources/batches.rb +3 -1
- data/lib/openai/resources/conversations/items.rb +141 -0
- data/lib/openai/resources/conversations.rb +112 -0
- data/lib/openai/resources/files.rb +4 -2
- data/lib/openai/resources/responses/input_items.rb +1 -3
- data/lib/openai/resources/responses.rb +8 -4
- data/lib/openai/resources/uploads.rb +3 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +31 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/errors.rbi +5 -5
- data/rbi/openai/helpers/structured_output/array_of.rbi +0 -3
- data/rbi/openai/helpers/structured_output/json_schema_converter.rbi +10 -0
- data/rbi/openai/internal/conversation_cursor_page.rbi +25 -0
- data/rbi/openai/models/batch_create_params.rbi +60 -0
- data/rbi/openai/models/beta/thread_create_and_run_params.rbi +3 -3
- data/rbi/openai/models/beta/threads/run.rbi +3 -3
- data/rbi/openai/models/beta/threads/run_create_params.rbi +3 -3
- data/rbi/openai/models/chat/chat_completion.rbi +6 -9
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +6 -9
- data/rbi/openai/models/chat/completion_create_params.rbi +8 -11
- data/rbi/openai/models/conversations/computer_screenshot_content.rbi +60 -0
- data/rbi/openai/models/conversations/container_file_citation_body.rbi +82 -0
- data/rbi/openai/models/conversations/conversation.rbi +76 -0
- data/rbi/openai/models/conversations/conversation_create_params.rbi +144 -0
- data/rbi/openai/models/conversations/conversation_delete_params.rbi +32 -0
- data/rbi/openai/models/conversations/conversation_deleted.rbi +40 -0
- data/rbi/openai/models/conversations/conversation_deleted_resource.rbi +40 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +835 -0
- data/rbi/openai/models/conversations/conversation_item_list.rbi +101 -0
- data/rbi/openai/models/conversations/conversation_retrieve_params.rbi +32 -0
- data/rbi/openai/models/conversations/conversation_update_params.rbi +56 -0
- data/rbi/openai/models/conversations/file_citation_body.rbi +61 -0
- data/rbi/openai/models/conversations/input_file_content.rbi +72 -0
- data/rbi/openai/models/conversations/input_image_content.rbi +113 -0
- data/rbi/openai/models/conversations/input_text_content.rbi +38 -0
- data/rbi/openai/models/conversations/item_create_params.rbi +150 -0
- data/rbi/openai/models/conversations/item_delete_params.rbi +40 -0
- data/rbi/openai/models/conversations/item_list_params.rbi +174 -0
- data/rbi/openai/models/conversations/item_retrieve_params.rbi +70 -0
- data/rbi/openai/models/conversations/lob_prob.rbi +50 -0
- data/rbi/openai/models/conversations/message.rbi +196 -0
- data/rbi/openai/models/conversations/output_text_content.rbi +110 -0
- data/rbi/openai/models/conversations/refusal_content.rbi +38 -0
- data/rbi/openai/models/conversations/summary_text_content.rbi +31 -0
- data/rbi/openai/models/conversations/text_content.rbi +28 -0
- data/rbi/openai/models/conversations/top_log_prob.rbi +41 -0
- data/rbi/openai/models/conversations/url_citation_body.rbi +74 -0
- data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +33 -33
- data/rbi/openai/models/file_create_params.rbi +56 -0
- data/rbi/openai/models/graders/text_similarity_grader.rbi +11 -6
- data/rbi/openai/models/reasoning.rbi +1 -1
- data/rbi/openai/models/responses/input_item_list_params.rbi +0 -11
- data/rbi/openai/models/responses/response.rbi +57 -11
- data/rbi/openai/models/responses/response_conversation_param.rbi +33 -0
- data/rbi/openai/models/responses/response_create_params.rbi +62 -11
- data/rbi/openai/models/responses/tool.rbi +243 -31
- data/rbi/openai/models/upload_create_params.rbi +56 -0
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/batches.rbi +5 -0
- data/rbi/openai/resources/beta/threads/runs.rbi +2 -2
- data/rbi/openai/resources/beta/threads.rbi +2 -2
- data/rbi/openai/resources/chat/completions.rbi +6 -8
- data/rbi/openai/resources/conversations/items.rbi +152 -0
- data/rbi/openai/resources/conversations.rbi +110 -0
- data/rbi/openai/resources/files.rbi +5 -1
- data/rbi/openai/resources/responses/input_items.rbi +0 -3
- data/rbi/openai/resources/responses.rbi +32 -8
- data/rbi/openai/resources/uploads.rbi +4 -0
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/internal/conversation_cursor_page.rbs +15 -0
- data/sig/openai/models/batch_create_params.rbs +22 -1
- data/sig/openai/models/conversations/computer_screenshot_content.rbs +28 -0
- data/sig/openai/models/conversations/container_file_citation_body.rbs +47 -0
- data/sig/openai/models/conversations/conversation.rbs +37 -0
- data/sig/openai/models/conversations/conversation_create_params.rbs +33 -0
- data/sig/openai/models/conversations/conversation_delete_params.rbs +17 -0
- data/sig/openai/models/conversations/conversation_deleted.rbs +28 -0
- data/sig/openai/models/conversations/conversation_deleted_resource.rbs +28 -0
- data/sig/openai/models/conversations/conversation_item.rbs +403 -0
- data/sig/openai/models/conversations/conversation_item_list.rbs +44 -0
- data/sig/openai/models/conversations/conversation_retrieve_params.rbs +17 -0
- data/sig/openai/models/conversations/conversation_update_params.rbs +26 -0
- data/sig/openai/models/conversations/file_citation_body.rbs +37 -0
- data/sig/openai/models/conversations/input_file_content.rbs +41 -0
- data/sig/openai/models/conversations/input_image_content.rbs +49 -0
- data/sig/openai/models/conversations/input_text_content.rbs +17 -0
- data/sig/openai/models/conversations/item_create_params.rbs +37 -0
- data/sig/openai/models/conversations/item_delete_params.rbs +25 -0
- data/sig/openai/models/conversations/item_list_params.rbs +66 -0
- data/sig/openai/models/conversations/item_retrieve_params.rbs +37 -0
- data/sig/openai/models/conversations/lob_prob.rbs +37 -0
- data/sig/openai/models/conversations/message.rbs +95 -0
- data/sig/openai/models/conversations/output_text_content.rbs +52 -0
- data/sig/openai/models/conversations/refusal_content.rbs +17 -0
- data/sig/openai/models/conversations/summary_text_content.rbs +17 -0
- data/sig/openai/models/conversations/text_content.rbs +17 -0
- data/sig/openai/models/conversations/top_log_prob.rbs +28 -0
- data/sig/openai/models/conversations/url_citation_body.rbs +42 -0
- data/sig/openai/models/evals/create_eval_completions_run_data_source.rbs +22 -22
- data/sig/openai/models/file_create_params.rbs +22 -1
- data/sig/openai/models/graders/text_similarity_grader.rbs +3 -1
- data/sig/openai/models/responses/input_item_list_params.rbs +0 -7
- data/sig/openai/models/responses/response.rbs +15 -0
- data/sig/openai/models/responses/response_conversation_param.rbs +15 -0
- data/sig/openai/models/responses/response_create_params.rbs +14 -0
- data/sig/openai/models/responses/tool.rbs +83 -18
- data/sig/openai/models/upload_create_params.rbs +22 -1
- data/sig/openai/models.rbs +2 -0
- data/sig/openai/resources/batches.rbs +1 -0
- data/sig/openai/resources/conversations/items.rbs +38 -0
- data/sig/openai/resources/conversations.rbs +31 -0
- data/sig/openai/resources/files.rbs +1 -0
- data/sig/openai/resources/responses/input_items.rbs +0 -1
- data/sig/openai/resources/responses.rbs +2 -0
- data/sig/openai/resources/uploads.rbs +1 -0
- metadata +95 -2
@@ -0,0 +1,82 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
class ContainerFileCitationBody < OpenAI::Internal::Type::BaseModel
|
7
|
+
OrHash =
|
8
|
+
T.type_alias do
|
9
|
+
T.any(
|
10
|
+
OpenAI::Conversations::ContainerFileCitationBody,
|
11
|
+
OpenAI::Internal::AnyHash
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
# The ID of the container file.
|
16
|
+
sig { returns(String) }
|
17
|
+
attr_accessor :container_id
|
18
|
+
|
19
|
+
# The index of the last character of the container file citation in the message.
|
20
|
+
sig { returns(Integer) }
|
21
|
+
attr_accessor :end_index
|
22
|
+
|
23
|
+
# The ID of the file.
|
24
|
+
sig { returns(String) }
|
25
|
+
attr_accessor :file_id
|
26
|
+
|
27
|
+
# The filename of the container file cited.
|
28
|
+
sig { returns(String) }
|
29
|
+
attr_accessor :filename
|
30
|
+
|
31
|
+
# The index of the first character of the container file citation in the message.
|
32
|
+
sig { returns(Integer) }
|
33
|
+
attr_accessor :start_index
|
34
|
+
|
35
|
+
# The type of the container file citation. Always `container_file_citation`.
|
36
|
+
sig { returns(Symbol) }
|
37
|
+
attr_accessor :type
|
38
|
+
|
39
|
+
sig do
|
40
|
+
params(
|
41
|
+
container_id: String,
|
42
|
+
end_index: Integer,
|
43
|
+
file_id: String,
|
44
|
+
filename: String,
|
45
|
+
start_index: Integer,
|
46
|
+
type: Symbol
|
47
|
+
).returns(T.attached_class)
|
48
|
+
end
|
49
|
+
def self.new(
|
50
|
+
# The ID of the container file.
|
51
|
+
container_id:,
|
52
|
+
# The index of the last character of the container file citation in the message.
|
53
|
+
end_index:,
|
54
|
+
# The ID of the file.
|
55
|
+
file_id:,
|
56
|
+
# The filename of the container file cited.
|
57
|
+
filename:,
|
58
|
+
# The index of the first character of the container file citation in the message.
|
59
|
+
start_index:,
|
60
|
+
# The type of the container file citation. Always `container_file_citation`.
|
61
|
+
type: :container_file_citation
|
62
|
+
)
|
63
|
+
end
|
64
|
+
|
65
|
+
sig do
|
66
|
+
override.returns(
|
67
|
+
{
|
68
|
+
container_id: String,
|
69
|
+
end_index: Integer,
|
70
|
+
file_id: String,
|
71
|
+
filename: String,
|
72
|
+
start_index: Integer,
|
73
|
+
type: Symbol
|
74
|
+
}
|
75
|
+
)
|
76
|
+
end
|
77
|
+
def to_hash
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
class Conversation < OpenAI::Internal::Type::BaseModel
|
7
|
+
OrHash =
|
8
|
+
T.type_alias do
|
9
|
+
T.any(
|
10
|
+
OpenAI::Conversations::Conversation,
|
11
|
+
OpenAI::Internal::AnyHash
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
# The unique ID of the conversation.
|
16
|
+
sig { returns(String) }
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# The time at which the conversation was created, measured in seconds since the
|
20
|
+
# Unix epoch.
|
21
|
+
sig { returns(Integer) }
|
22
|
+
attr_accessor :created_at
|
23
|
+
|
24
|
+
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
25
|
+
# for storing additional information about the object in a structured format, and
|
26
|
+
# querying for objects via API or the dashboard. Keys are strings with a maximum
|
27
|
+
# length of 64 characters. Values are strings with a maximum length of 512
|
28
|
+
# characters.
|
29
|
+
sig { returns(T.anything) }
|
30
|
+
attr_accessor :metadata
|
31
|
+
|
32
|
+
# The object type, which is always `conversation`.
|
33
|
+
sig { returns(Symbol) }
|
34
|
+
attr_accessor :object
|
35
|
+
|
36
|
+
sig do
|
37
|
+
params(
|
38
|
+
id: String,
|
39
|
+
created_at: Integer,
|
40
|
+
metadata: T.anything,
|
41
|
+
object: Symbol
|
42
|
+
).returns(T.attached_class)
|
43
|
+
end
|
44
|
+
def self.new(
|
45
|
+
# The unique ID of the conversation.
|
46
|
+
id:,
|
47
|
+
# The time at which the conversation was created, measured in seconds since the
|
48
|
+
# Unix epoch.
|
49
|
+
created_at:,
|
50
|
+
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
51
|
+
# for storing additional information about the object in a structured format, and
|
52
|
+
# querying for objects via API or the dashboard. Keys are strings with a maximum
|
53
|
+
# length of 64 characters. Values are strings with a maximum length of 512
|
54
|
+
# characters.
|
55
|
+
metadata:,
|
56
|
+
# The object type, which is always `conversation`.
|
57
|
+
object: :conversation
|
58
|
+
)
|
59
|
+
end
|
60
|
+
|
61
|
+
sig do
|
62
|
+
override.returns(
|
63
|
+
{
|
64
|
+
id: String,
|
65
|
+
created_at: Integer,
|
66
|
+
metadata: T.anything,
|
67
|
+
object: Symbol
|
68
|
+
}
|
69
|
+
)
|
70
|
+
end
|
71
|
+
def to_hash
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
class ConversationCreateParams < OpenAI::Internal::Type::BaseModel
|
7
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
8
|
+
include OpenAI::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
OpenAI::Conversations::ConversationCreateParams,
|
14
|
+
OpenAI::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Initial items to include in the conversation context. You may add up to 20 items
|
19
|
+
# at a time.
|
20
|
+
sig do
|
21
|
+
returns(
|
22
|
+
T.nilable(
|
23
|
+
T::Array[
|
24
|
+
T.any(
|
25
|
+
OpenAI::Responses::EasyInputMessage,
|
26
|
+
OpenAI::Responses::ResponseInputItem::Message,
|
27
|
+
OpenAI::Responses::ResponseOutputMessage,
|
28
|
+
OpenAI::Responses::ResponseFileSearchToolCall,
|
29
|
+
OpenAI::Responses::ResponseComputerToolCall,
|
30
|
+
OpenAI::Responses::ResponseInputItem::ComputerCallOutput,
|
31
|
+
OpenAI::Responses::ResponseFunctionWebSearch,
|
32
|
+
OpenAI::Responses::ResponseFunctionToolCall,
|
33
|
+
OpenAI::Responses::ResponseInputItem::FunctionCallOutput,
|
34
|
+
OpenAI::Responses::ResponseReasoningItem,
|
35
|
+
OpenAI::Responses::ResponseInputItem::ImageGenerationCall,
|
36
|
+
OpenAI::Responses::ResponseCodeInterpreterToolCall,
|
37
|
+
OpenAI::Responses::ResponseInputItem::LocalShellCall,
|
38
|
+
OpenAI::Responses::ResponseInputItem::LocalShellCallOutput,
|
39
|
+
OpenAI::Responses::ResponseInputItem::McpListTools,
|
40
|
+
OpenAI::Responses::ResponseInputItem::McpApprovalRequest,
|
41
|
+
OpenAI::Responses::ResponseInputItem::McpApprovalResponse,
|
42
|
+
OpenAI::Responses::ResponseInputItem::McpCall,
|
43
|
+
OpenAI::Responses::ResponseCustomToolCallOutput,
|
44
|
+
OpenAI::Responses::ResponseCustomToolCall,
|
45
|
+
OpenAI::Responses::ResponseInputItem::ItemReference
|
46
|
+
)
|
47
|
+
]
|
48
|
+
)
|
49
|
+
)
|
50
|
+
end
|
51
|
+
attr_accessor :items
|
52
|
+
|
53
|
+
# Set of 16 key-value pairs that can be attached to an object. Useful for storing
|
54
|
+
# additional information about the object in a structured format.
|
55
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
56
|
+
attr_accessor :metadata
|
57
|
+
|
58
|
+
sig do
|
59
|
+
params(
|
60
|
+
items:
|
61
|
+
T.nilable(
|
62
|
+
T::Array[
|
63
|
+
T.any(
|
64
|
+
OpenAI::Responses::EasyInputMessage::OrHash,
|
65
|
+
OpenAI::Responses::ResponseInputItem::Message::OrHash,
|
66
|
+
OpenAI::Responses::ResponseOutputMessage::OrHash,
|
67
|
+
OpenAI::Responses::ResponseFileSearchToolCall::OrHash,
|
68
|
+
OpenAI::Responses::ResponseComputerToolCall::OrHash,
|
69
|
+
OpenAI::Responses::ResponseInputItem::ComputerCallOutput::OrHash,
|
70
|
+
OpenAI::Responses::ResponseFunctionWebSearch::OrHash,
|
71
|
+
OpenAI::Responses::ResponseFunctionToolCall::OrHash,
|
72
|
+
OpenAI::Responses::ResponseInputItem::FunctionCallOutput::OrHash,
|
73
|
+
OpenAI::Responses::ResponseReasoningItem::OrHash,
|
74
|
+
OpenAI::Responses::ResponseInputItem::ImageGenerationCall::OrHash,
|
75
|
+
OpenAI::Responses::ResponseCodeInterpreterToolCall::OrHash,
|
76
|
+
OpenAI::Responses::ResponseInputItem::LocalShellCall::OrHash,
|
77
|
+
OpenAI::Responses::ResponseInputItem::LocalShellCallOutput::OrHash,
|
78
|
+
OpenAI::Responses::ResponseInputItem::McpListTools::OrHash,
|
79
|
+
OpenAI::Responses::ResponseInputItem::McpApprovalRequest::OrHash,
|
80
|
+
OpenAI::Responses::ResponseInputItem::McpApprovalResponse::OrHash,
|
81
|
+
OpenAI::Responses::ResponseInputItem::McpCall::OrHash,
|
82
|
+
OpenAI::Responses::ResponseCustomToolCallOutput::OrHash,
|
83
|
+
OpenAI::Responses::ResponseCustomToolCall::OrHash,
|
84
|
+
OpenAI::Responses::ResponseInputItem::ItemReference::OrHash
|
85
|
+
)
|
86
|
+
]
|
87
|
+
),
|
88
|
+
metadata: T.nilable(T::Hash[Symbol, String]),
|
89
|
+
request_options: OpenAI::RequestOptions::OrHash
|
90
|
+
).returns(T.attached_class)
|
91
|
+
end
|
92
|
+
def self.new(
|
93
|
+
# Initial items to include in the conversation context. You may add up to 20 items
|
94
|
+
# at a time.
|
95
|
+
items: nil,
|
96
|
+
# Set of 16 key-value pairs that can be attached to an object. Useful for storing
|
97
|
+
# additional information about the object in a structured format.
|
98
|
+
metadata: nil,
|
99
|
+
request_options: {}
|
100
|
+
)
|
101
|
+
end
|
102
|
+
|
103
|
+
sig do
|
104
|
+
override.returns(
|
105
|
+
{
|
106
|
+
items:
|
107
|
+
T.nilable(
|
108
|
+
T::Array[
|
109
|
+
T.any(
|
110
|
+
OpenAI::Responses::EasyInputMessage,
|
111
|
+
OpenAI::Responses::ResponseInputItem::Message,
|
112
|
+
OpenAI::Responses::ResponseOutputMessage,
|
113
|
+
OpenAI::Responses::ResponseFileSearchToolCall,
|
114
|
+
OpenAI::Responses::ResponseComputerToolCall,
|
115
|
+
OpenAI::Responses::ResponseInputItem::ComputerCallOutput,
|
116
|
+
OpenAI::Responses::ResponseFunctionWebSearch,
|
117
|
+
OpenAI::Responses::ResponseFunctionToolCall,
|
118
|
+
OpenAI::Responses::ResponseInputItem::FunctionCallOutput,
|
119
|
+
OpenAI::Responses::ResponseReasoningItem,
|
120
|
+
OpenAI::Responses::ResponseInputItem::ImageGenerationCall,
|
121
|
+
OpenAI::Responses::ResponseCodeInterpreterToolCall,
|
122
|
+
OpenAI::Responses::ResponseInputItem::LocalShellCall,
|
123
|
+
OpenAI::Responses::ResponseInputItem::LocalShellCallOutput,
|
124
|
+
OpenAI::Responses::ResponseInputItem::McpListTools,
|
125
|
+
OpenAI::Responses::ResponseInputItem::McpApprovalRequest,
|
126
|
+
OpenAI::Responses::ResponseInputItem::McpApprovalResponse,
|
127
|
+
OpenAI::Responses::ResponseInputItem::McpCall,
|
128
|
+
OpenAI::Responses::ResponseCustomToolCallOutput,
|
129
|
+
OpenAI::Responses::ResponseCustomToolCall,
|
130
|
+
OpenAI::Responses::ResponseInputItem::ItemReference
|
131
|
+
)
|
132
|
+
]
|
133
|
+
),
|
134
|
+
metadata: T.nilable(T::Hash[Symbol, String]),
|
135
|
+
request_options: OpenAI::RequestOptions
|
136
|
+
}
|
137
|
+
)
|
138
|
+
end
|
139
|
+
def to_hash
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
class ConversationDeleteParams < OpenAI::Internal::Type::BaseModel
|
7
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
8
|
+
include OpenAI::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
OpenAI::Conversations::ConversationDeleteParams,
|
14
|
+
OpenAI::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
sig do
|
19
|
+
params(request_options: OpenAI::RequestOptions::OrHash).returns(
|
20
|
+
T.attached_class
|
21
|
+
)
|
22
|
+
end
|
23
|
+
def self.new(request_options: {})
|
24
|
+
end
|
25
|
+
|
26
|
+
sig { override.returns({ request_options: OpenAI::RequestOptions }) }
|
27
|
+
def to_hash
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
class ConversationDeleted < OpenAI::Internal::Type::BaseModel
|
7
|
+
OrHash =
|
8
|
+
T.type_alias do
|
9
|
+
T.any(
|
10
|
+
OpenAI::Conversations::ConversationDeleted,
|
11
|
+
OpenAI::Internal::AnyHash
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
sig { returns(String) }
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
sig { returns(T::Boolean) }
|
19
|
+
attr_accessor :deleted
|
20
|
+
|
21
|
+
sig { returns(Symbol) }
|
22
|
+
attr_accessor :object
|
23
|
+
|
24
|
+
sig do
|
25
|
+
params(id: String, deleted: T::Boolean, object: Symbol).returns(
|
26
|
+
T.attached_class
|
27
|
+
)
|
28
|
+
end
|
29
|
+
def self.new(id:, deleted:, object: :"conversation.deleted")
|
30
|
+
end
|
31
|
+
|
32
|
+
sig do
|
33
|
+
override.returns({ id: String, deleted: T::Boolean, object: Symbol })
|
34
|
+
end
|
35
|
+
def to_hash
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
class ConversationDeletedResource < OpenAI::Internal::Type::BaseModel
|
7
|
+
OrHash =
|
8
|
+
T.type_alias do
|
9
|
+
T.any(
|
10
|
+
OpenAI::Conversations::ConversationDeletedResource,
|
11
|
+
OpenAI::Internal::AnyHash
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
sig { returns(String) }
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
sig { returns(T::Boolean) }
|
19
|
+
attr_accessor :deleted
|
20
|
+
|
21
|
+
sig { returns(Symbol) }
|
22
|
+
attr_accessor :object
|
23
|
+
|
24
|
+
sig do
|
25
|
+
params(id: String, deleted: T::Boolean, object: Symbol).returns(
|
26
|
+
T.attached_class
|
27
|
+
)
|
28
|
+
end
|
29
|
+
def self.new(id:, deleted:, object: :"conversation.deleted")
|
30
|
+
end
|
31
|
+
|
32
|
+
sig do
|
33
|
+
override.returns({ id: String, deleted: T::Boolean, object: Symbol })
|
34
|
+
end
|
35
|
+
def to_hash
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|