@librechat/agents-types 2.3.93 → 2.3.94
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.
- package/package.json +2 -2
- package/run.ts +23 -4
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@librechat/agents-types",
|
3
|
-
"version": "2.3.
|
3
|
+
"version": "2.3.94",
|
4
4
|
"description": "Type definitions for @librechat/agents",
|
5
5
|
"types": "index.d.ts",
|
6
6
|
"scripts": {
|
@@ -9,4 +9,4 @@
|
|
9
9
|
"peerDependencies": {
|
10
10
|
"@librechat/agents": "^1.5.3"
|
11
11
|
}
|
12
|
-
}
|
12
|
+
}
|
package/run.ts
CHANGED
@@ -2,8 +2,13 @@
|
|
2
2
|
import type * as z from 'zod';
|
3
3
|
import type { BaseMessage } from '@langchain/core/messages';
|
4
4
|
import type { StructuredTool } from '@langchain/core/tools';
|
5
|
-
import type {
|
5
|
+
import type { RunnableConfig } from '@langchain/core/runnables';
|
6
|
+
import type {
|
7
|
+
BaseCallbackHandler,
|
8
|
+
CallbackHandlerMethods,
|
9
|
+
} from '@langchain/core/callbacks/base';
|
6
10
|
import type * as graph from '@/graphs/Graph';
|
11
|
+
import type * as s from '@/types/stream';
|
7
12
|
import type * as e from '@/common/enum';
|
8
13
|
import type * as g from '@/types/graph';
|
9
14
|
import type * as l from '@/types/llm';
|
@@ -19,6 +24,15 @@ export type BaseGraphConfig = {
|
|
19
24
|
export type StandardGraphConfig = BaseGraphConfig &
|
20
25
|
Omit<g.StandardGraphInput, 'provider' | 'clientOptions'>;
|
21
26
|
|
27
|
+
export type RunTitleOptions = {
|
28
|
+
inputText: string;
|
29
|
+
contentParts: (s.MessageContentComplex | undefined)[];
|
30
|
+
titlePrompt?: string;
|
31
|
+
skipLanguage?: boolean;
|
32
|
+
clientOptions?: l.ClientOptions;
|
33
|
+
chainOptions?: Partial<RunnableConfig> | undefined;
|
34
|
+
};
|
35
|
+
|
22
36
|
export interface AgentStateChannels {
|
23
37
|
messages: BaseMessage[];
|
24
38
|
next: string;
|
@@ -48,12 +62,17 @@ export type TaskManagerGraphConfig = {
|
|
48
62
|
|
49
63
|
export type RunConfig = {
|
50
64
|
runId: string;
|
51
|
-
graphConfig:
|
65
|
+
graphConfig:
|
66
|
+
| StandardGraphConfig
|
67
|
+
| CollaborativeGraphConfig
|
68
|
+
| TaskManagerGraphConfig;
|
52
69
|
customHandlers?: Record<string, g.EventHandler>;
|
53
70
|
returnContent?: boolean;
|
54
71
|
};
|
55
72
|
|
56
|
-
export type ProvidedCallbacks =
|
73
|
+
export type ProvidedCallbacks =
|
74
|
+
| (BaseCallbackHandler | CallbackHandlerMethods)[]
|
75
|
+
| undefined;
|
57
76
|
|
58
77
|
export type TokenCounter = (message: BaseMessage) => number;
|
59
78
|
export type EventStreamOptions = {
|
@@ -63,4 +82,4 @@ export type EventStreamOptions = {
|
|
63
82
|
maxContextTokens?: number;
|
64
83
|
tokenCounter?: TokenCounter;
|
65
84
|
indexTokenCountMap?: Record<string, number>;
|
66
|
-
}
|
85
|
+
};
|