Sha256: cc7005179a49aad2d37a688b9157ea50e2adf42890d7c07ea63c693c57eda249
Contents?: true
Size: 914 Bytes
Versions: 8
Compression:
Stored size: 914 Bytes
Contents
module OpenAI class Runs def initialize(client:) @client = client.beta(assistants: "v1") end def list(thread_id:) @client.get(path: "/threads/#{thread_id}/runs") end def retrieve(thread_id:, id:) @client.get(path: "/threads/#{thread_id}/runs/#{id}") end def create(thread_id:, parameters: {}) @client.json_post(path: "/threads/#{thread_id}/runs", parameters: parameters) end def modify(id:, thread_id:, parameters: {}) @client.json_post(path: "/threads/#{thread_id}/runs/#{id}", parameters: parameters) end def cancel(id:, thread_id:) @client.post(path: "/threads/#{thread_id}/runs/#{id}/cancel") end def submit_tool_outputs(thread_id:, run_id:, parameters: {}) @client.json_post(path: "/threads/#{thread_id}/runs/#{run_id}/submit_tool_outputs", parameters: parameters) end end end
Version data entries
8 entries across 8 versions & 2 rubygems