Class: AI::Engine::OpenAI::Runs::Create

Inherits:
Object
  • Object
show all
Defined in:
app/services/ai/engine/openai/runs/create.rb

Class Method Summary collapse

Class Method Details

.call(assistant_id:, thread_id:, stream: false) ⇒ Object

Creates a new Run on the OpenAI API.



3
4
5
6
7
8
9
10
11
# File 'app/services/ai/engine/openai/runs/create.rb', line 3

def self.call(assistant_id:, thread_id:, stream: false)
  client.runs.create(
    thread_id: thread_id,
    parameters: {
      assistant_id: assistant_id,
      stream: stream
    }
  )
end