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 # '...'
Modules: Model
{ type: "json_object" }.freeze
{ include_usage: ENV.fetch("OMNIAI_STREAM_USAGE", "on").eql?("on") }.freeze
Model::GPT_4O