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
@@ -157,7 +157,7 @@ module OpenAI
|
|
157
157
|
|
158
158
|
# @!attribute truncation_strategy
|
159
159
|
# Controls for how a thread will be truncated prior to the run. Use this to
|
160
|
-
# control the
|
160
|
+
# control the initial context window of the run.
|
161
161
|
#
|
162
162
|
# @return [OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy, nil]
|
163
163
|
optional :truncation_strategy,
|
@@ -223,9 +223,7 @@ module OpenAI
|
|
223
223
|
#
|
224
224
|
# @return [Array<OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message>, nil]
|
225
225
|
optional :messages,
|
226
|
-
-> {
|
227
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message]
|
228
|
-
}
|
226
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message] }
|
229
227
|
|
230
228
|
# @!attribute metadata
|
231
229
|
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
@@ -366,9 +364,7 @@ module OpenAI
|
|
366
364
|
#
|
367
365
|
# @return [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::Tool::FileSearch>, nil]
|
368
366
|
optional :tools,
|
369
|
-
-> {
|
370
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::Tool]
|
371
|
-
}
|
367
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::Tool] }
|
372
368
|
|
373
369
|
# @!method initialize(file_id: nil, tools: nil)
|
374
370
|
# @param file_id [String] The ID of the file to attach to the message.
|
@@ -383,9 +379,7 @@ module OpenAI
|
|
383
379
|
variant :code_interpreter, -> { OpenAI::Beta::CodeInterpreterTool }
|
384
380
|
|
385
381
|
variant :file_search,
|
386
|
-
-> {
|
387
|
-
OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::Tool::FileSearch
|
388
|
-
}
|
382
|
+
-> { OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::Tool::FileSearch }
|
389
383
|
|
390
384
|
class FileSearch < OpenAI::Internal::Type::BaseModel
|
391
385
|
# @!attribute type
|
@@ -415,10 +409,7 @@ module OpenAI
|
|
415
409
|
# @!attribute file_search
|
416
410
|
#
|
417
411
|
# @return [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch, nil]
|
418
|
-
optional :file_search,
|
419
|
-
-> {
|
420
|
-
OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch
|
421
|
-
}
|
412
|
+
optional :file_search, -> { OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch }
|
422
413
|
|
423
414
|
# @!method initialize(code_interpreter: nil, file_search: nil)
|
424
415
|
# A set of resources that are made available to the assistant's tools in this
|
@@ -466,9 +457,7 @@ module OpenAI
|
|
466
457
|
#
|
467
458
|
# @return [Array<OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore>, nil]
|
468
459
|
optional :vector_stores,
|
469
|
-
-> {
|
470
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore]
|
471
|
-
}
|
460
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore] }
|
472
461
|
|
473
462
|
# @!method initialize(vector_store_ids: nil, vector_stores: nil)
|
474
463
|
# Some parameter documentations has been truncated, see
|
@@ -486,9 +475,7 @@ module OpenAI
|
|
486
475
|
#
|
487
476
|
# @return [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static, nil]
|
488
477
|
optional :chunking_strategy,
|
489
|
-
union: -> {
|
490
|
-
OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy
|
491
|
-
}
|
478
|
+
union: -> { OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy }
|
492
479
|
|
493
480
|
# @!attribute file_ids
|
494
481
|
# A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
|
@@ -531,14 +518,10 @@ module OpenAI
|
|
531
518
|
|
532
519
|
# The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
|
533
520
|
variant :auto,
|
534
|
-
-> {
|
535
|
-
OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto
|
536
|
-
}
|
521
|
+
-> { OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto }
|
537
522
|
|
538
523
|
variant :static,
|
539
|
-
-> {
|
540
|
-
OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static
|
541
|
-
}
|
524
|
+
-> { OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static }
|
542
525
|
|
543
526
|
class Auto < OpenAI::Internal::Type::BaseModel
|
544
527
|
# @!attribute type
|
@@ -559,9 +542,7 @@ module OpenAI
|
|
559
542
|
#
|
560
543
|
# @return [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static]
|
561
544
|
required :static,
|
562
|
-
-> {
|
563
|
-
OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static
|
564
|
-
}
|
545
|
+
-> { OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static }
|
565
546
|
|
566
547
|
# @!attribute type
|
567
548
|
# Always `static`.
|
@@ -614,10 +595,7 @@ module OpenAI
|
|
614
595
|
# @!attribute code_interpreter
|
615
596
|
#
|
616
597
|
# @return [OpenAI::Models::Beta::ThreadCreateAndRunParams::ToolResources::CodeInterpreter, nil]
|
617
|
-
optional :code_interpreter,
|
618
|
-
-> {
|
619
|
-
OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::CodeInterpreter
|
620
|
-
}
|
598
|
+
optional :code_interpreter, -> { OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::CodeInterpreter }
|
621
599
|
|
622
600
|
# @!attribute file_search
|
623
601
|
#
|
@@ -694,7 +672,7 @@ module OpenAI
|
|
694
672
|
# details.
|
695
673
|
#
|
696
674
|
# Controls for how a thread will be truncated prior to the run. Use this to
|
697
|
-
# control the
|
675
|
+
# control the initial context window of the run.
|
698
676
|
#
|
699
677
|
# @param type [Symbol, OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy::Type] The truncation strategy to use for the thread. The default is `auto`. If set to
|
700
678
|
#
|
@@ -148,9 +148,7 @@ module OpenAI
|
|
148
148
|
#
|
149
149
|
# @return [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::ThreadCreateParams::Message::Attachment::Tool::FileSearch>, nil]
|
150
150
|
optional :tools,
|
151
|
-
-> {
|
152
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool]
|
153
|
-
}
|
151
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool] }
|
154
152
|
|
155
153
|
# @!method initialize(file_id: nil, tools: nil)
|
156
154
|
# @param file_id [String] The ID of the file to attach to the message.
|
@@ -164,10 +162,7 @@ module OpenAI
|
|
164
162
|
|
165
163
|
variant :code_interpreter, -> { OpenAI::Beta::CodeInterpreterTool }
|
166
164
|
|
167
|
-
variant :file_search,
|
168
|
-
-> {
|
169
|
-
OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool::FileSearch
|
170
|
-
}
|
165
|
+
variant :file_search, -> { OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool::FileSearch }
|
171
166
|
|
172
167
|
class FileSearch < OpenAI::Internal::Type::BaseModel
|
173
168
|
# @!attribute type
|
@@ -243,9 +238,7 @@ module OpenAI
|
|
243
238
|
#
|
244
239
|
# @return [Array<OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore>, nil]
|
245
240
|
optional :vector_stores,
|
246
|
-
-> {
|
247
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore]
|
248
|
-
}
|
241
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore] }
|
249
242
|
|
250
243
|
# @!method initialize(vector_store_ids: nil, vector_stores: nil)
|
251
244
|
# Some parameter documentations has been truncated, see
|
@@ -263,9 +256,7 @@ module OpenAI
|
|
263
256
|
#
|
264
257
|
# @return [OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static, nil]
|
265
258
|
optional :chunking_strategy,
|
266
|
-
union: -> {
|
267
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy
|
268
|
-
}
|
259
|
+
union: -> { OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy }
|
269
260
|
|
270
261
|
# @!attribute file_ids
|
271
262
|
# A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
|
@@ -308,14 +299,10 @@ module OpenAI
|
|
308
299
|
|
309
300
|
# The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
|
310
301
|
variant :auto,
|
311
|
-
-> {
|
312
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto
|
313
|
-
}
|
302
|
+
-> { OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto }
|
314
303
|
|
315
304
|
variant :static,
|
316
|
-
-> {
|
317
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static
|
318
|
-
}
|
305
|
+
-> { OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static }
|
319
306
|
|
320
307
|
class Auto < OpenAI::Internal::Type::BaseModel
|
321
308
|
# @!attribute type
|
@@ -336,9 +323,7 @@ module OpenAI
|
|
336
323
|
#
|
337
324
|
# @return [OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static]
|
338
325
|
required :static,
|
339
|
-
-> {
|
340
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static
|
341
|
-
}
|
326
|
+
-> { OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static }
|
342
327
|
|
343
328
|
# @!attribute type
|
344
329
|
# Always `static`.
|
@@ -38,10 +38,7 @@ module OpenAI
|
|
38
38
|
# The content of the message in array of text and/or images.
|
39
39
|
#
|
40
40
|
# @return [Array<OpenAI::Models::Beta::Threads::ImageFileContentBlock, OpenAI::Models::Beta::Threads::ImageURLContentBlock, OpenAI::Models::Beta::Threads::TextContentBlock, OpenAI::Models::Beta::Threads::RefusalContentBlock>]
|
41
|
-
required :content,
|
42
|
-
-> {
|
43
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::MessageContent]
|
44
|
-
}
|
41
|
+
required :content, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::MessageContent] }
|
45
42
|
|
46
43
|
# @!attribute created_at
|
47
44
|
# The Unix timestamp (in seconds) for when the message was created.
|
@@ -153,9 +150,7 @@ module OpenAI
|
|
153
150
|
#
|
154
151
|
# @return [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly>, nil]
|
155
152
|
optional :tools,
|
156
|
-
-> {
|
157
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Message::Attachment::Tool]
|
158
|
-
}
|
153
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Message::Attachment::Tool] }
|
159
154
|
|
160
155
|
# @!method initialize(file_id: nil, tools: nil)
|
161
156
|
# @param file_id [String] The ID of the file to attach to the message.
|
@@ -167,9 +162,7 @@ module OpenAI
|
|
167
162
|
|
168
163
|
variant -> { OpenAI::Beta::CodeInterpreterTool }
|
169
164
|
|
170
|
-
variant -> {
|
171
|
-
OpenAI::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly
|
172
|
-
}
|
165
|
+
variant -> { OpenAI::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly }
|
173
166
|
|
174
167
|
class AssistantToolsFileSearchTypeOnly < OpenAI::Internal::Type::BaseModel
|
175
168
|
# @!attribute type
|
@@ -107,9 +107,7 @@ module OpenAI
|
|
107
107
|
#
|
108
108
|
# @return [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::MessageCreateParams::Attachment::Tool::FileSearch>, nil]
|
109
109
|
optional :tools,
|
110
|
-
-> {
|
111
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::MessageCreateParams::Attachment::Tool]
|
112
|
-
}
|
110
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::MessageCreateParams::Attachment::Tool] }
|
113
111
|
|
114
112
|
# @!method initialize(file_id: nil, tools: nil)
|
115
113
|
# @param file_id [String] The ID of the file to attach to the message.
|
@@ -123,10 +121,7 @@ module OpenAI
|
|
123
121
|
|
124
122
|
variant :code_interpreter, -> { OpenAI::Beta::CodeInterpreterTool }
|
125
123
|
|
126
|
-
variant :file_search,
|
127
|
-
-> {
|
128
|
-
OpenAI::Beta::Threads::MessageCreateParams::Attachment::Tool::FileSearch
|
129
|
-
}
|
124
|
+
variant :file_search, -> { OpenAI::Beta::Threads::MessageCreateParams::Attachment::Tool::FileSearch }
|
130
125
|
|
131
126
|
class FileSearch < OpenAI::Internal::Type::BaseModel
|
132
127
|
# @!attribute type
|
@@ -195,7 +195,7 @@ module OpenAI
|
|
195
195
|
|
196
196
|
# @!attribute truncation_strategy
|
197
197
|
# Controls for how a thread will be truncated prior to the run. Use this to
|
198
|
-
# control the
|
198
|
+
# control the initial context window of the run.
|
199
199
|
#
|
200
200
|
# @return [OpenAI::Models::Beta::Threads::Run::TruncationStrategy, nil]
|
201
201
|
required :truncation_strategy, -> { OpenAI::Beta::Threads::Run::TruncationStrategy }, nil?: true
|
@@ -355,10 +355,7 @@ module OpenAI
|
|
355
355
|
# Details on the tool outputs needed for this run to continue.
|
356
356
|
#
|
357
357
|
# @return [OpenAI::Models::Beta::Threads::Run::RequiredAction::SubmitToolOutputs]
|
358
|
-
required :submit_tool_outputs,
|
359
|
-
-> {
|
360
|
-
OpenAI::Beta::Threads::Run::RequiredAction::SubmitToolOutputs
|
361
|
-
}
|
358
|
+
required :submit_tool_outputs, -> { OpenAI::Beta::Threads::Run::RequiredAction::SubmitToolOutputs }
|
362
359
|
|
363
360
|
# @!attribute type
|
364
361
|
# For now, this is always `submit_tool_outputs`.
|
@@ -381,9 +378,7 @@ module OpenAI
|
|
381
378
|
#
|
382
379
|
# @return [Array<OpenAI::Models::Beta::Threads::RequiredActionFunctionToolCall>]
|
383
380
|
required :tool_calls,
|
384
|
-
-> {
|
385
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::RequiredActionFunctionToolCall]
|
386
|
-
}
|
381
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::RequiredActionFunctionToolCall] }
|
387
382
|
|
388
383
|
# @!method initialize(tool_calls:)
|
389
384
|
# Details on the tool outputs needed for this run to continue.
|
@@ -415,7 +410,7 @@ module OpenAI
|
|
415
410
|
# {OpenAI::Models::Beta::Threads::Run::TruncationStrategy} for more details.
|
416
411
|
#
|
417
412
|
# Controls for how a thread will be truncated prior to the run. Use this to
|
418
|
-
# control the
|
413
|
+
# control the initial context window of the run.
|
419
414
|
#
|
420
415
|
# @param type [Symbol, OpenAI::Models::Beta::Threads::Run::TruncationStrategy::Type] The truncation strategy to use for the thread. The default is `auto`. If set to
|
421
416
|
#
|
@@ -184,7 +184,7 @@ module OpenAI
|
|
184
184
|
|
185
185
|
# @!attribute truncation_strategy
|
186
186
|
# Controls for how a thread will be truncated prior to the run. Use this to
|
187
|
-
# control the
|
187
|
+
# control the initial context window of the run.
|
188
188
|
#
|
189
189
|
# @return [OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy, nil]
|
190
190
|
optional :truncation_strategy,
|
@@ -236,10 +236,7 @@ module OpenAI
|
|
236
236
|
# The text contents of the message.
|
237
237
|
#
|
238
238
|
# @return [String, Array<OpenAI::Models::Beta::Threads::ImageFileContentBlock, OpenAI::Models::Beta::Threads::ImageURLContentBlock, OpenAI::Models::Beta::Threads::TextContentBlockParam>]
|
239
|
-
required :content,
|
240
|
-
union: -> {
|
241
|
-
OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Content
|
242
|
-
}
|
239
|
+
required :content, union: -> { OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Content }
|
243
240
|
|
244
241
|
# @!attribute role
|
245
242
|
# The role of the entity that is creating the message. Allowed values include:
|
@@ -336,9 +333,7 @@ module OpenAI
|
|
336
333
|
#
|
337
334
|
# @return [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::Tool::FileSearch>, nil]
|
338
335
|
optional :tools,
|
339
|
-
-> {
|
340
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::Tool]
|
341
|
-
}
|
336
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::Tool] }
|
342
337
|
|
343
338
|
# @!method initialize(file_id: nil, tools: nil)
|
344
339
|
# @param file_id [String] The ID of the file to attach to the message.
|
@@ -353,9 +348,7 @@ module OpenAI
|
|
353
348
|
variant :code_interpreter, -> { OpenAI::Beta::CodeInterpreterTool }
|
354
349
|
|
355
350
|
variant :file_search,
|
356
|
-
-> {
|
357
|
-
OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::Tool::FileSearch
|
358
|
-
}
|
351
|
+
-> { OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::Tool::FileSearch }
|
359
352
|
|
360
353
|
class FileSearch < OpenAI::Internal::Type::BaseModel
|
361
354
|
# @!attribute type
|
@@ -413,7 +406,7 @@ module OpenAI
|
|
413
406
|
# details.
|
414
407
|
#
|
415
408
|
# Controls for how a thread will be truncated prior to the run. Use this to
|
416
|
-
# control the
|
409
|
+
# control the initial context window of the run.
|
417
410
|
#
|
418
411
|
# @param type [Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy::Type] The truncation strategy to use for the thread. The default is `auto`. If set to
|
419
412
|
#
|
@@ -21,9 +21,7 @@ module OpenAI
|
|
21
21
|
#
|
22
22
|
# @return [Array<OpenAI::Models::Beta::Threads::RunSubmitToolOutputsParams::ToolOutput>]
|
23
23
|
required :tool_outputs,
|
24
|
-
-> {
|
25
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::RunSubmitToolOutputsParams::ToolOutput]
|
26
|
-
}
|
24
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::RunSubmitToolOutputsParams::ToolOutput] }
|
27
25
|
|
28
26
|
# @!method initialize(thread_id:, tool_outputs:, request_options: {})
|
29
27
|
# @param thread_id [String]
|
@@ -16,10 +16,7 @@ module OpenAI
|
|
16
16
|
# The Code Interpreter tool call definition.
|
17
17
|
#
|
18
18
|
# @return [OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter]
|
19
|
-
required :code_interpreter,
|
20
|
-
-> {
|
21
|
-
OpenAI::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter
|
22
|
-
}
|
19
|
+
required :code_interpreter, -> { OpenAI::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter }
|
23
20
|
|
24
21
|
# @!attribute type
|
25
22
|
# The type of tool call. This is always going to be `code_interpreter` for this
|
@@ -55,9 +52,7 @@ module OpenAI
|
|
55
52
|
#
|
56
53
|
# @return [Array<OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Logs, OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Image>]
|
57
54
|
required :outputs,
|
58
|
-
-> {
|
59
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output]
|
60
|
-
}
|
55
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output] }
|
61
56
|
|
62
57
|
# @!method initialize(input:, outputs:)
|
63
58
|
# Some parameter documentations has been truncated, see
|
@@ -77,15 +72,10 @@ module OpenAI
|
|
77
72
|
discriminator :type
|
78
73
|
|
79
74
|
# Text output from the Code Interpreter tool call as part of a run step.
|
80
|
-
variant :logs,
|
81
|
-
-> {
|
82
|
-
OpenAI::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Logs
|
83
|
-
}
|
75
|
+
variant :logs, -> { OpenAI::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Logs }
|
84
76
|
|
85
77
|
variant :image,
|
86
|
-
-> {
|
87
|
-
OpenAI::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Image
|
88
|
-
}
|
78
|
+
-> { OpenAI::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Image }
|
89
79
|
|
90
80
|
class Logs < OpenAI::Internal::Type::BaseModel
|
91
81
|
# @!attribute logs
|
@@ -113,9 +103,7 @@ module OpenAI
|
|
113
103
|
#
|
114
104
|
# @return [OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Image::Image]
|
115
105
|
required :image,
|
116
|
-
-> {
|
117
|
-
OpenAI::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Image::Image
|
118
|
-
}
|
106
|
+
-> { OpenAI::Beta::Threads::Runs::CodeInterpreterToolCall::CodeInterpreter::Output::Image::Image }
|
119
107
|
|
120
108
|
# @!attribute type
|
121
109
|
# Always `image`.
|
@@ -62,9 +62,7 @@ module OpenAI
|
|
62
62
|
#
|
63
63
|
# @return [Array<OpenAI::Models::Beta::Threads::Runs::CodeInterpreterLogs, OpenAI::Models::Beta::Threads::Runs::CodeInterpreterOutputImage>, nil]
|
64
64
|
optional :outputs,
|
65
|
-
-> {
|
66
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Runs::CodeInterpreterToolCallDelta::CodeInterpreter::Output]
|
67
|
-
}
|
65
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Runs::CodeInterpreterToolCallDelta::CodeInterpreter::Output] }
|
68
66
|
|
69
67
|
# @!method initialize(input: nil, outputs: nil)
|
70
68
|
# Some parameter documentations has been truncated, see
|
@@ -49,9 +49,7 @@ module OpenAI
|
|
49
49
|
#
|
50
50
|
# @return [Array<OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result>, nil]
|
51
51
|
optional :results,
|
52
|
-
-> {
|
53
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result]
|
54
|
-
}
|
52
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result] }
|
55
53
|
|
56
54
|
# @!method initialize(ranking_options: nil, results: nil)
|
57
55
|
# For now, this is always going to be an empty object.
|
@@ -68,9 +66,7 @@ module OpenAI
|
|
68
66
|
#
|
69
67
|
# @return [Symbol, OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::RankingOptions::Ranker]
|
70
68
|
required :ranker,
|
71
|
-
enum: -> {
|
72
|
-
OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::RankingOptions::Ranker
|
73
|
-
}
|
69
|
+
enum: -> { OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::RankingOptions::Ranker }
|
74
70
|
|
75
71
|
# @!attribute score_threshold
|
76
72
|
# The score threshold for the file search. All values must be a floating point
|
@@ -131,9 +127,7 @@ module OpenAI
|
|
131
127
|
#
|
132
128
|
# @return [Array<OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content>, nil]
|
133
129
|
optional :content,
|
134
|
-
-> {
|
135
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content]
|
136
|
-
}
|
130
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content] }
|
137
131
|
|
138
132
|
# @!method initialize(file_id:, file_name:, score:, content: nil)
|
139
133
|
# Some parameter documentations has been truncated, see
|
@@ -162,9 +156,7 @@ module OpenAI
|
|
162
156
|
#
|
163
157
|
# @return [Symbol, OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content::Type, nil]
|
164
158
|
optional :type,
|
165
|
-
enum: -> {
|
166
|
-
OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content::Type
|
167
|
-
}
|
159
|
+
enum: -> { OpenAI::Beta::Threads::Runs::FileSearchToolCall::FileSearch::Result::Content::Type }
|
168
160
|
|
169
161
|
# @!method initialize(text: nil, type: nil)
|
170
162
|
# @param text [String] The text content of the file.
|
@@ -15,10 +15,7 @@ module OpenAI
|
|
15
15
|
# @!attribute message_creation
|
16
16
|
#
|
17
17
|
# @return [OpenAI::Models::Beta::Threads::Runs::RunStepDeltaMessageDelta::MessageCreation, nil]
|
18
|
-
optional :message_creation,
|
19
|
-
-> {
|
20
|
-
OpenAI::Beta::Threads::Runs::RunStepDeltaMessageDelta::MessageCreation
|
21
|
-
}
|
18
|
+
optional :message_creation, -> { OpenAI::Beta::Threads::Runs::RunStepDeltaMessageDelta::MessageCreation }
|
22
19
|
|
23
20
|
# @!method initialize(message_creation: nil, type: :message_creation)
|
24
21
|
# Details of the message creation by the run step.
|
@@ -12,10 +12,7 @@ module OpenAI
|
|
12
12
|
# `function`.
|
13
13
|
#
|
14
14
|
# @return [Array<OpenAI::Models::Beta::Threads::Runs::CodeInterpreterToolCall, OpenAI::Models::Beta::Threads::Runs::FileSearchToolCall, OpenAI::Models::Beta::Threads::Runs::FunctionToolCall>]
|
15
|
-
required :tool_calls,
|
16
|
-
-> {
|
17
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Runs::ToolCall]
|
18
|
-
}
|
15
|
+
required :tool_calls, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Runs::ToolCall] }
|
19
16
|
|
20
17
|
# @!attribute type
|
21
18
|
# Always `tool_calls`.
|
@@ -8,10 +8,7 @@ module OpenAI
|
|
8
8
|
# @!attribute annotations
|
9
9
|
#
|
10
10
|
# @return [Array<OpenAI::Models::Beta::Threads::FileCitationAnnotation, OpenAI::Models::Beta::Threads::FilePathAnnotation>]
|
11
|
-
required :annotations,
|
12
|
-
-> {
|
13
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Annotation]
|
14
|
-
}
|
11
|
+
required :annotations, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::Annotation] }
|
15
12
|
|
16
13
|
# @!attribute value
|
17
14
|
# The data that makes up the text.
|
@@ -47,9 +47,8 @@ module OpenAI
|
|
47
47
|
# - If set to 'default', then the request will be processed with the standard
|
48
48
|
# pricing and performance for the selected model.
|
49
49
|
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
|
50
|
-
# 'priority', then the request
|
51
|
-
#
|
52
|
-
# Priority processing.
|
50
|
+
# '[priority](https://openai.com/api-priority-processing/)', then the request
|
51
|
+
# will be processed with the corresponding service tier.
|
53
52
|
# - When not set, the default behavior is 'auto'.
|
54
53
|
#
|
55
54
|
# When the `service_tier` parameter is set, the response body will include the
|
@@ -61,6 +60,8 @@ module OpenAI
|
|
61
60
|
optional :service_tier, enum: -> { OpenAI::Chat::ChatCompletion::ServiceTier }, nil?: true
|
62
61
|
|
63
62
|
# @!attribute system_fingerprint
|
63
|
+
# @deprecated
|
64
|
+
#
|
64
65
|
# This fingerprint represents the backend configuration that the model runs with.
|
65
66
|
#
|
66
67
|
# Can be used in conjunction with the `seed` request parameter to understand when
|
@@ -196,9 +197,8 @@ module OpenAI
|
|
196
197
|
# - If set to 'default', then the request will be processed with the standard
|
197
198
|
# pricing and performance for the selected model.
|
198
199
|
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
|
199
|
-
# 'priority', then the request
|
200
|
-
#
|
201
|
-
# Priority processing.
|
200
|
+
# '[priority](https://openai.com/api-priority-processing/)', then the request
|
201
|
+
# will be processed with the corresponding service tier.
|
202
202
|
# - When not set, the default behavior is 'auto'.
|
203
203
|
#
|
204
204
|
# When the `service_tier` parameter is set, the response body will include the
|
@@ -46,9 +46,8 @@ module OpenAI
|
|
46
46
|
# - If set to 'default', then the request will be processed with the standard
|
47
47
|
# pricing and performance for the selected model.
|
48
48
|
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
|
49
|
-
# 'priority', then the request
|
50
|
-
#
|
51
|
-
# Priority processing.
|
49
|
+
# '[priority](https://openai.com/api-priority-processing/)', then the request
|
50
|
+
# will be processed with the corresponding service tier.
|
52
51
|
# - When not set, the default behavior is 'auto'.
|
53
52
|
#
|
54
53
|
# When the `service_tier` parameter is set, the response body will include the
|
@@ -60,6 +59,8 @@ module OpenAI
|
|
60
59
|
optional :service_tier, enum: -> { OpenAI::Chat::ChatCompletionChunk::ServiceTier }, nil?: true
|
61
60
|
|
62
61
|
# @!attribute system_fingerprint
|
62
|
+
# @deprecated
|
63
|
+
#
|
63
64
|
# This fingerprint represents the backend configuration that the model runs with.
|
64
65
|
# Can be used in conjunction with the `seed` request parameter to understand when
|
65
66
|
# backend changes have been made that might impact determinism.
|
@@ -182,9 +183,7 @@ module OpenAI
|
|
182
183
|
#
|
183
184
|
# @return [Array<OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall>, nil]
|
184
185
|
optional :tool_calls,
|
185
|
-
-> {
|
186
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall]
|
187
|
-
}
|
186
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall] }
|
188
187
|
|
189
188
|
# @!method initialize(content: nil, function_call: nil, refusal: nil, role: nil, tool_calls: nil)
|
190
189
|
# Some parameter documentations has been truncated, see
|
@@ -379,9 +378,8 @@ module OpenAI
|
|
379
378
|
# - If set to 'default', then the request will be processed with the standard
|
380
379
|
# pricing and performance for the selected model.
|
381
380
|
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
|
382
|
-
# 'priority', then the request
|
383
|
-
#
|
384
|
-
# Priority processing.
|
381
|
+
# '[priority](https://openai.com/api-priority-processing/)', then the request
|
382
|
+
# will be processed with the corresponding service tier.
|
385
383
|
# - When not set, the default behavior is 'auto'.
|
386
384
|
#
|
387
385
|
# When the `service_tier` parameter is set, the response body will include the
|
@@ -94,10 +94,7 @@ module OpenAI
|
|
94
94
|
# Your chosen grammar.
|
95
95
|
#
|
96
96
|
# @return [OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Grammar::Grammar]
|
97
|
-
required :grammar,
|
98
|
-
-> {
|
99
|
-
OpenAI::Chat::ChatCompletionCustomTool::Custom::Format::Grammar::Grammar
|
100
|
-
}
|
97
|
+
required :grammar, -> { OpenAI::Chat::ChatCompletionCustomTool::Custom::Format::Grammar::Grammar }
|
101
98
|
|
102
99
|
# @!attribute type
|
103
100
|
# Grammar format. Always `grammar`.
|
@@ -125,9 +122,7 @@ module OpenAI
|
|
125
122
|
#
|
126
123
|
# @return [Symbol, OpenAI::Models::Chat::ChatCompletionCustomTool::Custom::Format::Grammar::Grammar::Syntax]
|
127
124
|
required :syntax,
|
128
|
-
enum: -> {
|
129
|
-
OpenAI::Chat::ChatCompletionCustomTool::Custom::Format::Grammar::Grammar::Syntax
|
130
|
-
}
|
125
|
+
enum: -> { OpenAI::Chat::ChatCompletionCustomTool::Custom::Format::Grammar::Grammar::Syntax }
|
131
126
|
|
132
127
|
# @!method initialize(definition:, syntax:)
|
133
128
|
# Your chosen grammar.
|