TypeScript OSS: Langchain Integration (#2556)

This commit is contained in:
Saket Aryan
2025-04-15 20:08:41 +05:30
committed by GitHub
parent 9f204dc557
commit c3c9205ffa
18 changed files with 1075 additions and 55 deletions

190
mem0-ts/pnpm-lock.yaml generated
View File

@@ -13,6 +13,9 @@ importers:
"@google/genai":
specifier: ^0.7.0
version: 0.7.0(encoding@0.1.13)
"@langchain/core":
specifier: ^0.3.44
version: 0.3.44(openai@4.93.0(encoding@0.1.13)(ws@8.18.1)(zod@3.24.2))
"@mistralai/mistralai":
specifier: ^1.5.2
version: 1.5.2(zod@3.24.2)
@@ -376,6 +379,12 @@ packages:
integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==,
}
"@cfworker/json-schema@4.1.1":
resolution:
{
integrity: sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og==,
}
"@cspotcode/source-map-support@0.8.1":
resolution:
{
@@ -796,6 +805,13 @@ packages:
integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==,
}
"@langchain/core@0.3.44":
resolution:
{
integrity: sha512-3BsSFf7STvPPZyl2kMANgtVnCUvDdyP4k+koP+nY2Tczd5V+RFkuazIn/JOj/xxy/neZjr4PxFU4BFyF1aKXOA==,
}
engines: { node: ">=18" }
"@mistralai/mistralai@1.5.2":
resolution:
{
@@ -1263,6 +1279,12 @@ packages:
integrity: sha512-PIzZZlEppgrpoT2QgbnDU+MMzuR6BbCjllj0bM70lWoejMeNJAxCchxnv7J3XFkI8MpygtRpzXrIlmWUBclP5A==,
}
"@types/retry@0.12.0":
resolution:
{
integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==,
}
"@types/sqlite3@3.1.11":
resolution:
{
@@ -1275,6 +1297,12 @@ packages:
integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==,
}
"@types/uuid@10.0.0":
resolution:
{
integrity: sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==,
}
"@types/uuid@9.0.8":
resolution:
{
@@ -1812,6 +1840,12 @@ packages:
integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==,
}
console-table-printer@2.12.1:
resolution:
{
integrity: sha512-wKGOQRRvdnd89pCeH96e2Fn4wkbenSP6LMHfjfyNLMbGuHEFbMqQNuxXqd0oXG9caIOQ1FTvc5Uijp9/4jujnQ==,
}
convert-source-map@2.0.0:
resolution:
{
@@ -1857,6 +1891,13 @@ packages:
supports-color:
optional: true
decamelize@1.2.0:
resolution:
{
integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==,
}
engines: { node: ">=0.10.0" }
decompress-response@6.0.0:
resolution:
{
@@ -2091,6 +2132,12 @@ packages:
}
engines: { node: ">=6" }
eventemitter3@4.0.7:
resolution:
{
integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==,
}
execa@5.1.1:
resolution:
{
@@ -2928,6 +2975,12 @@ packages:
}
engines: { node: ">=10" }
js-tiktoken@1.0.19:
resolution:
{
integrity: sha512-XC63YQeEcS47Y53gg950xiZ4IWmkfMe4p2V9OSaBt26q+p47WHn18izuXzSclCI73B7yGqtfRsT6jcZQI0y08g==,
}
js-tokens@4.0.0:
resolution:
{
@@ -3007,6 +3060,17 @@ packages:
integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==,
}
langsmith@0.3.15:
resolution:
{
integrity: sha512-cv3ebg0Hh0gRbl72cv/uzaZ+KOdfa2mGF1s74vmB2vlNVO/Ap/O9RYaHV+tpR8nwhGZ50R3ILnTOwSwGP+XQxw==,
}
peerDependencies:
openai: "*"
peerDependenciesMeta:
openai:
optional: true
leven@3.1.0:
resolution:
{
@@ -3275,6 +3339,13 @@ packages:
integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==,
}
mustache@4.2.0:
resolution:
{
integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==,
}
hasBin: true
mz@2.7.0:
resolution:
{
@@ -3470,6 +3541,13 @@ packages:
zod:
optional: true
p-finally@1.0.0:
resolution:
{
integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==,
}
engines: { node: ">=4" }
p-limit@2.3.0:
resolution:
{
@@ -3498,6 +3576,27 @@ packages:
}
engines: { node: ">=10" }
p-queue@6.6.2:
resolution:
{
integrity: sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==,
}
engines: { node: ">=8" }
p-retry@4.6.2:
resolution:
{
integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==,
}
engines: { node: ">=8" }
p-timeout@3.2.0:
resolution:
{
integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==,
}
engines: { node: ">=8" }
p-try@2.2.0:
resolution:
{
@@ -3936,6 +4035,13 @@ packages:
}
engines: { node: ">= 4" }
retry@0.13.1:
resolution:
{
integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==,
}
engines: { node: ">= 4" }
reusify@1.1.0:
resolution:
{
@@ -4057,6 +4163,12 @@ packages:
}
engines: { node: ">=10" }
simple-wcswidth@1.0.1:
resolution:
{
integrity: sha512-xMO/8eNREtaROt7tJvWJqHBDTMFN4eiQ5I4JRMuilwfnFcV5W9u7RUkueNkdw0jPqGMX36iCywelS5yilTuOxg==,
}
sisteransi@1.0.5:
resolution:
{
@@ -4550,6 +4662,13 @@ packages:
integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==,
}
uuid@10.0.0:
resolution:
{
integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==,
}
hasBin: true
uuid@9.0.1:
resolution:
{
@@ -4957,6 +5076,8 @@ snapshots:
"@bcoe/v8-coverage@0.2.3": {}
"@cfworker/json-schema@4.1.1": {}
"@cspotcode/source-map-support@0.8.1":
dependencies:
"@jridgewell/trace-mapping": 0.3.9
@@ -5254,6 +5375,23 @@ snapshots:
"@jridgewell/resolve-uri": 3.1.2
"@jridgewell/sourcemap-codec": 1.5.0
"@langchain/core@0.3.44(openai@4.93.0(encoding@0.1.13)(ws@8.18.1)(zod@3.24.2))":
dependencies:
"@cfworker/json-schema": 4.1.1
ansi-styles: 5.2.0
camelcase: 6.3.0
decamelize: 1.2.0
js-tiktoken: 1.0.19
langsmith: 0.3.15(openai@4.93.0(encoding@0.1.13)(ws@8.18.1)(zod@3.24.2))
mustache: 4.2.0
p-queue: 6.6.2
p-retry: 4.6.2
uuid: 10.0.0
zod: 3.24.2
zod-to-json-schema: 3.24.5(zod@3.24.2)
transitivePeerDependencies:
- openai
"@mistralai/mistralai@1.5.2(zod@3.24.2)":
dependencies:
zod: 3.24.2
@@ -5511,12 +5649,16 @@ snapshots:
"@types/phoenix@1.6.6": {}
"@types/retry@0.12.0": {}
"@types/sqlite3@3.1.11":
dependencies:
"@types/node": 22.13.5
"@types/stack-utils@2.0.3": {}
"@types/uuid@10.0.0": {}
"@types/uuid@9.0.8": {}
"@types/ws@8.18.0":
@@ -5844,6 +5986,10 @@ snapshots:
console-control-strings@1.1.0:
optional: true
console-table-printer@2.12.1:
dependencies:
simple-wcswidth: 1.0.1
convert-source-map@2.0.0: {}
create-jest@29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.5.4)):
@@ -5877,6 +6023,8 @@ snapshots:
optionalDependencies:
supports-color: 5.5.0
decamelize@1.2.0: {}
decompress-response@6.0.0:
dependencies:
mimic-response: 3.1.0
@@ -6001,6 +6149,8 @@ snapshots:
event-target-shim@5.0.1: {}
eventemitter3@4.0.7: {}
execa@5.1.1:
dependencies:
cross-spawn: 7.0.6
@@ -6720,6 +6870,10 @@ snapshots:
joycon@3.1.1: {}
js-tiktoken@1.0.19:
dependencies:
base64-js: 1.5.1
js-tokens@4.0.0: {}
js-yaml@3.14.1:
@@ -6757,6 +6911,18 @@ snapshots:
kolorist@1.8.0: {}
langsmith@0.3.15(openai@4.93.0(encoding@0.1.13)(ws@8.18.1)(zod@3.24.2)):
dependencies:
"@types/uuid": 10.0.0
chalk: 4.1.2
console-table-printer: 2.12.1
p-queue: 6.6.2
p-retry: 4.6.2
semver: 7.7.1
uuid: 10.0.0
optionalDependencies:
openai: 4.93.0(encoding@0.1.13)(ws@8.18.1)(zod@3.24.2)
leven@3.1.0: {}
lilconfig@3.1.3: {}
@@ -6908,6 +7074,8 @@ snapshots:
ms@2.1.3: {}
mustache@4.2.0: {}
mz@2.7.0:
dependencies:
any-promise: 1.3.0
@@ -7042,6 +7210,8 @@ snapshots:
transitivePeerDependencies:
- encoding
p-finally@1.0.0: {}
p-limit@2.3.0:
dependencies:
p-try: 2.2.0
@@ -7059,6 +7229,20 @@ snapshots:
aggregate-error: 3.1.0
optional: true
p-queue@6.6.2:
dependencies:
eventemitter3: 4.0.7
p-timeout: 3.2.0
p-retry@4.6.2:
dependencies:
"@types/retry": 0.12.0
retry: 0.13.1
p-timeout@3.2.0:
dependencies:
p-finally: 1.0.0
p-try@2.2.0: {}
package-json-from-dist@1.0.1: {}
@@ -7297,6 +7481,8 @@ snapshots:
retry@0.12.0:
optional: true
retry@0.13.1: {}
reusify@1.1.0: {}
rimraf@3.0.2:
@@ -7376,6 +7562,8 @@ snapshots:
dependencies:
semver: 7.7.1
simple-wcswidth@1.0.1: {}
sisteransi@1.0.5: {}
slash@3.0.0: {}
@@ -7687,6 +7875,8 @@ snapshots:
util-deprecate@1.0.2: {}
uuid@10.0.0: {}
uuid@9.0.1: {}
v8-compile-cache-lib@3.0.1: {}