@langchain/langgraph 0.1.2 → 0.1.3

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.
@@ -7,7 +7,7 @@ const runnables_1 = require("@langchain/core/runnables");
7
7
  const tool_executor_js_1 = require("./tool_executor.cjs");
8
8
  const state_js_1 = require("../graph/state.cjs");
9
9
  const index_js_1 = require("../graph/index.cjs");
10
- /** @ignore */
10
+ /** @deprecated Use {@link createReactAgent} instead with tool calling. */
11
11
  function createFunctionCallingExecutor({ model, tools, }) {
12
12
  let toolExecutor;
13
13
  let toolClasses;
@@ -4,11 +4,11 @@ import { RunnableToolLike } from "@langchain/core/runnables";
4
4
  import { ToolExecutor } from "./tool_executor.js";
5
5
  import { CompiledStateGraph } from "../graph/state.js";
6
6
  import { START } from "../graph/index.js";
7
- /** @ignore */
7
+ /** @deprecated Use {@link createReactAgent} instead with tool calling. */
8
8
  export type FunctionCallingExecutorState = {
9
9
  messages: Array<BaseMessage>;
10
10
  };
11
- /** @ignore */
11
+ /** @deprecated Use {@link createReactAgent} instead with tool calling. */
12
12
  export declare function createFunctionCallingExecutor<Model extends object>({ model, tools, }: {
13
13
  model: Model;
14
14
  tools: Array<StructuredToolInterface | RunnableToolLike> | ToolExecutor;
@@ -4,7 +4,7 @@ import { RunnableLambda, } from "@langchain/core/runnables";
4
4
  import { ToolExecutor } from "./tool_executor.js";
5
5
  import { StateGraph, } from "../graph/state.js";
6
6
  import { END, START } from "../graph/index.js";
7
- /** @ignore */
7
+ /** @deprecated Use {@link createReactAgent} instead with tool calling. */
8
8
  export function createFunctionCallingExecutor({ model, tools, }) {
9
9
  let toolExecutor;
10
10
  let toolClasses;
@@ -21,7 +21,7 @@ function createReactAgent(props) {
21
21
  const { llm, tools, messageModifier, checkpointSaver, interruptBefore, interruptAfter, } = props;
22
22
  const schema = {
23
23
  messages: {
24
- value: (left, right) => left.concat(right),
24
+ value: index_js_1.messagesStateReducer,
25
25
  default: () => [],
26
26
  },
27
27
  };
@@ -1,7 +1,7 @@
1
1
  import { isAIMessage, SystemMessage, } from "@langchain/core/messages";
2
2
  import { Runnable, RunnableLambda, } from "@langchain/core/runnables";
3
3
  import { ChatPromptTemplate } from "@langchain/core/prompts";
4
- import { END, START, StateGraph } from "../graph/index.js";
4
+ import { END, messagesStateReducer, START, StateGraph, } from "../graph/index.js";
5
5
  import { ToolNode } from "./tool_node.js";
6
6
  /**
7
7
  * Creates a StateGraph agent that relies on a chat llm utilizing tool calling.
@@ -18,7 +18,7 @@ export function createReactAgent(props) {
18
18
  const { llm, tools, messageModifier, checkpointSaver, interruptBefore, interruptAfter, } = props;
19
19
  const schema = {
20
20
  messages: {
21
- value: (left, right) => left.concat(right),
21
+ value: messagesStateReducer,
22
22
  default: () => [],
23
23
  },
24
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {
@@ -32,7 +32,7 @@
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
34
  "@langchain/core": ">=0.2.20 <0.3.0",
35
- "@langchain/langgraph-checkpoint": "~0.0.2",
35
+ "@langchain/langgraph-checkpoint": "~0.0.3",
36
36
  "@langchain/langgraph-checkpoint-sqlite": "~0.0.1",
37
37
  "double-ended-queue": "^2.1.0-0",
38
38
  "uuid": "^10.0.0",
@@ -50,6 +50,7 @@
50
50
  "@jest/globals": "^29.5.0",
51
51
  "@langchain/anthropic": "^0.2.12",
52
52
  "@langchain/community": "^0.2.25",
53
+ "@langchain/core": "^0.2.29",
53
54
  "@langchain/openai": "^0.2.4",
54
55
  "@langchain/scripts": ">=0.1.2 <0.2.0",
55
56
  "@swc/core": "^1.3.90",