pypi huggingface-hub 0.35.2
[v0.35.2] Welcoming Z.ai as Inference Providers!

latest release: 0.35.3
13 hours ago

Full Changelog: v0.35.1...v0.35.2

New inference provider! 🔥

Z.ai is now officially an Inference Provider on the Hub. See full documentation here: https://huggingface.co/docs/inference-providers/providers/zai-org.

from huggingface_hub import InferenceClient

client = InferenceClient(provider="zai-org")
completion = client.chat.completions.create(
    model="zai-org/GLM-4.5",
    messages=[{"role": "user", "content": "What is the capital of France?"}],
)

print("\nThinking:")
print(completion.choices[0].message.reasoning_content)
print("\nOutput:")
print(completion.choices[0].message.content)
Thinking:
Okay, the user is asking about the capital of France. That's a pretty straightforward geography question. 

Hmm, I wonder if this is just a casual inquiry or if they need it for something specific like homework or travel planning. The question is very basic though, so probably just general knowledge. 

Paris is definitely the correct answer here. It's been the capital for centuries, since the Capetian dynasty made it the seat of power. Should I mention any historical context? Nah, the user didn't ask for details - just the capital. 

I recall Paris is also France's largest city and major cultural hub. But again, extra info might be overkill unless they follow up. Better keep it simple and accurate. 

The answer should be clear and direct: "Paris". No need to overcomplicate a simple fact. If they want more, they'll ask.

Output:
The capital of France is **Paris**.  

Paris has been the political and cultural center of France for centuries, serving as the seat of government, the residence of the President (Élysée Palace), and home to iconic landmarks like the Eiffel Tower, the Louvre Museum, and Notre-Dame Cathedral. It is also France's largest city and a global hub for art, fashion, gastronomy, and history.

Misc:

  • [HfFileSystem] Optimize maxdepth: do less /tree calls in glob() by @lhoestq in #3389

Don't miss a new huggingface-hub release

NewReleases is sending notifications on new releases.