Class: OmniAI::OpenAI::Chat
- Inherits:
-
Chat
- Object
- Chat
- OmniAI::OpenAI::Chat
show all
- Defined in:
- lib/omniai/openai/chat.rb
Overview
An OpenAI chat implementation.
Usage:
completion = OmniAI::OpenAI::Chat.process!(client: client) do |prompt|
prompt.system('You are an expert in the field of AI.')
prompt.user('What are the biggest risks of AI?')
end
completion.choice.message.content
Defined Under Namespace
Modules: Model, ResponseFormat
Constant Summary
collapse
- DEFAULT_STREAM_OPTIONS =
{ include_usage: ENV.fetch("OMNIAI_STREAM_USAGE", "on").eql?("on") }.freeze
- DEFAULT_MODEL =
Model::GPT_4_1