From 560e451f297cbb86d5c0d2ace86b010d64cc20c3 Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Thu, 5 Dec 2024 11:11:17 -0800 Subject: [PATCH] release(core): 0.3.21 (#7323) --- langchain-core/package.json | 2 +- langchain-core/src/runnables/tests/runnable_map.test.ts | 4 ++++ .../src/singletons/tests/async_local_storage.test.ts | 7 ++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/langchain-core/package.json b/langchain-core/package.json index 32ee93327373..d373aebb29f6 100644 --- a/langchain-core/package.json +++ b/langchain-core/package.json @@ -1,6 +1,6 @@ { "name": "@langchain/core", - "version": "0.3.20", + "version": "0.3.21", "description": "Core LangChain.js abstractions and schemas", "type": "module", "engines": { diff --git a/langchain-core/src/runnables/tests/runnable_map.test.ts b/langchain-core/src/runnables/tests/runnable_map.test.ts index ffb41ab4e527..d2aa90093f58 100644 --- a/langchain-core/src/runnables/tests/runnable_map.test.ts +++ b/langchain-core/src/runnables/tests/runnable_map.test.ts @@ -131,6 +131,10 @@ test("Should stream chunks from each step as they are produced", async () => { const chunks = []; for await (const chunk of stream) { + if (chunk.chat?.id !== undefined) { + chunk.chat.id = expect.any(String) as any; + chunk.chat.lc_kwargs.id = expect.any(String); + } chunks.push(chunk); } diff --git a/langchain-core/src/singletons/tests/async_local_storage.test.ts b/langchain-core/src/singletons/tests/async_local_storage.test.ts index 4cb5a2ea77f9..1be3b273ed06 100644 --- a/langchain-core/src/singletons/tests/async_local_storage.test.ts +++ b/langchain-core/src/singletons/tests/async_local_storage.test.ts @@ -155,7 +155,12 @@ test("Runnable streamEvents method with streaming nested in a RunnableLambda", a const nestedLambdaWithOverriddenCallbacks = RunnableLambda.from( async (_: string, config) => { - expect(config?.callbacks?.handlers).toEqual([]); + expect( + config?.callbacks?.handlers.filter( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (handler: any) => handler.name !== "langchain_tracer" + ) + ).toEqual([]); } ); await nestedLambdaWithOverriddenCallbacks.invoke(input, {