Sha256: 680f2aab5f5d122c3acd63157c32ed4018d0bdcaaff8b709ddc7a934a3ff628f

Contents?: true

Size: 520 Bytes

Versions: 6

Compression:

Stored size: 520 Bytes

Contents

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

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

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

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

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

Version data entries

6 entries across 6 versions & 2 rubygems

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