Class: OmniAI::OpenAI::Assistants
- Inherits:
-
Object
- Object
- OmniAI::OpenAI::Assistants
- Defined in:
- lib/omniai/openai/assistants.rb
Overview
An OpenAI scope for establishing assistants.
Instance Method Summary collapse
- #all(limit: nil) ⇒ Object
- #build(name: nil, description: nil, instructions: nil, model: Chat::Model, metadata: {}, tools: []) ⇒ Object
- #destroy!(id:) ⇒ Object
- #find(id:) ⇒ Object
-
#initialize(client:) ⇒ Assistants
constructor
A new instance of Assistants.
Constructor Details
#initialize(client:) ⇒ Assistants
Returns a new instance of Assistants.
8 9 10 |
# File 'lib/omniai/openai/assistants.rb', line 8 def initialize(client:) @client = client end |
Instance Method Details
#all(limit: nil) ⇒ Object
18 19 20 |
# File 'lib/omniai/openai/assistants.rb', line 18 def all(limit: nil) Assistant.all(limit:, client: @client) end |
#build(name: nil, description: nil, instructions: nil, model: Chat::Model, metadata: {}, tools: []) ⇒ Object
33 34 35 |
# File 'lib/omniai/openai/assistants.rb', line 33 def build(name: nil, description: nil, instructions: nil, model: Chat::Model, metadata: {}, tools: []) Assistant.new(name:, model:, description:, instructions:, metadata:, tools:, client: @client) end |