@christianriedl/utils 1.0.120 → 1.0.121

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/iOpenAI.d.ts CHANGED
@@ -19,13 +19,15 @@ export interface ISchema {
19
19
  }
20
20
  export interface IOpenAIService {
21
21
  log: ILogger;
22
- response(prompt: string, tools?: string[], imageUrl?: string, json?: ISchema): Promise<IResponseResult>;
22
+ response(prompt: string | string[], tools?: string[], imageUrl?: string, json?: ISchema): Promise<IResponseResult>;
23
23
  clearContext(): void;
24
24
  }
25
+ export type ToolFunction = (input: Dictionary<unknown>) => Promise<Dictionary<any>>;
25
26
  export interface IOpenAIServiceWithTools extends IOpenAIService {
26
27
  addMcpTool(label: string, url: string, desc: string, allowedTools?: string[]): void;
27
28
  addFileSearchTool(label: string, vectorStore: string): boolean;
28
29
  addWebSearchTool(label: string, country?: string, city?: string, region?: string): void;
30
+ addFunctionTool(functionName: string, description: string, parameters: Dictionary<unknown>, toolFunction: ToolFunction): void;
29
31
  }
30
32
  export interface IVectorStore {
31
33
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/utils",
3
- "version": "1.0.120",
3
+ "version": "1.0.121",
4
4
  "description": "Interfaces, local storage, service worker, configuration, application state",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",