@christianriedl/utils 1.0.148 → 1.0.150

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
@@ -70,7 +70,7 @@ export interface IImageGenerationTool extends ITool {
70
70
  type: 'image_generation';
71
71
  background?: 'transparent' | 'opaque' | 'auto';
72
72
  input_fidelity?: 'low' | 'high';
73
- model?: 'string';
73
+ model?: string;
74
74
  output_format?: 'jpeg' | 'png' | 'webp';
75
75
  quality?: 'low' | 'medium' | 'high' | 'auto';
76
76
  size?: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
@@ -116,6 +116,7 @@ export interface IOpenAIService {
116
116
  modelNames: string[];
117
117
  initializeModelNames(): Promise<boolean>;
118
118
  response(prompt: string | string[], tools?: string[], imageUrl?: string, json?: ISchema, fileSearchFilter?: IOpenAIFilter): Promise<IResponseResult>;
119
+ editImage(prompt: string, imageUrl: string, imageTool: IImageGenerationTool): Promise<IResponseResult>;
119
120
  clearContext(): void;
120
121
  getModels(): Promise<string[]>;
121
122
  }
@@ -125,6 +126,7 @@ export interface IOpenAIServiceWithTools extends IOpenAIService {
125
126
  addMcpTool(tool: IMcpTool): void;
126
127
  addFileSearchTool(label: string, tool: IFileSearchTool): 'notfound' | 'exists' | 'changed';
127
128
  addWebSearchTool(label: string, tool: IWebSearchTool): void;
129
+ addImageGenerationTool(label: string, tool: IImageGenerationTool): void;
128
130
  addFunctionTool(tool: IFunctionTool, toolFunction: ToolFunction): void;
129
131
  getToolFunctions(tool: string): Promise<IResponseResult>;
130
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/utils",
3
- "version": "1.0.148",
3
+ "version": "1.0.150",
4
4
  "description": "Interfaces, local storage, service worker, configuration, application state",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -67,7 +67,7 @@
67
67
  }
68
68
  fileSearch[key] = names;
69
69
  }
70
- if (tool.type.startsWith("web_search")) {
70
+ else if (tool.type.startsWith("web_search")) {
71
71
  tool.user_location = Object.assign({}, tool.user_location);
72
72
  }
73
73
  }
@@ -78,11 +78,10 @@
78
78
 
79
79
  <template>
80
80
  <v-container fluid class="bg-office">
81
- <h4>Tools and FileSearch filter</h4>
82
81
  <v-row dense>
83
82
  <v-col cols="4">
84
83
  <v-row dense class="font-weight-bold">
85
- <v-col cols="4">Tool Use</v-col>
84
+ <v-col cols="12">Tool Use</v-col>
86
85
  </v-row>
87
86
  <v-divider></v-divider>
88
87
  <v-row dense v-for="(tool,key) in tools" :key="key">
@@ -92,15 +91,18 @@
92
91
  </v-row>
93
92
  </v-col>
94
93
  <v-col cols="8">
94
+ <v-row dense class="font-weight-bold">
95
+ <v-col cols="12">File Search Filter</v-col>
96
+ </v-row>
95
97
  <v-row dense class="font-weight-bold">
96
98
  <v-col cols="6">Name</v-col>
97
99
  <v-col cols="4">Value</v-col>
98
100
  <v-col cols="2">Op</v-col>
99
101
  </v-row>
100
- <v-divider></v-divider>
102
+ <v-divider></v-divider>
101
103
  <settings-line v-for="(item, index) in items" :key="item.name" :item="item" :op="operators[item.name]"
102
- :operations="index < numvs ? opsvs : opsfile" @change="onChange(item, true)"
103
- @clear="onChange(item, false)" @operation="(op) => onOperation(item, op)">
104
+ :operations="index < numvs ? opsvs : opsfile" @change="onChange(item, true)"
105
+ @clear="onChange(item, false)" @operation="(op) => onOperation(item, op)">
104
106
  </settings-line>
105
107
  </v-col>
106
108
  </v-row>
@@ -41,7 +41,10 @@
41
41
  <settings-line v-for="item in items" :key="item.name" :item="item" @change="onChange(item, true)" clearable @clear="onChange(item, false)"></settings-line>
42
42
  <v-row dense>
43
43
  <v-col cols="3">
44
- <v-btn @click="onBack">BACK</v-btn>
44
+ <v-btn class="bg-office" @click="onBack">
45
+ BACK
46
+ <v-icon icon="$back"></v-icon>
47
+ </v-btn>
45
48
  </v-col>
46
49
  </v-row>
47
50
  </v-container>