struct

Crig::Providers::OpenRouter::Client

Inherits Crig::Client::TranscriptionClient < Crig::Client::AudioGenerationClient < Crig::Client::EmbeddingsClient < Crig::Client::CompletionClient < Struct < Value < Object

Constructors

from_env
Source
from_val(input : String) : self
Source
new(api_key : Crig::BearerAuth, base_url : String = OPENROUTER_API_BASE_URL, app_title : String | Nil = nil, app_url : String | Nil = nil, app_categories : Array(String) | Nil = nil)
Source
new(api_key : String, base_url : String = OPENROUTER_API_BASE_URL) : self
Source

Class methods

builder
Source

Instance methods

api_key
Source
app_categories
Source
app_title
Source
app_url
Source
base_url
Source
build_uri(path : String) : String
Source
embedding_model_with_ndims(model : String, ndims : Int32) : Crig::Providers::OpenRouter::EmbeddingModel
Source
post_json(path : String, body : String, headers : Hash(String, String) = {} of String => String) : HTTP::Client::Response
Source