Search by

symfony / ai-hugging-face-platform

fabpot

HuggingFace platform bridge for Symfony AI

Package info

github.com/symfony/ai-hugging-face-platform

Type:symfony-ai-platform

pkg:composer/symfony/ai-hugging-face-platform

Statistics

Installs: 13 286

Dependents: 3

Suggesters: 2

Stars: 4

v0.15.0 2026-10-22 23:44 UTC

This package is auto-updated.

Last update: 2026-10-23 07:54:34 UTC


README

Hugging Face platform bridge for Symfony AI, built on Hugging Face Inference Providers.

composer require symfony/ai-hugging-face-platform
use Symfony\AI\Platform\Bridge\HuggingFace\Factory;
use Symfony\AI\Platform\Message\Message;
use Symfony\AI\Platform\Message\MessageBag;

$platform = Factory::createPlatform('hf_your_api_key_here');

$result = $platform->invoke('openai/gpt-oss-120b', new MessageBag(Message::ofUser('Hello!')));
echo $result->asText();

See the Hugging Face documentation of Symfony AI for chat completion, tool calling, the other tasks and the model catalogs.

Hugging Face Documentation

Model Discovery

The ModelListCommand (ai:huggingface:model-list) lists models of the Hugging Face Hub, filtered by --provider, --task, --search or --warm. The ModelInfoCommand (ai:huggingface:model-info <model-name>) shows the inference providers of one model. Register both in a Symfony Console application, as in examples/huggingface/_model.php.

Resources