struct AI::OpenAI::ProviderSettings

Overview

Provider settings.

Defined in:

ai/openai/openai_provider.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(base_url : String | Nil = nil, api_key : String | Nil = nil, organization : String | Nil = nil, project : String | Nil = nil, headers : Hash(String, String) | Nil = nil, name : String | Nil = nil) #

[View source]

Instance Method Detail

def api_key : String | Nil #

API key (defaults to OPENAI_API_KEY env var).


[View source]
def base_url : String | Nil #

Base URL for API calls.


[View source]
def headers : Hash(String, String) | Nil #

Custom headers.


[View source]
def name : String | Nil #

Custom provider name.


[View source]
def organization : String | Nil #

OpenAI Organization.


[View source]
def project : String | Nil #

OpenAI Project.


[View source]