Skip to content

Commit

Permalink
Update replicate to version using fetch, which works outside of node (#…
Browse files Browse the repository at this point in the history
…641)

* Update replicate to version using fetch, which works outside of node

* Fix type
  • Loading branch information
nfcampos authored Apr 6, 2023
1 parent 2feb3b5 commit ba4a776
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
4 changes: 2 additions & 2 deletions langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"puppeteer": "^19.7.2",
"redis": "^4.6.4",
"release-it": "^15.10.1",
"replicate": "^0.6.0",
"replicate": "^0.9.0",
"rollup": "^3.19.1",
"sqlite3": "^5.1.4",
"srt-parser-2": "^1.2.2",
Expand All @@ -161,7 +161,7 @@
"pdfjs-dist": "^3.4.120",
"puppeteer": "^19.7.2",
"redis": "^4.6.4",
"replicate": "^0.6.0",
"replicate": "^0.9.0",
"srt-parser-2": "^1.2.2",
"typeorm": "^0.3.12"
},
Expand Down
2 changes: 1 addition & 1 deletion langchain/src/llms/replicate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class Replicate extends LLM implements ReplicateInput {
}

static async imports(): Promise<{
Replicate: typeof import("replicate").Replicate;
Replicate: typeof import("replicate").default;
}> {
try {
const { default: Replicate } = await import("replicate");
Expand Down
29 changes: 8 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5052,17 +5052,6 @@ __metadata:
languageName: node
linkType: hard

"axios@npm:^1.3.4":
version: 1.3.4
resolution: "axios@npm:1.3.4"
dependencies:
follow-redirects: ^1.15.0
form-data: ^4.0.0
proxy-from-env: ^1.1.0
checksum: 7440edefcf8498bc3cdf39de00443e8101f249972c83b739c6e880d9d669fea9486372dbe8739e88b3bf8bb1ad15f6106693f206f078f4516fe8fd47b1c3093c
languageName: node
linkType: hard

"axobject-query@npm:^3.1.1":
version: 3.1.1
resolution: "axobject-query@npm:3.1.1"
Expand Down Expand Up @@ -8703,7 +8692,7 @@ __metadata:
languageName: node
linkType: hard

"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.7, follow-redirects@npm:^1.14.8, follow-redirects@npm:^1.15.0":
"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.7, follow-redirects@npm:^1.14.8":
version: 1.15.2
resolution: "follow-redirects@npm:1.15.2"
peerDependenciesMeta:
Expand Down Expand Up @@ -11477,7 +11466,7 @@ __metadata:
puppeteer: ^19.7.2
redis: ^4.6.4
release-it: ^15.10.1
replicate: ^0.6.0
replicate: ^0.9.0
rollup: ^3.19.1
sqlite3: ^5.1.4
srt-parser-2: ^1.2.2
Expand All @@ -11504,7 +11493,7 @@ __metadata:
pdfjs-dist: ^3.4.120
puppeteer: ^19.7.2
redis: ^4.6.4
replicate: ^0.6.0
replicate: ^0.9.0
srt-parser-2: ^1.2.2
typeorm: ^0.3.12
peerDependenciesMeta:
Expand Down Expand Up @@ -14248,7 +14237,7 @@ __metadata:
languageName: node
linkType: hard

"proxy-from-env@npm:1.1.0, proxy-from-env@npm:^1.0.0, proxy-from-env@npm:^1.1.0":
"proxy-from-env@npm:1.1.0, proxy-from-env@npm:^1.0.0":
version: 1.1.0
resolution: "proxy-from-env@npm:1.1.0"
checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4
Expand Down Expand Up @@ -14994,12 +14983,10 @@ __metadata:
languageName: node
linkType: hard

"replicate@npm:^0.6.0":
version: 0.6.0
resolution: "replicate@npm:0.6.0"
dependencies:
axios: ^1.3.4
checksum: 66a9120131eb2d12f490cfb2239a198e0c0ee46ea065f5850fa7b05ea0b4927552142fb5bfb3ab27f336984fd1f0d7e4696ab06605bf31355fdfc18b53e3f072
"replicate@npm:^0.9.0":
version: 0.9.0
resolution: "replicate@npm:0.9.0"
checksum: 6fabacd71d5af1ccbf97e8bd5364003d693efbaa760c796dbddaae225109f9db3696e288115667010746c39578aa5021567d55e29b88300a67355eb6ebef8437
languageName: node
linkType: hard

Expand Down

0 comments on commit ba4a776

Please sign in to comment.