@dj1029/plugin-smart-sl 0.0.7 → 0.0.8
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 +1 -1
- package/dist/lib/tool.d.ts +1 -1
- package/dist/lib/tool.d.ts.map +1 -1
- package/dist/lib/tool.js +3 -1
- package/package.json +1 -1
package/dist/lib/tool.d.ts
CHANGED
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;
|
|
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;;;;;;;;;;;;;;;QAuB7B"}
|
package/dist/lib/tool.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { tool } from '@langchain/core/tools';
|
|
2
2
|
import { getErrorMessage } from '@xpert-ai/plugin-sdk';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import { HttpClientService } from './http-client.service.js';
|
|
4
5
|
export function buildSmartTool() {
|
|
5
6
|
return tool(async (input) => {
|
|
6
7
|
try {
|
|
7
8
|
console.log("input ---------- ", input);
|
|
8
|
-
|
|
9
|
+
const httpClient = new HttpClientService();
|
|
10
|
+
return await httpClient.post('/login', input);
|
|
9
11
|
}
|
|
10
12
|
catch (error) {
|
|
11
13
|
return "I don't know how to do that because: " + getErrorMessage(error);
|