Skip to content

Commit 948543a

Browse files
authored
Document constructor fetch option (#59)
1 parent 9d6c4a0 commit 948543a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ console.log(prediction.output)
6565
const replicate = new Replicate(options);
6666
```
6767

68-
| name | type | description |
69-
| ------------------- | ------ | --------------------------------------------------------------------------------- |
70-
| `options.auth` | string | **Required**. API access token |
71-
| `options.userAgent` | string | Identifier of your app. Defaults to `replicate-javascript/${packageJSON.version}` |
72-
| `options.baseUrl` | string | Defaults to https://api.replicate.com/v1 |
68+
| name | type | description |
69+
| ------------------- | -------- | --------------------------------------------------------------------------------- |
70+
| `options.auth` | string | **Required**. API access token |
71+
| `options.userAgent` | string | Identifier of your app. Defaults to `replicate-javascript/${packageJSON.version}` |
72+
| `options.baseUrl` | string | Defaults to https://api.replicate.com/v1 |
73+
| `options.fetch` | function | Fetch function to use. Defaults to `globalThis.fetch` |
7374

7475
### `replicate.models.get`
7576

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Replicate {
3030
* @param {string} options.auth - Required. API access token
3131
* @param {string} options.userAgent - Identifier of your app
3232
* @param {string} [options.baseUrl] - Defaults to https://api.replicate.com/v1
33-
* @param {Function} [options.fetch] - Defaults to native fetch
33+
* @param {Function} [options.fetch] - Fetch function to use. Defaults to `globalThis.fetch`
3434
*/
3535
constructor(options) {
3636
this.auth = options.auth;

0 commit comments

Comments
 (0)