@rws-framework/ai-tools 3.5.0 → 3.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rws-framework/ai-tools",
3
3
  "private": false,
4
- "version": "3.5.0",
4
+ "version": "3.6.0",
5
5
  "description": "",
6
6
  "main": "src/index.ts",
7
7
  "scripts": {},
@@ -64,6 +64,14 @@ class RWSPrompt implements IPromptInstance {
64
64
  this.toolManager.registerToolHandlers(toolHandlers);
65
65
  }
66
66
 
67
+ clearTools(): void {
68
+ this.toolManager.clearTools();
69
+ }
70
+
71
+ clearTool(toolName: string): void {
72
+ this.toolManager.clearTool(toolName);
73
+ }
74
+
67
75
  async callTools<T = unknown, O = unknown>(tools: IToolCall[], moduleRef: ModuleRef, aiToolOptions?: O): Promise<T[]> {
68
76
  return this.toolManager.callTools<T, O>(tools, moduleRef, aiToolOptions);
69
77
  }
@@ -5,6 +5,16 @@ export class ToolManager {
5
5
  private toolHandlers: Map<string, ToolHandler> = new Map();
6
6
  private tools: IAITool[] = [];
7
7
 
8
+ clearTools(): void {
9
+ this.tools = [];
10
+ this.toolHandlers.clear();
11
+ }
12
+
13
+ clearTool(toolName: string): void {
14
+ this.tools = this.tools.filter(tool => tool.name !== toolName);
15
+ this.toolHandlers.delete(toolName);
16
+ }
17
+
8
18
  setTools(tools: IAITool[]): void {
9
19
  this.tools = tools;
10
20
  }
@@ -335,7 +335,7 @@ export class LangChainRAGService {
335
335
  };
336
336
 
337
337
  fs.writeFileSync(vectorFilePath, JSON.stringify(vectorData, null, 2));
338
- this.log('debug', `[SAVE] Successfully saved ${chunks.length} chunks with embeddings for file ${fileId}`);
338
+ this.log('debug', `[SAVE] Successfully saved ${chunks.length} chunks with embeddings for file ${fileId} to: "${vectorFilePath}"`);
339
339
 
340
340
  } catch (error) {
341
341
  this.log('error', `[SAVE] Failed to save vector data for file ${fileId}:`, error);
@@ -49,6 +49,7 @@ interface IAITool {
49
49
  name: string;
50
50
  description: string;
51
51
  input_schema?: IAIToolSchema;
52
+ transparent?: boolean;
52
53
  }
53
54
 
54
55
  interface IPromptHyperParameters {