Class: AI::Engine::OpenAI::Assistants::Create

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

Class Method Summary collapse

Class Method Details

.call(parameters) ⇒ Object

Creates a new Assistant on the OpenAI API. Returns the OpenAI ID of the new Assistant.



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

def self.call(parameters)
  response = client.assistants.create(
    parameters: parameters
  )

  response["id"]
end