class LittleGhost::Providers::OpenAI

OpenAI connects LittleGhost features to OpenAI models for generation and embeddings. Generation uses the Responses API by default and supports streaming, Tools, and structured results.

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.