class LittleGhost::Providers::OpenAI
OpenAI connects LittleGhost agents to OpenAI models with streaming, tools, and structured results. It uses the Responses API by default.
provider = LittleGhost::Providers::OpenAI.new( api_key: ENV.fetch("OPENAI_API_KEY"), model: ENV.fetch("OPENAI_MODEL") )
Supply api: :chat_completions only when a model or integration requires the Chat Completions wire API.
Constants
- DEFAULT_BASE_URL
-
The
OpenAIAPI endpoint used whenbase_urlis omitted.
Public Class Methods
# File lib/little_ghost/providers/openai.rb, line 22 def initialize(base_url: DEFAULT_BASE_URL, **arguments) super end
Uses the official OpenAI API base URL by default.
Calls superclass method