@dj1029/plugin-smart-sl 0.0.7 → 0.0.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"http-client.service.d.ts","sourceRoot":"","sources":["../../src/lib/http-client.service.ts"],"names":[],"mappings":"AAGA,qBACa,iBAAiB;IAC1B,OAAO,CAAC,aAAa,CAAC;;IAoBtB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAC,IAAI,CAAC,EAAE,GAAG;IAI1B,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG;CAI/B"}
1
+ {"version":3,"file":"http-client.service.d.ts","sourceRoot":"","sources":["../../src/lib/http-client.service.ts"],"names":[],"mappings":"AAGA,qBACa,iBAAiB;IAC1B,OAAO,CAAC,aAAa,CAAC;;IAoBtB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAC,IAAI,CAAC,EAAE,GAAG;IAI1B,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG;CAK/B"}
@@ -22,6 +22,7 @@ let HttpClientService = class HttpClientService {
22
22
  return this.axiosInstance.get(url, data);
23
23
  }
24
24
  post(url, data) {
25
+ console.log("post ------ data ---------- ", data);
25
26
  return this.axiosInstance.post(url, data);
26
27
  }
27
28
  };
@@ -47,6 +47,6 @@ export declare class SmartStrategy implements IToolsetStrategy<any> {
47
47
  }, {
48
48
  userName?: string;
49
49
  passWord?: string;
50
- }, string>[];
50
+ }, any>[];
51
51
  }
52
52
  //# sourceMappingURL=smart.strategy.d.ts.map
@@ -14,5 +14,5 @@ export declare function buildSmartTool(): import("@langchain/core/tools").Dynami
14
14
  }, {
15
15
  userName?: string;
16
16
  passWord?: string;
17
- }, string>;
17
+ }, any>;
18
18
  //# sourceMappingURL=tool.d.ts.map
@@ -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;AAGvB,wBAAgB,cAAc;;;;;;;;;;;;;;;WAoB7B"}
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
- return "ok";
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dj1029/plugin-smart-sl",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",