llm-speak/hugging-face

A Laravel package for integrating HuggingFace-hosted Models into LLMSpeak

0.3.4 2025-07-15 02:09 UTC

This package is auto-updated.

Last update: 2025-09-15 02:28:51 UTC


README

use LLMSpeak\HuggingFace\Support\Facades\HuggingFace;

HuggingFace::completions() <--- HuggingFaceCompletionsAPIRepository Instance
    ->withApiKey($config['api_key']) <--- HuggingFaceCompletionsAPIRepository Instance
    ->withModel($model) <--- HuggingFaceCompletionsAPIRepository Instance
    ->withMaxTokens($max_tokens) <--- HuggingFaceCompletionsAPIRepository Instance
    ->withTools($temperature) <--- HuggingFaceCompletionsAPIRepository Instance
    ->withTemperature($temperature) <--- HuggingFaceCompletionsAPIRepository Instance
    ->withMessages($messages) <--- CompletionsEndpoint Instance
    ->handle();

HuggingFace::embeddings()
    ->withApikey(HuggingFace::api_key())
    ->withModel($model)
    ->withInputs($convo)
    ->handle();