struct

Crig::Providers::HuggingFace::Client

Inherits Crig::Client::ImageGenerationClient < Crig::Client::TranscriptionClient < Crig::Client::CompletionClient < Struct < Value < Object

Constructors

from_env
Source
from_val(input : String) : self
Source
new(api_key : Crig::BearerAuth, base_url : String = HUGGINGFACE_API_BASE_URL, subprovider : SubProvider = SubProvider.hf_inference)
Source
new(api_key : String, base_url : String = HUGGINGFACE_API_BASE_URL, subprovider : SubProvider = SubProvider.hf_inference) : self
Source

Class methods

builder
Source

Instance methods

api_key
Source
base_url
Source
build_uri(path : String) : String
Source
completion_model(model : String) : CompletionModel
Source
image_generation_model(model : String) : ImageGenerationModel
Source
post_json(path : String, body : String, accept : String = "application/json") : HTTP::Client::Response
Source
subprovider
Source
transcription_model(model : String) : TranscriptionModel
Source