class Riffer::Providers::OpenAI
OpenAI provider for GPT models.
Requires the +openai+ gem to be installed.
Constants
- WEB_SEARCH_TOOL_TYPE
Public Class Methods
Source
# File lib/riffer/providers/open_ai.rb, line 13 def initialize(**options) depends_on "openai" api_key = options.fetch(:api_key, Riffer.config.openai.api_key) @client = ::OpenAI::Client.new(api_key: api_key, **options.except(:api_key)) end
Initializes the OpenAI provider.
: (**untyped) -> void