Class: OpenAI::VectorStoreFileBatches
- Inherits:
-
Object
- Object
- OpenAI::VectorStoreFileBatches
- Defined in:
- lib/openai/vector_store_file_batches.rb
Instance Method Summary collapse
- #cancel(vector_store_id:, id:) ⇒ Object
- #create(vector_store_id:, parameters: {}) ⇒ Object
-
#initialize(client:) ⇒ VectorStoreFileBatches
constructor
A new instance of VectorStoreFileBatches.
- #list(vector_store_id:, id:, parameters: {}) ⇒ Object
- #retrieve(vector_store_id:, id:) ⇒ Object
Constructor Details
#initialize(client:) ⇒ VectorStoreFileBatches
Returns a new instance of VectorStoreFileBatches.
3 4 5 |
# File 'lib/openai/vector_store_file_batches.rb', line 3 def initialize(client:) @client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION) end |
Instance Method Details
#cancel(vector_store_id:, id:) ⇒ Object
25 26 27 |
# File 'lib/openai/vector_store_file_batches.rb', line 25 def cancel(vector_store_id:, id:) @client.post(path: "/vector_stores/#{vector_store_id}/file_batches/#{id}/cancel") end |
#create(vector_store_id:, parameters: {}) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/openai/vector_store_file_batches.rb', line 18 def create(vector_store_id:, parameters: {}) @client.json_post( path: "/vector_stores/#{vector_store_id}/file_batches", parameters: parameters ) end |
#list(vector_store_id:, id:, parameters: {}) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/openai/vector_store_file_batches.rb', line 7 def list(vector_store_id:, id:, parameters: {}) @client.get( path: "/vector_stores/#{vector_store_id}/file_batches/#{id}/files", parameters: parameters ) end |
#retrieve(vector_store_id:, id:) ⇒ Object
14 15 16 |
# File 'lib/openai/vector_store_file_batches.rb', line 14 def retrieve(vector_store_id:, id:) @client.get(path: "/vector_stores/#{vector_store_id}/file_batches/#{id}") end |