Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosen langchain peer requirements #97

Merged
merged 19 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bf6d2e6
chore: Bump version
paul-paliychuk May 22, 2024
308420b
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk May 28, 2024
4efbd4d
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Jun 5, 2024
af27b3d
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Jun 11, 2024
34d1b3a
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Jun 17, 2024
b4aa68e
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Jun 19, 2024
ae77a5c
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Jul 2, 2024
8c4e503
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Jul 18, 2024
e1e0067
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Jul 22, 2024
a0e9dd0
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Jul 25, 2024
ad63c0a
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Sep 20, 2024
9ff23b1
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Sep 24, 2024
7b4c1da
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Sep 24, 2024
6d69b3a
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Sep 24, 2024
885d299
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Sep 24, 2024
1dd5159
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Sep 29, 2024
b61e8a5
Merge branch 'main' of github.com:getzep/zep-js
paul-paliychuk Oct 4, 2024
0ff9aa0
chore: Loosen langchain peer dependency, use relevantFacts when compo…
paul-paliychuk Oct 4, 2024
925ba9c
fix: build
paul-paliychuk Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@getzep/zep-cloud",
"version": "1.0.11",
"version": "1.0.12",
"private": false,
"repository": "https://github.com/getzep/zep-js",
"description": "Zep: Fast, scalable building blocks for production LLM apps",
Expand All @@ -20,8 +20,8 @@
"zod": "^3.23.8"
},
"peerDependencies": {
"@langchain/core": ">=0.1.29 <0.3.0",
"langchain": ">=0.1.19 <0.3.0"
"@langchain/core": ">=0.1.29 <0.4.0",
"langchain": ">=0.1.19 <0.4.0"
},
"peerDependenciesMeta": {
"langchain": {
Expand All @@ -33,14 +33,14 @@
},
"devDependencies": {
"@faker-js/faker": "^8.4.1",
"@langchain/openai": "0.0.28",
"@types/jest": "^29.5.12",
"@types/node": "17.0.33",
"@types/node-fetch": "2.6.9",
"@types/qs": "6.9.8",
"@types/url-join": "4.0.1",
"jest": "^29.7.0",
"langchain": "0.1.19",
"@langchain/openai": "0.0.28",
"nock": "^13.5.4",
"prettier": "2.7.1",
"ts-jest": "^29.1.4",
Expand Down
5 changes: 3 additions & 2 deletions src/langchain/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ export const getZepMessageRoleType = (role: MessageType): RoleType => {
export const condenseZepMemoryIntoHumanMessage = (memory: Memory) => {
let systemPrompt = "";

if (memory.facts) {
systemPrompt += memory.facts.join("\n");
if (memory.relevantFacts) {
const relevantFactStrings: string[] = memory.relevantFacts.map(({fact}) => fact).filter(x => !!x) as string[];
systemPrompt += relevantFactStrings.join("\n");
}

// Extract summary, if present, and messages
Expand Down
124 changes: 41 additions & 83 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -591,24 +591,23 @@
zod-to-json-schema "^3.22.5"

"@langchain/core@>0.1.56 <0.3.0":
version "0.2.18"
resolved "https://registry.yarnpkg.com/@langchain/core/-/core-0.2.18.tgz#1ac4f307fa217ab3555c9634147a6c4ad9826092"
integrity sha512-ru542BwNcsnDfjTeDbIkFIchwa54ctHZR+kVrC8U9NPS9/36iM8p8ruprOV7Zccj/oxtLE5UpEhV+9MZhVcFlA==
version "0.2.34"
resolved "https://registry.yarnpkg.com/@langchain/core/-/core-0.2.34.tgz#9a6c11e55f88d259c43d08a0add953ff4cb94556"
integrity sha512-Hkveq1UcOjUj1DVn5erbqElyRj1t04NORSuSIZAJCtPO7EDkIqomjAarJ5+I5NUpQeIONgbOdnY9TkJ6cKUSVA==
dependencies:
ansi-styles "^5.0.0"
camelcase "6"
decamelize "1.2.0"
js-tiktoken "^1.0.12"
langsmith "~0.1.39"
ml-distance "^4.0.0"
langsmith "^0.1.56-rc.1"
mustache "^4.2.0"
p-queue "^6.6.2"
p-retry "4"
uuid "^10.0.0"
zod "^3.22.4"
zod-to-json-schema "^3.22.3"

"@langchain/core@~0.1.29", "@langchain/core@~0.1.60":
"@langchain/core@~0.1.29", "@langchain/core@~0.1.56", "@langchain/core@~0.1.60":
version "0.1.63"
resolved "https://registry.yarnpkg.com/@langchain/core/-/core-0.1.63.tgz#33cc48877739e9fdb5885fbd4b16fd08d1597050"
integrity sha512-+fjyYi8wy6x1P+Ee1RWfIIEyxd9Ee9jksEwvrggPwwI/p45kIDTdYTblXsM13y4mNWTiACyLSdbwnPaxxdoz+w==
Expand All @@ -626,24 +625,6 @@
zod "^3.22.4"
zod-to-json-schema "^3.22.3"

"@langchain/core@~0.1.56":
version "0.1.61"
resolved "https://registry.yarnpkg.com/@langchain/core/-/core-0.1.61.tgz#9313363e04f1c6981a938b2909c44ce6fceb2736"
integrity sha512-C8OkAly+ugvXsL8TACCmFv9WTTcT4gvQaG6NbrXCOzibBCywfxxcTqEMOyg3zIKpxHEmR0DHqh0OiJRHocnsCg==
dependencies:
ansi-styles "^5.0.0"
camelcase "6"
decamelize "1.2.0"
js-tiktoken "^1.0.8"
langsmith "~0.1.7"
ml-distance "^4.0.0"
mustache "^4.2.0"
p-queue "^6.6.2"
p-retry "4"
uuid "^9.0.0"
zod "^3.22.4"
zod-to-json-schema "^3.22.3"

"@langchain/[email protected]":
version "0.0.28"
resolved "https://registry.yarnpkg.com/@langchain/openai/-/openai-0.0.28.tgz#afaeec61b44816935db9ae937496c964c81ab571"
Expand Down Expand Up @@ -801,9 +782,9 @@
integrity sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ==

"@types/node@^18.11.18":
version "18.19.31"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.31.tgz#b7d4a00f7cb826b60a543cebdbda5d189aaecdcd"
integrity sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==
version "18.19.54"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.54.tgz#f1048dc083f81b242640f04f18fb3e4ccf13fcdb"
integrity sha512-+BRgt0G5gYjTvdLac9sIeE0iZcJxi4Jc4PV5EUzqi+88jmQLr+fRZdv2tCTV7IHKSGxM6SaLoOXQWWUiLUItMw==
dependencies:
undici-types "~5.26.4"

Expand All @@ -827,10 +808,10 @@
resolved "https://registry.yarnpkg.com/@types/url-join/-/url-join-4.0.1.tgz#4989c97f969464647a8586c7252d97b449cdc045"
integrity sha512-wDXw9LEEUHyV+7UWy7U315nrJGJ7p1BzaCxDpEoLr789Dk1WDVMMlf3iBfbG2F8NdWnYyFbtTxUn2ZNbm1Q4LQ==

"@types/uuid@^9.0.1":
version "9.0.8"
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.8.tgz#7545ba4fc3c003d6c756f651f3bf163d8f0f29ba"
integrity sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==
"@types/uuid@^10.0.0":
version "10.0.0"
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-10.0.0.tgz#e9c07fe50da0f53dc24970cca94d619ff03f6f6d"
integrity sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==

"@types/yargs-parser@*":
version "21.0.3"
Expand Down Expand Up @@ -2047,16 +2028,9 @@ jest@^29.7.0:
jest-cli "^29.7.0"

js-tiktoken@^1.0.12, js-tiktoken@^1.0.7:
version "1.0.12"
resolved "https://registry.yarnpkg.com/js-tiktoken/-/js-tiktoken-1.0.12.tgz#af0f5cf58e5e7318240d050c8413234019424211"
integrity sha512-L7wURW1fH9Qaext0VzaUDpFGVQgjkdE3Dgsy9/+yXyGEpBKnylTd0mU0bfbNkKDlXRb6TEsZkwuflu1B8uQbJQ==
dependencies:
base64-js "^1.5.1"

js-tiktoken@^1.0.8:
version "1.0.11"
resolved "https://registry.yarnpkg.com/js-tiktoken/-/js-tiktoken-1.0.11.tgz#d7d707b849f703841112660d9d55169424a35344"
integrity sha512-PajXFLq2vx7/8jllQZ43vzNpAai/0MOVdJjW/UrNyJorNQRTjHrqdGJG/mjHVy7h9M6dW6CaG43eNLMYFkTh6w==
version "1.0.15"
resolved "https://registry.yarnpkg.com/js-tiktoken/-/js-tiktoken-1.0.15.tgz#92a7d829f6950c2cfb35cc52555502e3d6e2ebac"
integrity sha512-65ruOWWXDEZHHbAo7EjOcNxOGasQKbL4Fq3jEr2xsCqSsoOo6VVSqzWQb6PRIqypFSDcma4jO90YP0w5X8qVXQ==
dependencies:
base64-js "^1.5.1"

Expand Down Expand Up @@ -2135,31 +2109,21 @@ [email protected]:
zod-to-json-schema "^3.22.3"

langchainhub@~0.0.8:
version "0.0.10"
resolved "https://registry.yarnpkg.com/langchainhub/-/langchainhub-0.0.10.tgz#7579440a3255d67571b7046f3910593c5664f064"
integrity sha512-mOVso7TGTMSlvTTUR1b4zUIMtu8zgie/pcwRm1SeooWwuHYMQovoNXjT6gEjvWEZ6cjt4gVH+1lu2tp1/phyIQ==

langsmith@~0.1.1, langsmith@~0.1.39:
version "0.1.39"
resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.39.tgz#cc99f1828a9c0f5ba24bec6b0121edc44e8d282d"
integrity sha512-K2/qbc96JhrZbSL74RbZ0DBOpTB9Mxicu8RQrZ88Xsp1bH2O3+y5EdcvC0g/1YzQWQhcQ4peknCA24c3VTNiNA==
dependencies:
"@types/uuid" "^9.0.1"
commander "^10.0.1"
p-queue "^6.6.2"
p-retry "4"
uuid "^9.0.0"
version "0.0.11"
resolved "https://registry.yarnpkg.com/langchainhub/-/langchainhub-0.0.11.tgz#2ce22def9c84699dcbd4fd4b78270d34bd2a9ae9"
integrity sha512-WnKI4g9kU2bHQP136orXr2bcRdgz9iiTBpTN0jWt9IlScUKnJBoD0aa2HOzHURQKeQDnt2JwqVmQ6Depf5uDLQ==

langsmith@~0.1.7:
version "0.1.22"
resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.22.tgz#0e69fde055799a2c2dbf6f4798abe3465b62d324"
integrity sha512-N9t9Cf1/F8DJweFMLi8Y7521gS17Cj6aqIuDQMYSnMqhOlPa8eKDo9dNcstcIax6C12XQi039/D/0tiMTS/INg==
langsmith@^0.1.56-rc.1, langsmith@~0.1.1, langsmith@~0.1.7:
version "0.1.61"
resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.61.tgz#4c3d2677fe79d9f936198918c3af6c48e54f79d7"
integrity sha512-XQE4KPScwPmdaT0mWDzhNxj9gvqXUR+C7urLA0QFi27XeoQdm17eYpudenn4wxC0gIyUJutQCyuYJpfwlT5JnQ==
dependencies:
"@types/uuid" "^9.0.1"
"@types/uuid" "^10.0.0"
commander "^10.0.1"
p-queue "^6.6.2"
p-retry "4"
uuid "^9.0.0"
semver "^7.6.3"
uuid "^10.0.0"

leven@^3.1.0:
version "3.1.0"
Expand Down Expand Up @@ -2379,9 +2343,9 @@ onetime@^5.1.2:
mimic-fn "^2.1.0"

openai@^4.32.1, openai@^4.41.1:
version "4.52.7"
resolved "https://registry.yarnpkg.com/openai/-/openai-4.52.7.tgz#e32b000142287a9e8eda8512ba28df33d11ec1f1"
integrity sha512-dgxA6UZHary6NXUHEDj5TWt8ogv0+ibH+b4pT5RrWMjiRZVylNwLcw/2ubDrX5n0oUmHX/ZgudMJeemxzOvz7A==
version "4.67.1"
resolved "https://registry.yarnpkg.com/openai/-/openai-4.67.1.tgz#ed07c40bf24c5f4108dfb662de1471f0c75e890d"
integrity sha512-2YbRFy6qaYRJabK2zLMn4txrB2xBy0KP5g/eoqeSPTT31mIJMnkT75toagvfE555IKa2RdrzJrZwdDsUipsAMw==
dependencies:
"@types/node" "^18.11.18"
"@types/node-fetch" "^2.6.4"
Expand All @@ -2390,7 +2354,6 @@ openai@^4.32.1, openai@^4.41.1:
form-data-encoder "1.7.2"
formdata-node "^4.3.2"
node-fetch "^2.6.7"
web-streams-polyfill "^3.2.1"

openapi-types@^12.1.3:
version "12.1.3"
Expand Down Expand Up @@ -2593,6 +2556,11 @@ semver@^7.5.3, semver@^7.5.4:
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13"
integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==

semver@^7.6.3:
version "7.6.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==

set-function-length@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449"
Expand Down Expand Up @@ -2923,9 +2891,9 @@ yallist@^3.0.2:
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==

yaml@^2.2.1:
version "2.4.2"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.2.tgz#7a2b30f2243a5fc299e1f14ca58d475ed4bc5362"
integrity sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==
version "2.5.1"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.1.tgz#c9772aacf62cb7494a95b0c4f1fb065b563db130"
integrity sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==

yargs-parser@^21.0.1, yargs-parser@^21.1.1:
version "21.1.1"
Expand Down Expand Up @@ -2955,22 +2923,12 @@ yocto-queue@^0.1.0:
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

zod-to-json-schema@^3.22.3:
version "3.23.0"
resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.0.tgz#4fc60e88d3c709eedbfaae3f92f8a7bf786469f2"
integrity sha512-az0uJ243PxsRIa2x1WmNE/pnuA05gUq/JB8Lwe1EDCCL/Fz9MgjYQ0fPlyc2Tcv6aF2ZA7WM5TWaRZVEFaAIag==
zod-to-json-schema@^3.22.3, zod-to-json-schema@^3.22.5:
version "3.23.3"
resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.3.tgz#56cf4e0bd5c4096ab46e63159e20998ec7b19c39"
integrity sha512-TYWChTxKQbRJp5ST22o/Irt9KC5nj7CdBKYB/AosCRdj/wxEMvv4NNaj9XVUHDOIp53ZxArGhnw5HMZziPFjog==

zod-to-json-schema@^3.22.5:
version "3.23.1"
resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.1.tgz#5225925b8ed5fa20096bd99be076c4b29b53d309"
integrity sha512-oT9INvydob1XV0v1d2IadrR74rLtDInLvDFfAa1CG0Pmg/vxATk7I2gSelfj271mbzeM4Da0uuDQE/Nkj3DWNw==

zod@^3.22.3, zod@^3.23.8:
zod@^3.22.3, zod@^3.22.4, zod@^3.23.8:
version "3.23.8"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d"
integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==

zod@^3.22.4:
version "3.23.5"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.5.tgz#c7b7617d017d4a2f21852f533258d26a9a5ae09f"
integrity sha512-fkwiq0VIQTksNNA131rDOsVJcns0pfVUjHzLrNBiF/O/Xxb5lQyEXkhZWcJ7npWsYlvs+h0jFWXXy4X46Em1JA==
Loading