Skip to content

Conversation

mogith-pn
Copy link
Contributor

@mogith-pn mogith-pn commented Oct 8, 2025

Hi Team,
Added clarifai as provider for inference.
Related PR - huggingface/huggingface.js#1781

@mogith-pn mogith-pn closed this Oct 8, 2025
@mogith-pn mogith-pn reopened this Oct 8, 2025
@mogith-pn mogith-pn changed the title added clarifai as provider Add clarifai as Inference provider Oct 8, 2025
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this PR @mogith-pn! Implementation can be simplified, otherwise looks good :)

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Wauplin
Copy link
Contributor

Wauplin commented Oct 8, 2025

Could you also run make style locally and commit the changes please? It looks like you have some code quality issues (likely due to a "autoformat on save")

@mogith-pn
Copy link
Contributor Author

Thanks for the quick review @Wauplin . Addressed the comments.

@mogith-pn mogith-pn requested a review from Wauplin October 8, 2025 15:22
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ready! 🤗

Will keep it open until clarifai is integrated as staging so we can test it "for real".

@Wauplin
Copy link
Contributor

Wauplin commented Oct 20, 2025

Hi @mogith-pn, I just pushed 32baaad to fix the error you were getting. The URL / route was not set correctly (didn't catch that at first^^).

I can now run the example locally without issues:

from huggingface_hub import InferenceClient


client = InferenceClient(provider="clarifai")

completion = client.chat.completions.create(
    model="openai/gpt-oss-20b",
    messages=[{"role": "user", "content": "What is the capital of France?"}],
)

print("Reasoning:")
print(completion.choices[0].message.reasoning_content)

print("Content:")
print(completion.choices[0].message.content)
Our latest automated health check on model 'openai/gpt-oss-20b' for provider 'clarifai' did not complete successfully.  Inference call might fail.
Reasoning:
The user asks: "What is the capital of France?" The answer: Paris. Provide concise answer.
Content:
The capital of France is **Paris**.

@Wauplin
Copy link
Contributor

Wauplin commented Oct 20, 2025

(failing CI is unrelated)

@mogith-pn
Copy link
Contributor Author

Thank you so much @Wauplin !

@Wauplin
Copy link
Contributor

Wauplin commented Oct 21, 2025

Merging it now!

@Wauplin Wauplin merged commit 7bee08c into huggingface:main Oct 21, 2025
19 of 21 checks passed
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.

3 participants