@langchain/redis
Advanced tools
Comparing version 0.0.5 to 0.1.0
@@ -1,4 +0,4 @@ | ||
import { createClient, } from "redis"; | ||
import { BaseListChatMessageHistory } from "@langchain/core/chat_history"; | ||
import { mapChatMessagesToStoredMessages, mapStoredMessagesToChatMessages, } from "@langchain/core/messages"; | ||
import { pool } from "./connections.js"; | ||
/** | ||
@@ -61,3 +61,3 @@ * Class for storing chat message history using Redis. Extends the | ||
const { sessionId, sessionTTL, config, client } = fields; | ||
this.client = (client ?? createClient(config ?? {})); | ||
this.client = (client ?? pool.getClient(config)); | ||
this.sessionId = sessionId; | ||
@@ -64,0 +64,0 @@ this.sessionTTL = sessionTTL; |
{ | ||
"name": "@langchain/redis", | ||
"version": "0.0.5", | ||
"version": "0.1.0", | ||
"description": "Sample integration for LangChain.js", | ||
@@ -17,7 +17,4 @@ "type": "module", | ||
"scripts": { | ||
"build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts", | ||
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", | ||
"build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", | ||
"build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch", | ||
"build:scripts": "yarn create-entrypoints && yarn check-tree-shaking", | ||
"build": "yarn turbo:command build:internal --filter=@langchain/redis", | ||
"build:internal": "yarn lc_build --create-entrypoints --pre --tree-shaking", | ||
"lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", | ||
@@ -27,3 +24,3 @@ "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", | ||
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm", | ||
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre", | ||
"clean": "rm -rf .turbo dist/", | ||
"prepack": "yarn build", | ||
@@ -35,6 +32,3 @@ "test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%", | ||
"format": "prettier --config .prettierrc --write \"src\"", | ||
"format:check": "prettier --config .prettierrc --check \"src\"", | ||
"move-cjs-to-dist": "yarn lc-build --config ./langchain.config.js --move-cjs-dist", | ||
"create-entrypoints": "yarn lc-build --config ./langchain.config.js --create-entrypoints", | ||
"check-tree-shaking": "yarn lc-build --config ./langchain.config.js --tree-shaking" | ||
"format:check": "prettier --config .prettierrc --check \"src\"" | ||
}, | ||
@@ -44,9 +38,12 @@ "author": "LangChain", | ||
"dependencies": { | ||
"@langchain/core": ">0.1.0 <0.3.0", | ||
"redis": "^4.6.13" | ||
}, | ||
"peerDependencies": { | ||
"@langchain/core": ">=0.2.21 <0.4.0" | ||
}, | ||
"devDependencies": { | ||
"@faker-js/faker": "^8.4.0", | ||
"@jest/globals": "^29.5.0", | ||
"@langchain/scripts": "~0.0", | ||
"@langchain/core": "workspace:*", | ||
"@langchain/scripts": ">=0.1.0 <0.2.0", | ||
"@swc/core": "^1.3.90", | ||
@@ -69,7 +66,7 @@ "@swc/jest": "^0.2.29", | ||
"prettier": "^2.8.3", | ||
"release-it": "^15.10.1", | ||
"release-it": "^17.6.0", | ||
"rollup": "^4.5.2", | ||
"ts-jest": "^29.1.0", | ||
"typescript": "<5.2.0", | ||
"uuid": "^9.0.1" | ||
"uuid": "^10.0.0" | ||
}, | ||
@@ -76,0 +73,0 @@ "publishConfig": { |
@@ -8,3 +8,3 @@ # @langchain/redis | ||
```bash npm2yarn | ||
npm install @langchain/redis | ||
npm install @langchain/redis @langchain/core | ||
``` | ||
@@ -11,0 +11,0 @@ |
Sorry, the diff of this file is not supported yet
60214
22
1432
26
+ Added@cfworker/json-schema@4.1.1(transitive)
+ Added@langchain/core@0.3.42(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedconsole-table-printer@2.12.1(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedlangsmith@0.3.12(transitive)
+ Addedsimple-wcswidth@1.0.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
- Removed@langchain/core@>0.1.0 <0.3.0
- Removed@langchain/core@0.2.36(transitive)
- Removedcommander@10.0.1(transitive)
- Removedlangsmith@0.1.68(transitive)