Sha256: 36e8135f7d370b32329d1c9dd1043ab120531684ff01561a6e171fb23ff4158e

Contents?: true

Size: 506 Bytes

Versions: 5

Compression:

Stored size: 506 Bytes

Contents

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

    def list(parameters: {})
      @client.get(path: "/batches", parameters: parameters)
    end

    def retrieve(id:)
      @client.get(path: "/batches/#{id}")
    end

    def create(parameters: {})
      @client.json_post(path: "/batches", parameters: parameters)
    end

    def cancel(id:)
      @client.post(path: "/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/batches.rb
ruby-openai-7.3.1 lib/openai/batches.rb
ruby-openai-7.3.0 lib/openai/batches.rb
ruby-openai-7.2.0 lib/openai/batches.rb
ruby-openai-7.1.0 lib/openai/batches.rb