Sha256: 7a121084fd0e3ff628a6f74cedfaaea00533fb9070a5493f54d7a67631cbff0f

Contents?: true

Size: 568 Bytes

Versions: 4

Compression:

Stored size: 568 Bytes

Contents

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

    def list
      @client.get(path: "/assistants")
    end

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

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

    def modify(id:, parameters: {})
      @client.json_post(path: "/assistants/#{id}", parameters: parameters)
    end

    def delete(id:)
      @client.delete(path: "/assistants/#{id}")
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
ruby-openai-7.0.0 lib/openai/assistants.rb
ruby-openai-transitory-v2-6.5.3 lib/openai/assistants.rb
ruby-openai-transitory-v2-6.5.2 lib/openai/assistants.rb
ruby-openai-transitory-v2-6.5.1 lib/openai/assistants.rb