Support resourceGroupId when creating a collection (#2308)
The Hub API (
POST /api/collections) accepts an optionalresourceGroupIdto assign an organization-owned collection to a resource group, but theApiCreateCollectionPayloadtype didn’t expose it. This adds the optional field;createCollectionforwards the payload as-is, so no other change is needed.
Requested by @Kakulukian - Slack thread
Co-authored-by: moonbot[bot] <moonbot[bot]@users.noreply.github.com> Co-authored-by: Kakulukian Kakulukian@users.noreply.github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Hugging Face JS libraries
This is a collection of JS libraries to interact with the Hugging Face API, with TS types included.
mini_headeroutside Hugging FaceWe use modern features to avoid polyfills and dependencies, so the libraries will only work on modern browsers / Node.js >= 18 / Bun / Deno.
The libraries are still very young, please help us by opening issues!
Installation
From NPM
To install via NPM, you can download the libraries as needed:
Then import the libraries in your code:
From CDN or Static hosting
You can run our packages with vanilla JS, without any bundler, by using a CDN or static hosting. Using ES modules, i.e.
<script type="module">, you can import the libraries in your code:Deno
Usage examples
Get your HF access token in your account settings.
@huggingface/inference examples
@huggingface/hub examples
@huggingface/mcp-client example
There are more features of course, check each library’s README!
Formatting & testing
Building
This will generate ESM and CJS javascript files in
packages/*/dist, egpackages/inference/dist/index.mjs.