replicate-javascript icon indicating copy to clipboard operation
replicate-javascript copied to clipboard

Node.js client for Replicate

Results 12 replicate-javascript issues
Sort by recently updated
recently updated
newest added

From @aron in https://github.com/replicate/replicate-javascript/pull/259#discussion_r1599131203 > We should cover what to do if your environment doesn't support `Request`, in which case you pass through the parts manually: ```js const requestData =...

The `replicate.run` method provides a nice way of running a prediction and getting its output with a single line of code: ```js const output = await replicate.run(identifier, options, progress); ```...

I'm getting a CORS error and it is because I can't go across domains from my domain to yours. Any suggestions? _Access to fetch at 'https://api.replicate.com/v1/predictions' from origin 'https://ghostwriter-ai.com' has...

The integration test for Bun fails sporadically with a timeout. Re-running usually results in a successful run. For example, here's a run that failed: https://github.com/replicate/replicate-javascript/actions/runs/8340326500/job/22824063223 And here's the retry, which...

Currently our types are hand written. They differ from the jsdoc types in the source code in that a) they're missing documentation and b) the types are often inconsistent. Rather...

The Python library currently exports a singleton instance which can be used to run a model in a two liner: ```py import replicate replicate.run(...) ``` Our JavaScript library has a...

Fixes #187 Most ecosystems are moving towards ECMAScript modules as the primary way of writing code (see [browser](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), , [TypeScript](https://www.typescriptlang.org/docs/handbook/modules/reference.html), [bun](https://bun.sh/docs/runtime/modules#module-systems), [deno](https://docs.deno.com/runtime/manual/basics/modules/) etc). Even the node docs [describe](https://nodejs.org/api/esm.html#introduction) ESM as:...

At yesterday's hackathon, a participant shared that predictions created and polled for completion using `run` would hang indefinitely, despite the Replicate dashboard showing that prediction as finishing minutes earlier. After...

It was working all well, but suddenly this error is getting thrown at every request I send: ``` Prediction failed: Input type (c10::Half) and bias type (float) should be the...

In https://github.com/replicate/replicate-javascript/issues/161#issuecomment-1816333059, a user reported the following error: > `TypeError: replicate_1.default is not a constructor` A solution was to add `"esModuleInterop": true` to the project's `tsconfig.json` file. We should either...