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
* merge two typescript headings into one
* move note about vendored deps to CONTRIBUTING docs
* add a troubleshooting section to README
first item: Next.js noStore
Copy file name to clipboardExpand all lines: README.md
+12-22
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,8 @@ export async function POST(request) {
197
197
198
198
## TypeScript
199
199
200
+
The `Replicate` constructor and all `replicate.*` methods are fully typed.
201
+
200
202
Currently in order to support the module format used by `replicate` you'll need to set `esModuleInterop` to `true` in your tsconfig.json.
201
203
202
204
## API
@@ -1020,29 +1022,17 @@ The `replicate.request()` method is used by the other methods
1020
1022
to interact with the Replicate API.
1021
1023
You can call this method directly to make other requests to the API.
1022
1024
1023
-
## TypeScript
1024
-
1025
-
The `Replicate` constructor and all `replicate.*` methods are fully typed.
1025
+
## Troubleshooting
1026
1026
1027
-
##Vendored Dependencies
1027
+
### Predictions hanging in Next.js
1028
1028
1029
-
We have a few dependencies that have been bundled into the vendor directory rather than adding external npm dependencies.
1029
+
Next.js App Router adds some extensions to `fetch` to make it cache responses. To disable this behavior, set the `cache` option to `"no-store"` on the Replicate client's fetch object:
1030
1030
1031
-
These have been generated using bundlejs.com and copied into the appropriate directory along with the license and repository information.
> + this[decTransform] = new TransformStream(new TextDecodeTransformer(decoder));
1047
-
> }
1048
-
> ```
1038
+
Alternatively you can use Next.js [`noStore`](https://github.com/replicate/replicate-javascript/issues/136#issuecomment-1847442879) to opt out of caching for your component.
0 commit comments