Class: AI::Engine::OpenAI::Chats::Stream
- Inherits:
-
Object
- Object
- AI::Engine::OpenAI::Chats::Stream
- Defined in:
- app/services/ai/engine/openai/chats/stream.rb
Class Method Summary collapse
-
.call(chat_id:, stream:, model:) ⇒ Object
Gets the next message response to a set of messages.
Class Method Details
.call(chat_id:, stream:, model:) ⇒ Object
Gets the next message response to a set of messages.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/services/ai/engine/openai/chats/stream.rb', line 3 def self.call(chat_id:, stream:, model:) chat = AI::Engine::Chat.find(chat_id) client.chat( parameters: { model: model, messages: chat., stream: stream, stream_options: {include_usage: true} } ) end |