@langchain/langgraph-sdk 0.0.88 → 0.0.89

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.
@@ -16,15 +16,20 @@ type MessageContent = string | MessageContentComplex[];
16
16
  * Model-specific additional kwargs, which is passed back to the underlying LLM.
17
17
  */
18
18
  type MessageAdditionalKwargs = Record<string, unknown>;
19
- export type HumanMessage = {
20
- type: "human";
21
- id?: string | undefined;
19
+ type BaseMessage = {
20
+ additional_kwargs?: MessageAdditionalKwargs | undefined;
22
21
  content: MessageContent;
22
+ id?: string | undefined;
23
+ name?: string | undefined;
24
+ response_metadata?: Record<string, unknown> | undefined;
23
25
  };
24
- export type AIMessage = {
26
+ export type HumanMessage = BaseMessage & {
27
+ type: "human";
28
+ example?: boolean | undefined;
29
+ };
30
+ export type AIMessage = BaseMessage & {
25
31
  type: "ai";
26
- id?: string | undefined;
27
- content: MessageContent;
32
+ example?: boolean | undefined;
28
33
  tool_calls?: {
29
34
  name: string;
30
35
  args: {
@@ -54,18 +59,11 @@ export type AIMessage = {
54
59
  reasoning?: number | undefined;
55
60
  } | undefined;
56
61
  } | undefined;
57
- additional_kwargs?: MessageAdditionalKwargs | undefined;
58
- response_metadata?: Record<string, unknown> | undefined;
59
62
  };
60
- export type ToolMessage = {
63
+ export type ToolMessage = BaseMessage & {
61
64
  type: "tool";
62
- name?: string | undefined;
63
- id?: string | undefined;
64
- content: MessageContent;
65
65
  status?: "error" | "success" | undefined;
66
66
  tool_call_id: string;
67
- additional_kwargs?: MessageAdditionalKwargs | undefined;
68
- response_metadata?: Record<string, unknown> | undefined;
69
67
  /**
70
68
  * Artifact of the Tool execution which is not meant to be sent to the model.
71
69
  *
@@ -75,20 +73,14 @@ export type ToolMessage = {
75
73
  */
76
74
  artifact?: any;
77
75
  };
78
- export type SystemMessage = {
76
+ export type SystemMessage = BaseMessage & {
79
77
  type: "system";
80
- id?: string | undefined;
81
- content: MessageContent;
82
78
  };
83
- export type FunctionMessage = {
79
+ export type FunctionMessage = BaseMessage & {
84
80
  type: "function";
85
- id?: string | undefined;
86
- content: MessageContent;
87
81
  };
88
- export type RemoveMessage = {
82
+ export type RemoveMessage = BaseMessage & {
89
83
  type: "remove";
90
- id: string;
91
- content: MessageContent;
92
84
  };
93
85
  export type Message = HumanMessage | AIMessage | ToolMessage | SystemMessage | FunctionMessage | RemoveMessage;
94
86
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-sdk",
3
- "version": "0.0.88",
3
+ "version": "0.0.89",
4
4
  "description": "Client library for interacting with the LangGraph API",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@1.22.19",