Skip to content

Commit c8cb083

Browse files
feat(api): manual updates (#48)
1 parent 8ab0729 commit c8cb083

File tree

13 files changed

+53
-1306
lines changed

13 files changed

+53
-1306
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 80
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-c22f59c66aec7914b6ee653d3098d1c1c8c16c180d2a158e819c8ddbf476f74b.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-4bc8df9bcbd9a3b1822bcbe38af92d0cf289acded43aa5aebc2bc503b186af89.yml

lib/openai/models/beta/assistant_create_params.rb

Lines changed: 3 additions & 227 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ class AssistantCreateParams < OpenAI::BaseModel
9898
# a list of file IDs, while the `file_search` tool requires a list of vector store
9999
# IDs.
100100
#
101-
# @return [OpenAI::Models::Beta::AssistantCreateParams::ToolResources, nil]
102-
optional :tool_resources, -> { OpenAI::Models::Beta::AssistantCreateParams::ToolResources }, nil?: true
101+
# @return [UnnamedTypeWithNoPropertyInfoOrParent0, nil]
102+
optional :tool_resources, -> { UnnamedTypeWithNoPropertyInfoOrParent0 }, nil?: true
103103

104104
# @!attribute [r] tools
105105
# A list of tool enabled on the assistant. There can be a maximum of 128 tools per
@@ -132,7 +132,7 @@ class AssistantCreateParams < OpenAI::BaseModel
132132
# # @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil]
133133
# # @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil]
134134
# # @param temperature [Float, nil]
135-
# # @param tool_resources [OpenAI::Models::Beta::AssistantCreateParams::ToolResources, nil]
135+
# # @param tool_resources [UnnamedTypeWithNoPropertyInfoOrParent0, nil]
136136
# # @param tools [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>]
137137
# # @param top_p [Float, nil]
138138
# # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
@@ -176,230 +176,6 @@ class Model < OpenAI::Union
176176
# def variants; end
177177
# end
178178
end
179-
180-
class ToolResources < OpenAI::BaseModel
181-
# @!attribute [r] code_interpreter
182-
#
183-
# @return [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::CodeInterpreter, nil]
184-
optional :code_interpreter,
185-
-> { OpenAI::Models::Beta::AssistantCreateParams::ToolResources::CodeInterpreter }
186-
187-
# @!parse
188-
# # @return [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::CodeInterpreter]
189-
# attr_writer :code_interpreter
190-
191-
# @!attribute [r] file_search
192-
#
193-
# @return [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch, nil]
194-
optional :file_search, -> { OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch }
195-
196-
# @!parse
197-
# # @return [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch]
198-
# attr_writer :file_search
199-
200-
# @!parse
201-
# # A set of resources that are used by the assistant's tools. The resources are
202-
# # specific to the type of tool. For example, the `code_interpreter` tool requires
203-
# # a list of file IDs, while the `file_search` tool requires a list of vector store
204-
# # IDs.
205-
# #
206-
# # @param code_interpreter [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::CodeInterpreter]
207-
# # @param file_search [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch]
208-
# #
209-
# def initialize(code_interpreter: nil, file_search: nil, **) = super
210-
211-
# def initialize: (Hash | OpenAI::BaseModel) -> void
212-
213-
class CodeInterpreter < OpenAI::BaseModel
214-
# @!attribute [r] file_ids
215-
# A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made
216-
# available to the `code_interpreter` tool. There can be a maximum of 20 files
217-
# associated with the tool.
218-
#
219-
# @return [Array<String>, nil]
220-
optional :file_ids, OpenAI::ArrayOf[String]
221-
222-
# @!parse
223-
# # @return [Array<String>]
224-
# attr_writer :file_ids
225-
226-
# @!parse
227-
# # @param file_ids [Array<String>]
228-
# #
229-
# def initialize(file_ids: nil, **) = super
230-
231-
# def initialize: (Hash | OpenAI::BaseModel) -> void
232-
end
233-
234-
class FileSearch < OpenAI::BaseModel
235-
# @!attribute [r] vector_store_ids
236-
# The
237-
# [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
238-
# attached to this assistant. There can be a maximum of 1 vector store attached to
239-
# the assistant.
240-
#
241-
# @return [Array<String>, nil]
242-
optional :vector_store_ids, OpenAI::ArrayOf[String]
243-
244-
# @!parse
245-
# # @return [Array<String>]
246-
# attr_writer :vector_store_ids
247-
248-
# @!attribute [r] vector_stores
249-
# A helper to create a
250-
# [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
251-
# with file_ids and attach it to this assistant. There can be a maximum of 1
252-
# vector store attached to the assistant.
253-
#
254-
# @return [Array<OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore>, nil]
255-
optional :vector_stores,
256-
-> { OpenAI::ArrayOf[OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore] }
257-
258-
# @!parse
259-
# # @return [Array<OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore>]
260-
# attr_writer :vector_stores
261-
262-
# @!parse
263-
# # @param vector_store_ids [Array<String>]
264-
# # @param vector_stores [Array<OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore>]
265-
# #
266-
# def initialize(vector_store_ids: nil, vector_stores: nil, **) = super
267-
268-
# def initialize: (Hash | OpenAI::BaseModel) -> void
269-
270-
class VectorStore < OpenAI::BaseModel
271-
# @!attribute [r] chunking_strategy
272-
# The chunking strategy used to chunk the file(s). If not set, will use the `auto`
273-
# strategy.
274-
#
275-
# @return [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static, nil]
276-
optional :chunking_strategy,
277-
union: -> { OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy }
278-
279-
# @!parse
280-
# # @return [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static]
281-
# attr_writer :chunking_strategy
282-
283-
# @!attribute [r] file_ids
284-
# A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
285-
# add to the vector store. There can be a maximum of 10000 files in a vector
286-
# store.
287-
#
288-
# @return [Array<String>, nil]
289-
optional :file_ids, OpenAI::ArrayOf[String]
290-
291-
# @!parse
292-
# # @return [Array<String>]
293-
# attr_writer :file_ids
294-
295-
# @!attribute metadata
296-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
297-
# for storing additional information about the object in a structured format, and
298-
# querying for objects via API or the dashboard.
299-
#
300-
# Keys are strings with a maximum length of 64 characters. Values are strings with
301-
# a maximum length of 512 characters.
302-
#
303-
# @return [Hash{Symbol=>String}, nil]
304-
optional :metadata, OpenAI::HashOf[String], nil?: true
305-
306-
# @!parse
307-
# # @param chunking_strategy [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static]
308-
# # @param file_ids [Array<String>]
309-
# # @param metadata [Hash{Symbol=>String}, nil]
310-
# #
311-
# def initialize(chunking_strategy: nil, file_ids: nil, metadata: nil, **) = super
312-
313-
# def initialize: (Hash | OpenAI::BaseModel) -> void
314-
315-
# @abstract
316-
#
317-
# The chunking strategy used to chunk the file(s). If not set, will use the `auto`
318-
# strategy.
319-
class ChunkingStrategy < OpenAI::Union
320-
discriminator :type
321-
322-
# The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
323-
variant :auto,
324-
-> { OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto }
325-
326-
variant :static,
327-
-> { OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static }
328-
329-
class Auto < OpenAI::BaseModel
330-
# @!attribute type
331-
# Always `auto`.
332-
#
333-
# @return [Symbol, :auto]
334-
required :type, const: :auto
335-
336-
# @!parse
337-
# # The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
338-
# # `800` and `chunk_overlap_tokens` of `400`.
339-
# #
340-
# # @param type [Symbol, :auto]
341-
# #
342-
# def initialize(type: :auto, **) = super
343-
344-
# def initialize: (Hash | OpenAI::BaseModel) -> void
345-
end
346-
347-
class Static < OpenAI::BaseModel
348-
# @!attribute static
349-
#
350-
# @return [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static]
351-
required :static,
352-
-> { OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static }
353-
354-
# @!attribute type
355-
# Always `static`.
356-
#
357-
# @return [Symbol, :static]
358-
required :type, const: :static
359-
360-
# @!parse
361-
# # @param static [OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static]
362-
# # @param type [Symbol, :static]
363-
# #
364-
# def initialize(static:, type: :static, **) = super
365-
366-
# def initialize: (Hash | OpenAI::BaseModel) -> void
367-
368-
class Static < OpenAI::BaseModel
369-
# @!attribute chunk_overlap_tokens
370-
# The number of tokens that overlap between chunks. The default value is `400`.
371-
#
372-
# Note that the overlap must not exceed half of `max_chunk_size_tokens`.
373-
#
374-
# @return [Integer]
375-
required :chunk_overlap_tokens, Integer
376-
377-
# @!attribute max_chunk_size_tokens
378-
# The maximum number of tokens in each chunk. The default value is `800`. The
379-
# minimum value is `100` and the maximum value is `4096`.
380-
#
381-
# @return [Integer]
382-
required :max_chunk_size_tokens, Integer
383-
384-
# @!parse
385-
# # @param chunk_overlap_tokens [Integer]
386-
# # @param max_chunk_size_tokens [Integer]
387-
# #
388-
# def initialize(chunk_overlap_tokens:, max_chunk_size_tokens:, **) = super
389-
390-
# def initialize: (Hash | OpenAI::BaseModel) -> void
391-
end
392-
end
393-
394-
# @!parse
395-
# class << self
396-
# # @return [Array(OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static)]
397-
# def variants; end
398-
# end
399-
end
400-
end
401-
end
402-
end
403179
end
404180
end
405181
end

lib/openai/models/beta/thread_create_and_run_params.rb

Lines changed: 4 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -517,12 +517,11 @@ class VectorStore < OpenAI::BaseModel
517517
# The chunking strategy used to chunk the file(s). If not set, will use the `auto`
518518
# strategy.
519519
#
520-
# @return [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static, nil]
521-
optional :chunking_strategy,
522-
union: -> { OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy }
520+
# @return [UnnamedTypeWithNoPropertyInfoOrParent1::Auto, UnnamedTypeWithNoPropertyInfoOrParent1::Static, nil]
521+
optional :chunking_strategy, union: -> { UnnamedTypeWithNoPropertyInfoOrParent1 }
523522

524523
# @!parse
525-
# # @return [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static]
524+
# # @return [UnnamedTypeWithNoPropertyInfoOrParent1::Auto, UnnamedTypeWithNoPropertyInfoOrParent1::Static]
526525
# attr_writer :chunking_strategy
527526

528527
# @!attribute [r] file_ids
@@ -549,99 +548,13 @@ class VectorStore < OpenAI::BaseModel
549548
optional :metadata, OpenAI::HashOf[String], nil?: true
550549

551550
# @!parse
552-
# # @param chunking_strategy [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static]
551+
# # @param chunking_strategy [UnnamedTypeWithNoPropertyInfoOrParent1::Auto, UnnamedTypeWithNoPropertyInfoOrParent1::Static]
553552
# # @param file_ids [Array<String>]
554553
# # @param metadata [Hash{Symbol=>String}, nil]
555554
# #
556555
# def initialize(chunking_strategy: nil, file_ids: nil, metadata: nil, **) = super
557556

558557
# def initialize: (Hash | OpenAI::BaseModel) -> void
559-
560-
# @abstract
561-
#
562-
# The chunking strategy used to chunk the file(s). If not set, will use the `auto`
563-
# strategy.
564-
class ChunkingStrategy < OpenAI::Union
565-
discriminator :type
566-
567-
# The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
568-
variant :auto,
569-
-> { OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto }
570-
571-
variant :static,
572-
-> { OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static }
573-
574-
class Auto < OpenAI::BaseModel
575-
# @!attribute type
576-
# Always `auto`.
577-
#
578-
# @return [Symbol, :auto]
579-
required :type, const: :auto
580-
581-
# @!parse
582-
# # The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
583-
# # `800` and `chunk_overlap_tokens` of `400`.
584-
# #
585-
# # @param type [Symbol, :auto]
586-
# #
587-
# def initialize(type: :auto, **) = super
588-
589-
# def initialize: (Hash | OpenAI::BaseModel) -> void
590-
end
591-
592-
class Static < OpenAI::BaseModel
593-
# @!attribute static
594-
#
595-
# @return [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static]
596-
required :static,
597-
-> { OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static }
598-
599-
# @!attribute type
600-
# Always `static`.
601-
#
602-
# @return [Symbol, :static]
603-
required :type, const: :static
604-
605-
# @!parse
606-
# # @param static [OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static]
607-
# # @param type [Symbol, :static]
608-
# #
609-
# def initialize(static:, type: :static, **) = super
610-
611-
# def initialize: (Hash | OpenAI::BaseModel) -> void
612-
613-
class Static < OpenAI::BaseModel
614-
# @!attribute chunk_overlap_tokens
615-
# The number of tokens that overlap between chunks. The default value is `400`.
616-
#
617-
# Note that the overlap must not exceed half of `max_chunk_size_tokens`.
618-
#
619-
# @return [Integer]
620-
required :chunk_overlap_tokens, Integer
621-
622-
# @!attribute max_chunk_size_tokens
623-
# The maximum number of tokens in each chunk. The default value is `800`. The
624-
# minimum value is `100` and the maximum value is `4096`.
625-
#
626-
# @return [Integer]
627-
required :max_chunk_size_tokens, Integer
628-
629-
# @!parse
630-
# # @param chunk_overlap_tokens [Integer]
631-
# # @param max_chunk_size_tokens [Integer]
632-
# #
633-
# def initialize(chunk_overlap_tokens:, max_chunk_size_tokens:, **) = super
634-
635-
# def initialize: (Hash | OpenAI::BaseModel) -> void
636-
end
637-
end
638-
639-
# @!parse
640-
# class << self
641-
# # @return [Array(OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static)]
642-
# def variants; end
643-
# end
644-
end
645558
end
646559
end
647560
end

0 commit comments

Comments
 (0)