Skip to content

HuggingFace Provider: Text Generation #165

Description

@Kamilbenkirane

Sub-issue of #148

Scope

Add text generation via HuggingFace's OpenAI-compatible chat completions endpoint.

  • Endpoint: POST https://router.huggingface.co/v1/chat/completions
  • Protocol: Reuses existing ChatCompletionsClient (same pattern as Groq/DeepSeek)
  • Auth: Authorization: Bearer hf_XXX via HF_TOKEN
  • Streaming: SSE

Pre-requisite

Rename HUGGINGFACE_TOKEN to HF_TOKEN in src/celeste/credentials.py and .env.example to match HuggingFace's official env var.

Files

Create: src/celeste/providers/huggingface/{__init__.py, chat/}, src/celeste/modalities/text/providers/huggingface/
Modify: src/celeste/providers/__init__.py, src/celeste/modalities/text/providers/__init__.py, src/celeste/modalities/text/models.py, src/celeste/credentials.py, .env.example

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions