Skip to content

Add Huggingface as provider - #10

Closed
MHindermann wants to merge 3 commits into
masterfrom
huggingface
Closed

Add Huggingface as provider#10
MHindermann wants to merge 3 commits into
masterfrom
huggingface

Conversation

@MHindermann

Copy link
Copy Markdown
Member

Adds a huggingface provider (alias hf) as an OpenAIClient subclass.

  • Router by default (https://router.huggingface.co/v1); pass base_url for a dedicated
    Inference Endpoint.
  • Sends a neutral User-Agent (overridable via default_headers) — publicai and scaleway
    403-block the OpenAI SDK's default OpenAI/Python UA.
  • HF cost is left None (injected downstream by the benchmark); tokens are tracked.
  • ai_client/pricing.json is now a generated snapshot: added scripts/update_pricing.py
    to refresh it from the benchmark repo, documented as a release step in PUBLISHING.md.
  • Tests (mocked + live integration) and README/EXAMPLES/PRICING updated. Bumps to 0.4.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant