Sha256: 552e19685223d6d02e3d5df466b3cb61b05708f36ca6fc58aab1546dd63578e2

Contents?: true

Size: 810 Bytes

Versions: 5

Compression:

Stored size: 810 Bytes

Contents

module OpenAI
  class VectorStoreFileBatches
    def initialize(client:)
      @client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
    end

    def list(vector_store_id:, id:, parameters: {})
      @client.get(
        path: "/vector_stores/#{vector_store_id}/file_batches/#{id}/files",
        parameters: parameters
      )
    end

    def retrieve(vector_store_id:, id:)
      @client.get(path: "/vector_stores/#{vector_store_id}/file_batches/#{id}")
    end

    def create(vector_store_id:, parameters: {})
      @client.json_post(
        path: "/vector_stores/#{vector_store_id}/file_batches",
        parameters: parameters
      )
    end

    def cancel(vector_store_id:, id:)
      @client.post(path: "/vector_stores/#{vector_store_id}/file_batches/#{id}/cancel")
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
es_cli-0.1.0 vendor/bundle/ruby/3.1.0/gems/ruby-openai-7.3.1/lib/openai/vector_store_file_batches.rb
ruby-openai-7.3.1 lib/openai/vector_store_file_batches.rb
ruby-openai-7.3.0 lib/openai/vector_store_file_batches.rb
ruby-openai-7.2.0 lib/openai/vector_store_file_batches.rb
ruby-openai-7.1.0 lib/openai/vector_store_file_batches.rb