Skip to content

Commit

Permalink
npm: fork mistralai client, override its dependency, document why, up…
Browse files Browse the repository at this point in the history
…date langchain
  • Loading branch information
haraldschilly committed Mar 17, 2024
1 parent 00834d1 commit 45d995a
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 38 deletions.
4 changes: 3 additions & 1 deletion src/packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"es5-ext@<0.10.63": "^0.10.63",
"undici@<5.28.3": "^5.28.3",
"postcss@<8.4.31": "^8.4.31",
"retry-request@<7.0.1": "^7.0.2"
"retry-request@<7.0.1": "^7.0.2",
"@langchain/core": "^0.1.48",
"@mistralai/mistralai": "@cocalc/mistralai"
}
}
}
11 changes: 11 additions & 0 deletions src/packages/package.json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Notes about package.js

## Overrides

Since we have workspaces, they must be in the root `package.json`

- `@mistralai/mistralai`
- Overrides the global `fetch` command and we fix this essentially by merging in https://github.com/mistralai/client-js/pull/42
- Remove the override and delete our fork once https://github.com/mistralai/client-js/issues/44 is fixed
- `@langchain/core`
- Pinning its version is strongly recommended: https://js.langchain.com/docs/get_started/installation#installing-integration-packages
64 changes: 35 additions & 29 deletions src/packages/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions src/packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,17 @@
"@cocalc/backend": "workspace:*",
"@cocalc/database": "workspace:*",
"@cocalc/gcloud-pricing-calculator": "^1.7.0",
"@cocalc/mistralai": "^0.0.2",
"@cocalc/server": "workspace:*",
"@cocalc/util": "workspace:*",
"@google-ai/generativelanguage": "^1.1.0",
"@google-cloud/compute": "^4.0.1",
"@google-cloud/monitoring": "^4.0.0",
"@google/generative-ai": "^0.1.3",
"@isaacs/ttlcache": "^1.2.1",
"@langchain/community": "^0.0.38",
"@langchain/core": "^0.1.46",
"@langchain/mistralai": "^0.0.13",
"@langchain/community": "^0.0.40",
"@langchain/core": "^0.1.48",
"@langchain/mistralai": "^0.0.14",
"@node-saml/passport-saml": "^4.0.4",
"@passport-js/passport-twitter": "^1.0.8",
"@passport-next/passport-google-oauth2": "^1.0.0",
Expand Down Expand Up @@ -120,10 +121,5 @@
"devDependencies": {
"@types/node": "^18.16.14",
"expect": "^26.6.2"
},
"pnpm": {
"overrides": {
"@langchain/core": "^0.1.46"
}
}
}

0 comments on commit 45d995a

Please sign in to comment.