@getzep/zep-cloud 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ async function main() {
17
17
  shoeSize: zepFields.number("The Customer's shoe size"),
18
18
  budget: zepFields.number("The Customer's budget for shoe purchase"),
19
19
  favoriteBrand: zepFields.text("The Customer's favorite shoe brand. Just one brand, please!"),
20
- formattedPrice: zepFields.regex("The formatted price of the shoe", /\$\d+\.\d{2}/),
20
+ formattedPrice: zepFields.regex("The formatted price of the shoe", /\d+\.\d{2}/),
21
21
  };
22
22
 
23
23
  type Customer = ExtractedData<typeof customerSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getzep/zep-cloud",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "private": false,
5
5
  "repository": "https://github.com/getzep/zep-js",
6
6
  "description": "Zep: Fast, scalable building blocks for production LLM apps",
@@ -20,8 +20,8 @@
20
20
  "zod": "^3.23.8"
21
21
  },
22
22
  "peerDependencies": {
23
- "@langchain/core": "~0.1.29",
24
- "langchain": "~0.1.19"
23
+ "@langchain/core": ">=0.1.29 <0.3.0",
24
+ "langchain": ">=0.1.19 <0.3.0"
25
25
  },
26
26
  "peerDependenciesMeta": {
27
27
  "langchain": {
@@ -31,19 +31,16 @@
31
31
  "optional": true
32
32
  }
33
33
  },
34
- "resolutions": {
35
- "@langchain/core": "~0.1.29"
36
- },
37
34
  "devDependencies": {
38
35
  "@faker-js/faker": "^8.4.1",
39
- "@langchain/anthropic": "^0.1.16",
36
+ "@langchain/openai": "0.0.28",
40
37
  "@types/jest": "^29.5.12",
41
38
  "@types/node": "17.0.33",
42
39
  "@types/node-fetch": "2.6.9",
43
40
  "@types/qs": "6.9.8",
44
41
  "@types/url-join": "4.0.1",
45
42
  "jest": "^29.7.0",
46
- "langchain": "~0.1.19",
43
+ "langchain": "0.1.19",
47
44
  "nock": "^13.5.4",
48
45
  "prettier": "2.7.1",
49
46
  "ts-jest": "^29.1.4",
@@ -1,61 +0,0 @@
1
- import { ZepClient } from "../../src";
2
- import { ZepChatMessageHistory } from "../../src/langchain";
3
- import { ChatPromptTemplate, MessagesPlaceholder } from "@langchain/core/prompts";
4
- import { RunnableWithMessageHistory } from "@langchain/core/runnables";
5
- import { ConsoleCallbackHandler } from "@langchain/core/tracers/console";
6
- import { ChatAnthropic } from "@langchain/anthropic";
7
-
8
- async function main() {
9
- const sessionId = process.env.ZEP_SESSION_ID;
10
- if (!sessionId) {
11
- throw new Error("ZEP_SESSION_ID not set");
12
- }
13
-
14
- const zepClient = new ZepClient({
15
- apiKey: process.env.ZEP_API_KEY,
16
- });
17
-
18
- const prompt = ChatPromptTemplate.fromMessages([
19
- ["system", "Answer the user's question below. Be polite and helpful:"],
20
- new MessagesPlaceholder("history"),
21
- ["human", "{question}"],
22
- ]);
23
-
24
- const chain = prompt
25
- .pipe(
26
- new ChatAnthropic({
27
- temperature: 0.8,
28
- modelName: "claude-3-sonnet-20240229",
29
- })
30
- )
31
- .withConfig({
32
- callbacks: [new ConsoleCallbackHandler()],
33
- });
34
-
35
- const chainWithHistory = new RunnableWithMessageHistory({
36
- runnable: chain,
37
- getMessageHistory: (sessionId) =>
38
- new ZepChatMessageHistory({
39
- client: zepClient,
40
- sessionId: sessionId,
41
- memoryType: "perpetual",
42
- }),
43
- inputMessagesKey: "question",
44
- historyMessagesKey: "history",
45
- });
46
-
47
- const result = await chainWithHistory.invoke(
48
- {
49
- question: "What did we talk about earlier?",
50
- },
51
- {
52
- configurable: {
53
- sessionId: sessionId,
54
- },
55
- }
56
- );
57
-
58
- console.log("result", result);
59
- }
60
-
61
- main();