@dj1029/plugin-smart-sl 0.0.9 → 0.0.11
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/dist/lib/smart.strategy.d.ts +10 -10
- package/dist/lib/tool.d.ts +10 -10
- package/dist/lib/tool.d.ts.map +1 -1
- package/dist/lib/tool.js +5 -3
- package/package.json +1 -1
|
@@ -33,20 +33,20 @@ export declare class SmartStrategy implements IToolsetStrategy<any> {
|
|
|
33
33
|
validateConfig(config: any): Promise<void>;
|
|
34
34
|
create(config: any): Promise<BuiltinToolset>;
|
|
35
35
|
createTools(): import("@langchain/core/tools").DynamicStructuredTool<import("zod").ZodObject<{
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
username: import("zod").ZodString;
|
|
37
|
+
password: import("zod").ZodString;
|
|
38
38
|
}, "strip", import("zod").ZodTypeAny, {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
username?: string;
|
|
40
|
+
password?: string;
|
|
41
41
|
}, {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
username?: string;
|
|
43
|
+
password?: string;
|
|
44
44
|
}>, {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
username?: string;
|
|
46
|
+
password?: string;
|
|
47
47
|
}, {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
username?: string;
|
|
49
|
+
password?: string;
|
|
50
50
|
}, any>[];
|
|
51
51
|
}
|
|
52
52
|
//# sourceMappingURL=smart.strategy.d.ts.map
|
package/dist/lib/tool.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare function buildSmartTool(): import("@langchain/core/tools").DynamicStructuredTool<z.ZodObject<{
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
username: z.ZodString;
|
|
4
|
+
password: z.ZodString;
|
|
5
5
|
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
username?: string;
|
|
7
|
+
password?: string;
|
|
8
8
|
}, {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
username?: string;
|
|
10
|
+
password?: string;
|
|
11
11
|
}>, {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
username?: string;
|
|
13
|
+
password?: string;
|
|
14
14
|
}, {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
username?: string;
|
|
16
|
+
password?: string;
|
|
17
17
|
}, any>;
|
|
18
18
|
//# sourceMappingURL=tool.d.ts.map
|
package/dist/lib/tool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/lib/tool.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,wBAAgB,cAAc;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/lib/tool.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,wBAAgB,cAAc;;;;;;;;;;;;;;;QAwB7B"}
|
package/dist/lib/tool.js
CHANGED
|
@@ -7,7 +7,9 @@ export function buildSmartTool() {
|
|
|
7
7
|
try {
|
|
8
8
|
console.log("input ---------- ", input);
|
|
9
9
|
const httpClient = new HttpClientService();
|
|
10
|
-
|
|
10
|
+
let res = await httpClient.post('/login', input);
|
|
11
|
+
console.log("res ---------- ", res);
|
|
12
|
+
return res;
|
|
11
13
|
}
|
|
12
14
|
catch (error) {
|
|
13
15
|
return "I don't know how to do that because: " + getErrorMessage(error);
|
|
@@ -17,8 +19,8 @@ export function buildSmartTool() {
|
|
|
17
19
|
description: `Smart Connect`,
|
|
18
20
|
/** 这里决定了 测试的参数 */
|
|
19
21
|
schema: z.object({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
username: z.string().describe('连接用户名'),
|
|
23
|
+
password: z.string().describe('连接密码')
|
|
22
24
|
})
|
|
23
25
|
});
|
|
24
26
|
}
|