@librechat/agents-types 2.4.49 → 2.4.50
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 +1 -1
- package/tools.ts +17 -12
package/package.json
CHANGED
package/tools.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// src/types/tools.ts
|
2
|
-
import type {
|
3
|
-
import type {
|
2
|
+
import type { BindToolsInput } from '@langchain/core/language_models/chat_models';
|
3
|
+
import type { GoogleAIToolType } from '@langchain/google-common';
|
4
4
|
import type { ToolCall } from '@langchain/core/messages/tool';
|
5
5
|
import type { ToolErrorData } from './stream';
|
6
6
|
import { EnvVar } from '@/common';
|
@@ -13,9 +13,9 @@ export type CustomToolCall = {
|
|
13
13
|
id?: string;
|
14
14
|
type?: 'tool_call';
|
15
15
|
output?: string;
|
16
|
-
}
|
16
|
+
};
|
17
17
|
|
18
|
-
export type GenericTool =
|
18
|
+
export type GenericTool = BindToolsInput | GoogleAIToolType;
|
19
19
|
export type ToolMap = Map<string, GenericTool>;
|
20
20
|
export type ToolRefs = {
|
21
21
|
tools: GenericTool[];
|
@@ -30,7 +30,10 @@ export type ToolNodeOptions = {
|
|
30
30
|
handleToolErrors?: boolean;
|
31
31
|
loadRuntimeTools?: ToolRefGenerator;
|
32
32
|
toolCallStepIds?: Map<string, string>;
|
33
|
-
errorHandler?: (
|
33
|
+
errorHandler?: (
|
34
|
+
data: ToolErrorData,
|
35
|
+
metadata?: Record<string, unknown>
|
36
|
+
) => void;
|
34
37
|
};
|
35
38
|
|
36
39
|
export type ToolNodeConstructorParams = ToolRefs & ToolNodeOptions;
|
@@ -50,13 +53,15 @@ export type CodeEnvFile = {
|
|
50
53
|
session_id: string;
|
51
54
|
};
|
52
55
|
|
53
|
-
export type CodeExecutionToolParams =
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
export type CodeExecutionToolParams =
|
57
|
+
| undefined
|
58
|
+
| {
|
59
|
+
session_id?: string;
|
60
|
+
user_id?: string;
|
61
|
+
apiKey?: string;
|
62
|
+
files?: CodeEnvFile[];
|
63
|
+
[EnvVar.CODE_API_KEY]?: string;
|
64
|
+
};
|
60
65
|
|
61
66
|
export type FileRef = {
|
62
67
|
id: string;
|