Skip to content

Commit d7d435a

Browse files
committed
Add support for models.search endpoint
1 parent 2fd2890 commit d7d435a

File tree

5 files changed

+327
-151
lines changed

5 files changed

+327
-151
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,18 @@ const response = await replicate.models.list();
455455
}
456456
```
457457

458+
### `replicate.models.search`
459+
460+
Search for public models on Replicate.
461+
462+
```js
463+
const response = await replicate.models.search(query);
464+
```
465+
466+
| name | type | description |
467+
| ------- | ------ | -------------------------------------- |
468+
| `query` | string | **Required**. The search query string. |
469+
458470
### `replicate.models.create`
459471

460472
Create a new public or private model.

index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ declare module "replicate" {
281281
version_id: string
282282
): Promise<ModelVersion>;
283283
};
284+
search(query: string): Promise<Page<Model>>;
284285
};
285286

286287
predictions: {

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class Replicate {
9898
list: models.versions.list.bind(this),
9999
get: models.versions.get.bind(this),
100100
},
101+
search: models.search.bind(this),
101102
};
102103

103104
this.predictions = {

0 commit comments

Comments
 (0)