Class: JsonLLM::Providers::OpenAI

Inherits:
Base
  • Object
show all
Defined in:
lib/json_llm/providers/openai.rb

Overview

OpenAI provider

Direct Known Subclasses

Deepseek

Instance Method Summary collapse

Methods inherited from Base

#chat

Constructor Details

#initialize(api_key:, model:, base_url: "https://api.openai.com/v1") ⇒ OpenAI

Returns a new instance of OpenAI.



9
10
11
12
13
14
# File 'lib/json_llm/providers/openai.rb', line 9

def initialize(api_key:, model:, base_url: "https://api.openai.com/v1")
  super()
  @api_key = api_key
  @base_url = base_url
  @model = model
end