You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#497
## Query repos by tags
Eg for gguf model, `listModels({search: {tags: ["gguf"]}})`
For indonesian models, `listModels({search: {tags: ["id"]}})`
For models stored in the EU, `listModels({search: {tags:
["region:eu"]}})`
And so on.
## Request extra fields
The `additionalFields` param, previously only available for
`listSpaces`, is also available for `listModels` and `listDatasets`.
It's also now strongly typed.
So if you want to get the tags of the models you're listing:
```ts
for await (const model of listModels({additionalFields: ["tags"]})) {
console.log(model.tags);
}
```
## Limit the number of models requested
You can specify the number of models to fetch, eg:
```ts
for await (const model of listModels({limit: 2})) {
console.log(model.tags);
}
```
This will only fetch two models
0 commit comments