@nice2dev/ui-tools 1.0.10

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.
Files changed (158) hide show
  1. package/README.md +36 -0
  2. package/dist/access-control.d.ts +726 -0
  3. package/dist/access-control.d.ts.map +1 -0
  4. package/dist/accessibility-i18n.d.ts +1017 -0
  5. package/dist/accessibility-i18n.d.ts.map +1 -0
  6. package/dist/ai-assistant.d.ts +263 -0
  7. package/dist/ai-assistant.d.ts.map +1 -0
  8. package/dist/ai-playgrounds.d.ts +842 -0
  9. package/dist/ai-playgrounds.d.ts.map +1 -0
  10. package/dist/alerting-incidents.d.ts +558 -0
  11. package/dist/alerting-incidents.d.ts.map +1 -0
  12. package/dist/api-designer.d.ts +1568 -0
  13. package/dist/api-designer.d.ts.map +1 -0
  14. package/dist/api-testing.d.ts +1146 -0
  15. package/dist/api-testing.d.ts.map +1 -0
  16. package/dist/apm-profiling.d.ts +656 -0
  17. package/dist/apm-profiling.d.ts.map +1 -0
  18. package/dist/artifacts.d.ts +421 -0
  19. package/dist/artifacts.d.ts.map +1 -0
  20. package/dist/audit-compliance.d.ts +752 -0
  21. package/dist/audit-compliance.d.ts.map +1 -0
  22. package/dist/certificates.d.ts +256 -0
  23. package/dist/certificates.d.ts.map +1 -0
  24. package/dist/chart-builder.d.ts +1404 -0
  25. package/dist/chart-builder.d.ts.map +1 -0
  26. package/dist/cloud-instances.d.ts +169 -0
  27. package/dist/cloud-instances.d.ts.map +1 -0
  28. package/dist/config-management.d.ts +350 -0
  29. package/dist/config-management.d.ts.map +1 -0
  30. package/dist/containers.d.ts +256 -0
  31. package/dist/containers.d.ts.map +1 -0
  32. package/dist/dashboard-designer.d.ts +1238 -0
  33. package/dist/dashboard-designer.d.ts.map +1 -0
  34. package/dist/data-management.d.ts +496 -0
  35. package/dist/data-management.d.ts.map +1 -0
  36. package/dist/data-pipeline.d.ts +1105 -0
  37. package/dist/data-pipeline.d.ts.map +1 -0
  38. package/dist/data-warehouse.d.ts +1097 -0
  39. package/dist/data-warehouse.d.ts.map +1 -0
  40. package/dist/dataset-management.d.ts +782 -0
  41. package/dist/dataset-management.d.ts.map +1 -0
  42. package/dist/db-adapters.d.ts +704 -0
  43. package/dist/db-adapters.d.ts.map +1 -0
  44. package/dist/db-admin.d.ts +699 -0
  45. package/dist/db-admin.d.ts.map +1 -0
  46. package/dist/db-designer.d.ts +366 -0
  47. package/dist/db-designer.d.ts.map +1 -0
  48. package/dist/debugger.d.ts +356 -0
  49. package/dist/debugger.d.ts.map +1 -0
  50. package/dist/device-management.d.ts +871 -0
  51. package/dist/device-management.d.ts.map +1 -0
  52. package/dist/distributed-tracing.d.ts +427 -0
  53. package/dist/distributed-tracing.d.ts.map +1 -0
  54. package/dist/dns-management.d.ts +215 -0
  55. package/dist/dns-management.d.ts.map +1 -0
  56. package/dist/download-manager.d.ts +271 -0
  57. package/dist/download-manager.d.ts.map +1 -0
  58. package/dist/download-torrent.d.ts +1062 -0
  59. package/dist/download-torrent.d.ts.map +1 -0
  60. package/dist/edge-computing.d.ts +720 -0
  61. package/dist/edge-computing.d.ts.map +1 -0
  62. package/dist/education.d.ts +1135 -0
  63. package/dist/education.d.ts.map +1 -0
  64. package/dist/email-template.d.ts +1141 -0
  65. package/dist/email-template.d.ts.map +1 -0
  66. package/dist/erp-enterprise.d.ts +1270 -0
  67. package/dist/erp-enterprise.d.ts.map +1 -0
  68. package/dist/form-builder.d.ts +1117 -0
  69. package/dist/form-builder.d.ts.map +1 -0
  70. package/dist/game-engine-advanced.d.ts +1049 -0
  71. package/dist/game-engine-advanced.d.ts.map +1 -0
  72. package/dist/git.d.ts +415 -0
  73. package/dist/git.d.ts.map +1 -0
  74. package/dist/hardware-integration.d.ts +966 -0
  75. package/dist/hardware-integration.d.ts.map +1 -0
  76. package/dist/iac.d.ts +318 -0
  77. package/dist/iac.d.ts.map +1 -0
  78. package/dist/icon-tools.d.ts +1023 -0
  79. package/dist/icon-tools.d.ts.map +1 -0
  80. package/dist/ide.d.ts +322 -0
  81. package/dist/ide.d.ts.map +1 -0
  82. package/dist/index.cjs +2 -0
  83. package/dist/index.cjs.map +1 -0
  84. package/dist/index.d.ts +176 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.mjs +1887 -0
  87. package/dist/index.mjs.map +1 -0
  88. package/dist/integration-platform.d.ts +857 -0
  89. package/dist/integration-platform.d.ts.map +1 -0
  90. package/dist/kubernetes.d.ts +278 -0
  91. package/dist/kubernetes.d.ts.map +1 -0
  92. package/dist/life-management.d.ts +1132 -0
  93. package/dist/life-management.d.ts.map +1 -0
  94. package/dist/log-management.d.ts +473 -0
  95. package/dist/log-management.d.ts.map +1 -0
  96. package/dist/mathematics.d.ts +870 -0
  97. package/dist/mathematics.d.ts.map +1 -0
  98. package/dist/message-queue.d.ts +1006 -0
  99. package/dist/message-queue.d.ts.map +1 -0
  100. package/dist/metrics-dashboard.d.ts +596 -0
  101. package/dist/metrics-dashboard.d.ts.map +1 -0
  102. package/dist/mobile-components.d.ts +766 -0
  103. package/dist/mobile-components.d.ts.map +1 -0
  104. package/dist/model-deployment.d.ts +787 -0
  105. package/dist/model-deployment.d.ts.map +1 -0
  106. package/dist/model-registry.d.ts +740 -0
  107. package/dist/model-registry.d.ts.map +1 -0
  108. package/dist/model-training.d.ts +706 -0
  109. package/dist/model-training.d.ts.map +1 -0
  110. package/dist/network-config.d.ts +334 -0
  111. package/dist/network-config.d.ts.map +1 -0
  112. package/dist/network-monitoring.d.ts +291 -0
  113. package/dist/network-monitoring.d.ts.map +1 -0
  114. package/dist/pdf-tools.d.ts +1003 -0
  115. package/dist/pdf-tools.d.ts.map +1 -0
  116. package/dist/pipelines.d.ts +250 -0
  117. package/dist/pipelines.d.ts.map +1 -0
  118. package/dist/remote-desktop.d.ts +207 -0
  119. package/dist/remote-desktop.d.ts.map +1 -0
  120. package/dist/report-designer.d.ts +1153 -0
  121. package/dist/report-designer.d.ts.map +1 -0
  122. package/dist/scada-industrial.d.ts +848 -0
  123. package/dist/scada-industrial.d.ts.map +1 -0
  124. package/dist/scientific-research.d.ts +1149 -0
  125. package/dist/scientific-research.d.ts.map +1 -0
  126. package/dist/secret-management.d.ts +617 -0
  127. package/dist/secret-management.d.ts.map +1 -0
  128. package/dist/security-scanning.d.ts +714 -0
  129. package/dist/security-scanning.d.ts.map +1 -0
  130. package/dist/self-service-analytics.d.ts +1208 -0
  131. package/dist/self-service-analytics.d.ts.map +1 -0
  132. package/dist/sensor-dashboard.d.ts +845 -0
  133. package/dist/sensor-dashboard.d.ts.map +1 -0
  134. package/dist/server-management.d.ts +331 -0
  135. package/dist/server-management.d.ts.map +1 -0
  136. package/dist/smart-home.d.ts +861 -0
  137. package/dist/smart-home.d.ts.map +1 -0
  138. package/dist/spreadsheet.d.ts +1043 -0
  139. package/dist/spreadsheet.d.ts.map +1 -0
  140. package/dist/sql-editor.d.ts +402 -0
  141. package/dist/sql-editor.d.ts.map +1 -0
  142. package/dist/terminal.d.ts +245 -0
  143. package/dist/terminal.d.ts.map +1 -0
  144. package/dist/testing-qa.d.ts +1013 -0
  145. package/dist/testing-qa.d.ts.map +1 -0
  146. package/dist/torrent-client.d.ts +298 -0
  147. package/dist/torrent-client.d.ts.map +1 -0
  148. package/dist/traceless.d.ts +759 -0
  149. package/dist/traceless.d.ts.map +1 -0
  150. package/dist/virtual-machines.d.ts +199 -0
  151. package/dist/virtual-machines.d.ts.map +1 -0
  152. package/dist/visual-scripting.d.ts +381 -0
  153. package/dist/visual-scripting.d.ts.map +1 -0
  154. package/dist/word-processor.d.ts +1124 -0
  155. package/dist/word-processor.d.ts.map +1 -0
  156. package/dist/workspace.d.ts +333 -0
  157. package/dist/workspace.d.ts.map +1 -0
  158. package/package.json +62 -0
@@ -0,0 +1,842 @@
1
+ /**
2
+ * @file ai-playgrounds.ts
3
+ * @module @nice2dev/ui-tools
4
+ * @description PRO-18.5 — AI Playgrounds
5
+ *
6
+ * Types for AI playgrounds: LLM chat, prompt engineering, embeddings visualizer,
7
+ * image generation, text-to-speech, speech-to-text, translation, NER, QA, code generation.
8
+ */
9
+ /** AI task type */
10
+ export type AITaskType = 'chat' | 'completion' | 'embedding' | 'imageGeneration' | 'imageEdit' | 'tts' | 'stt' | 'translation' | 'sentiment' | 'ner' | 'qa' | 'summarization' | 'codeGeneration' | 'classification' | 'custom';
11
+ /** LLM provider */
12
+ export type LLMProvider = 'openai' | 'anthropic' | 'google' | 'cohere' | 'mistral' | 'meta' | 'huggingface' | 'azure' | 'aws_bedrock' | 'local' | 'custom';
13
+ /** Image generation provider */
14
+ export type ImageGenProvider = 'openai_dalle' | 'stability' | 'midjourney' | 'replicate' | 'huggingface' | 'local' | 'custom';
15
+ /** AI playground config */
16
+ export interface AIPlaygroundConfig {
17
+ /** Theme */
18
+ theme?: PlaygroundTheme;
19
+ /** Features */
20
+ features?: PlaygroundFeatures;
21
+ /** Providers */
22
+ providers?: ProviderConfig[];
23
+ /** Prompt templates */
24
+ promptTemplates?: PromptTemplateLibrary;
25
+ /** Usage tracking */
26
+ usage?: UsageTrackingConfig;
27
+ }
28
+ /** Playground theme */
29
+ export interface PlaygroundTheme {
30
+ name?: string;
31
+ colors?: PlaygroundColors;
32
+ codeTheme?: string;
33
+ }
34
+ /** Playground colors */
35
+ export interface PlaygroundColors {
36
+ primary?: string;
37
+ userMessage?: string;
38
+ assistantMessage?: string;
39
+ systemMessage?: string;
40
+ codeBackground?: string;
41
+ }
42
+ /** Playground features */
43
+ export interface PlaygroundFeatures {
44
+ chat?: boolean;
45
+ promptEngineering?: boolean;
46
+ embeddings?: boolean;
47
+ imageGeneration?: boolean;
48
+ tts?: boolean;
49
+ stt?: boolean;
50
+ translation?: boolean;
51
+ sentiment?: boolean;
52
+ ner?: boolean;
53
+ qa?: boolean;
54
+ codeGeneration?: boolean;
55
+ comparison?: boolean;
56
+ history?: boolean;
57
+ }
58
+ /** Provider config */
59
+ export interface ProviderConfig {
60
+ provider: LLMProvider | ImageGenProvider;
61
+ apiKey?: string;
62
+ baseUrl?: string;
63
+ models?: string[];
64
+ defaultModel?: string;
65
+ maxTokens?: number;
66
+ }
67
+ /** Usage tracking config */
68
+ export interface UsageTrackingConfig {
69
+ enabled?: boolean;
70
+ budgetLimit?: number;
71
+ alertThreshold?: number;
72
+ trackByUser?: boolean;
73
+ }
74
+ /** LLM playground session */
75
+ export interface LLMPlaygroundSession {
76
+ id: string;
77
+ name?: string;
78
+ provider: LLMProvider;
79
+ model: string;
80
+ messages: PlaygroundMessage[];
81
+ config: LLMConfig;
82
+ usage?: LLMUsage;
83
+ metadata?: SessionMetadata;
84
+ createdAt: Date;
85
+ updatedAt?: Date;
86
+ }
87
+ /** Playground message */
88
+ export interface PlaygroundMessage {
89
+ id: string;
90
+ role: MessageRole;
91
+ content: string | MessageContent[];
92
+ name?: string;
93
+ functionCall?: FunctionCall;
94
+ toolCalls?: ToolCall[];
95
+ timestamp: Date;
96
+ tokens?: number;
97
+ latency?: number;
98
+ model?: string;
99
+ }
100
+ /** Message role */
101
+ export type MessageRole = 'system' | 'user' | 'assistant' | 'function' | 'tool';
102
+ /** Message content */
103
+ export interface MessageContent {
104
+ type: 'text' | 'image_url' | 'audio';
105
+ text?: string;
106
+ imageUrl?: string;
107
+ audioUrl?: string;
108
+ }
109
+ /** Function call */
110
+ export interface FunctionCall {
111
+ name: string;
112
+ arguments: string;
113
+ }
114
+ /** Tool call */
115
+ export interface ToolCall {
116
+ id: string;
117
+ type: 'function';
118
+ function: FunctionCall;
119
+ }
120
+ /** LLM config */
121
+ export interface LLMConfig {
122
+ temperature?: number;
123
+ topP?: number;
124
+ topK?: number;
125
+ maxTokens?: number;
126
+ stopSequences?: string[];
127
+ presencePenalty?: number;
128
+ frequencyPenalty?: number;
129
+ seed?: number;
130
+ responseFormat?: ResponseFormat;
131
+ tools?: Tool[];
132
+ toolChoice?: ToolChoice;
133
+ }
134
+ /** Response format */
135
+ export interface ResponseFormat {
136
+ type: 'text' | 'json_object' | 'json_schema';
137
+ schema?: Record<string, unknown>;
138
+ }
139
+ /** Tool */
140
+ export interface Tool {
141
+ type: 'function';
142
+ function: FunctionDefinition;
143
+ }
144
+ /** Function definition */
145
+ export interface FunctionDefinition {
146
+ name: string;
147
+ description?: string;
148
+ parameters?: JSONSchema;
149
+ }
150
+ /** JSON schema */
151
+ export interface JSONSchema {
152
+ type: string;
153
+ properties?: Record<string, JSONSchema>;
154
+ required?: string[];
155
+ items?: JSONSchema;
156
+ enum?: unknown[];
157
+ description?: string;
158
+ [key: string]: unknown;
159
+ }
160
+ /** Tool choice */
161
+ export type ToolChoice = 'auto' | 'none' | 'required' | {
162
+ type: 'function';
163
+ function: {
164
+ name: string;
165
+ };
166
+ };
167
+ /** LLM usage */
168
+ export interface LLMUsage {
169
+ promptTokens: number;
170
+ completionTokens: number;
171
+ totalTokens: number;
172
+ cost?: number;
173
+ }
174
+ /** Session metadata */
175
+ export interface SessionMetadata {
176
+ createdBy?: string;
177
+ tags?: string[];
178
+ labels?: Record<string, string>;
179
+ notes?: string;
180
+ }
181
+ /** Prompt template library */
182
+ export interface PromptTemplateLibrary {
183
+ templates: PromptTemplate[];
184
+ categories?: PromptCategory[];
185
+ versions?: PromptVersionControl;
186
+ }
187
+ /** Prompt template */
188
+ export interface PromptTemplate {
189
+ id: string;
190
+ name: string;
191
+ description?: string;
192
+ category?: string;
193
+ template: string;
194
+ variables?: PromptVariable[];
195
+ examples?: PromptExample[];
196
+ metadata?: PromptMetadata;
197
+ version?: string;
198
+ createdAt: Date;
199
+ updatedAt?: Date;
200
+ }
201
+ /** Prompt variable */
202
+ export interface PromptVariable {
203
+ name: string;
204
+ description?: string;
205
+ type: 'string' | 'number' | 'boolean' | 'array' | 'object';
206
+ required?: boolean;
207
+ default?: unknown;
208
+ validation?: VariableValidation;
209
+ }
210
+ /** Variable validation */
211
+ export interface VariableValidation {
212
+ minLength?: number;
213
+ maxLength?: number;
214
+ pattern?: string;
215
+ enum?: unknown[];
216
+ }
217
+ /** Prompt example */
218
+ export interface PromptExample {
219
+ variables: Record<string, unknown>;
220
+ expectedOutput?: string;
221
+ tags?: string[];
222
+ }
223
+ /** Prompt category */
224
+ export interface PromptCategory {
225
+ id: string;
226
+ name: string;
227
+ description?: string;
228
+ icon?: string;
229
+ parent?: string;
230
+ }
231
+ /** Prompt metadata */
232
+ export interface PromptMetadata {
233
+ author?: string;
234
+ tags?: string[];
235
+ model?: string;
236
+ useCase?: string;
237
+ performance?: PromptPerformance;
238
+ }
239
+ /** Prompt performance */
240
+ export interface PromptPerformance {
241
+ averageLatency?: number;
242
+ averageTokens?: number;
243
+ successRate?: number;
244
+ userRating?: number;
245
+ }
246
+ /** Prompt version control */
247
+ export interface PromptVersionControl {
248
+ enabled: boolean;
249
+ history: PromptVersion[];
250
+ }
251
+ /** Prompt version */
252
+ export interface PromptVersion {
253
+ version: string;
254
+ template: string;
255
+ changes?: string;
256
+ author?: string;
257
+ timestamp: Date;
258
+ }
259
+ /** Prompt test */
260
+ export interface PromptTest {
261
+ id: string;
262
+ templateId: string;
263
+ cases: PromptTestCase[];
264
+ results?: PromptTestResult[];
265
+ summary?: PromptTestSummary;
266
+ }
267
+ /** Prompt test case */
268
+ export interface PromptTestCase {
269
+ id: string;
270
+ name?: string;
271
+ variables: Record<string, unknown>;
272
+ assertions?: PromptAssertion[];
273
+ expectedOutput?: string;
274
+ }
275
+ /** Prompt assertion */
276
+ export interface PromptAssertion {
277
+ type: 'contains' | 'not_contains' | 'matches' | 'json_schema' | 'sentiment' | 'custom';
278
+ value: unknown;
279
+ }
280
+ /** Prompt test result */
281
+ export interface PromptTestResult {
282
+ caseId: string;
283
+ passed: boolean;
284
+ output: string;
285
+ assertions: AssertionResult[];
286
+ latency: number;
287
+ tokens: number;
288
+ }
289
+ /** Assertion result */
290
+ export interface AssertionResult {
291
+ assertion: PromptAssertion;
292
+ passed: boolean;
293
+ actual?: unknown;
294
+ message?: string;
295
+ }
296
+ /** Prompt test summary */
297
+ export interface PromptTestSummary {
298
+ total: number;
299
+ passed: number;
300
+ failed: number;
301
+ averageLatency: number;
302
+ averageTokens: number;
303
+ }
304
+ /** Embedding visualizer config */
305
+ export interface EmbeddingVisualizerConfig {
306
+ model: string;
307
+ provider: LLMProvider;
308
+ reduction: DimensionReduction;
309
+ clustering?: ClusteringConfig;
310
+ display?: EmbeddingDisplayConfig;
311
+ }
312
+ /** Dimension reduction */
313
+ export interface DimensionReduction {
314
+ method: 'tsne' | 'umap' | 'pca';
315
+ dimensions: 2 | 3;
316
+ params?: ReductionParams;
317
+ }
318
+ /** Reduction params */
319
+ export interface ReductionParams {
320
+ perplexity?: number;
321
+ iterations?: number;
322
+ learningRate?: number;
323
+ nNeighbors?: number;
324
+ minDist?: number;
325
+ metric?: string;
326
+ nComponents?: number;
327
+ }
328
+ /** Clustering config */
329
+ export interface ClusteringConfig {
330
+ enabled: boolean;
331
+ method: 'kmeans' | 'dbscan' | 'hdbscan' | 'agglomerative';
332
+ params?: ClusteringParams;
333
+ }
334
+ /** Clustering params */
335
+ export interface ClusteringParams {
336
+ nClusters?: number;
337
+ eps?: number;
338
+ minSamples?: number;
339
+ linkage?: string;
340
+ }
341
+ /** Embedding display config */
342
+ export interface EmbeddingDisplayConfig {
343
+ pointSize?: number;
344
+ colorBy?: 'cluster' | 'label' | 'custom';
345
+ showLabels?: boolean;
346
+ interactive?: boolean;
347
+ }
348
+ /** Embedding data */
349
+ export interface EmbeddingData {
350
+ points: EmbeddingPoint[];
351
+ metadata?: EmbeddingMetadata;
352
+ clusters?: ClusterInfo[];
353
+ }
354
+ /** Embedding point */
355
+ export interface EmbeddingPoint {
356
+ id: string;
357
+ text: string;
358
+ vector?: number[];
359
+ coordinates: number[];
360
+ label?: string;
361
+ cluster?: number;
362
+ metadata?: Record<string, unknown>;
363
+ }
364
+ /** Embedding metadata */
365
+ export interface EmbeddingMetadata {
366
+ model: string;
367
+ dimensions: number;
368
+ pointCount: number;
369
+ reductionMethod: string;
370
+ }
371
+ /** Cluster info */
372
+ export interface ClusterInfo {
373
+ id: number;
374
+ size: number;
375
+ centroid: number[];
376
+ label?: string;
377
+ keywords?: string[];
378
+ }
379
+ /** Image generation request */
380
+ export interface ImageGenerationRequest {
381
+ prompt: string;
382
+ negativePrompt?: string;
383
+ model: string;
384
+ provider: ImageGenProvider;
385
+ config: ImageGenConfig;
386
+ }
387
+ /** Image gen config */
388
+ export interface ImageGenConfig {
389
+ width?: number;
390
+ height?: number;
391
+ numImages?: number;
392
+ steps?: number;
393
+ guidanceScale?: number;
394
+ seed?: number;
395
+ style?: string;
396
+ quality?: 'standard' | 'hd';
397
+ responseFormat?: 'url' | 'b64_json';
398
+ sampler?: string;
399
+ }
400
+ /** Image generation result */
401
+ export interface ImageGenerationResult {
402
+ id: string;
403
+ images: GeneratedImage[];
404
+ prompt: string;
405
+ model: string;
406
+ config: ImageGenConfig;
407
+ timestamp: Date;
408
+ cost?: number;
409
+ }
410
+ /** Generated image */
411
+ export interface GeneratedImage {
412
+ id: string;
413
+ url?: string;
414
+ base64?: string;
415
+ revisedPrompt?: string;
416
+ seed?: number;
417
+ }
418
+ /** Image edit request */
419
+ export interface ImageEditRequest {
420
+ image: string;
421
+ mask?: string;
422
+ prompt: string;
423
+ model: string;
424
+ config: ImageGenConfig;
425
+ }
426
+ /** Image variation request */
427
+ export interface ImageVariationRequest {
428
+ image: string;
429
+ model: string;
430
+ numVariations: number;
431
+ config: ImageGenConfig;
432
+ }
433
+ /** TTS request */
434
+ export interface TTSRequest {
435
+ text: string;
436
+ voice: string;
437
+ model: string;
438
+ config?: TTSConfig;
439
+ }
440
+ /** TTS config */
441
+ export interface TTSConfig {
442
+ speed?: number;
443
+ pitch?: number;
444
+ volume?: number;
445
+ format?: 'mp3' | 'wav' | 'ogg' | 'flac';
446
+ sampleRate?: number;
447
+ }
448
+ /** TTS result */
449
+ export interface TTSResult {
450
+ id: string;
451
+ audioUrl?: string;
452
+ audioBase64?: string;
453
+ duration: number;
454
+ format: string;
455
+ model: string;
456
+ voice: string;
457
+ }
458
+ /** Voice option */
459
+ export interface VoiceOption {
460
+ id: string;
461
+ name: string;
462
+ language: string;
463
+ gender?: 'male' | 'female' | 'neutral';
464
+ style?: string;
465
+ preview?: string;
466
+ }
467
+ /** STT request */
468
+ export interface STTRequest {
469
+ audio: string | Blob;
470
+ model: string;
471
+ config?: STTConfig;
472
+ }
473
+ /** STT config */
474
+ export interface STTConfig {
475
+ language?: string;
476
+ prompt?: string;
477
+ temperature?: number;
478
+ timestamps?: boolean;
479
+ wordTimestamps?: boolean;
480
+ diarization?: boolean;
481
+ }
482
+ /** STT result */
483
+ export interface STTResult {
484
+ id: string;
485
+ text: string;
486
+ segments?: STTSegment[];
487
+ words?: STTWord[];
488
+ speakers?: STTSpeaker[];
489
+ language?: string;
490
+ duration?: number;
491
+ confidence?: number;
492
+ }
493
+ /** STT segment */
494
+ export interface STTSegment {
495
+ id: number;
496
+ start: number;
497
+ end: number;
498
+ text: string;
499
+ confidence?: number;
500
+ speaker?: string;
501
+ }
502
+ /** STT word */
503
+ export interface STTWord {
504
+ word: string;
505
+ start: number;
506
+ end: number;
507
+ confidence?: number;
508
+ }
509
+ /** STT speaker */
510
+ export interface STTSpeaker {
511
+ id: string;
512
+ label?: string;
513
+ segments: number[];
514
+ }
515
+ /** Translation request */
516
+ export interface TranslationRequest {
517
+ text: string;
518
+ sourceLang?: string;
519
+ targetLang: string;
520
+ model?: string;
521
+ formality?: 'formal' | 'informal';
522
+ }
523
+ /** Translation result */
524
+ export interface TranslationResult {
525
+ id: string;
526
+ originalText: string;
527
+ translatedText: string;
528
+ sourceLang: string;
529
+ targetLang: string;
530
+ alternatives?: string[];
531
+ confidence?: number;
532
+ }
533
+ /** Language option */
534
+ export interface LanguageOption {
535
+ code: string;
536
+ name: string;
537
+ nativeName?: string;
538
+ supported?: boolean;
539
+ }
540
+ /** Sentiment request */
541
+ export interface SentimentRequest {
542
+ text: string;
543
+ model?: string;
544
+ aspects?: string[];
545
+ granularity?: 'document' | 'sentence' | 'aspect';
546
+ }
547
+ /** Sentiment result */
548
+ export interface SentimentResult {
549
+ id: string;
550
+ text: string;
551
+ overall: SentimentScore;
552
+ sentences?: SentenceSentiment[];
553
+ aspects?: AspectSentiment[];
554
+ emotions?: EmotionScore[];
555
+ }
556
+ /** Sentiment score */
557
+ export interface SentimentScore {
558
+ label: 'positive' | 'negative' | 'neutral' | 'mixed';
559
+ score: number;
560
+ confidence: number;
561
+ }
562
+ /** Sentence sentiment */
563
+ export interface SentenceSentiment {
564
+ text: string;
565
+ start: number;
566
+ end: number;
567
+ sentiment: SentimentScore;
568
+ }
569
+ /** Aspect sentiment */
570
+ export interface AspectSentiment {
571
+ aspect: string;
572
+ sentiment: SentimentScore;
573
+ mentions: AspectMention[];
574
+ }
575
+ /** Aspect mention */
576
+ export interface AspectMention {
577
+ text: string;
578
+ start: number;
579
+ end: number;
580
+ }
581
+ /** Emotion score */
582
+ export interface EmotionScore {
583
+ emotion: string;
584
+ score: number;
585
+ }
586
+ /** NER request */
587
+ export interface NERRequest {
588
+ text: string;
589
+ model?: string;
590
+ entityTypes?: string[];
591
+ }
592
+ /** NER result */
593
+ export interface NERResult {
594
+ id: string;
595
+ text: string;
596
+ entities: NamedEntity[];
597
+ entityCounts: Record<string, number>;
598
+ }
599
+ /** Named entity */
600
+ export interface NamedEntity {
601
+ text: string;
602
+ type: string;
603
+ start: number;
604
+ end: number;
605
+ confidence?: number;
606
+ normalized?: string;
607
+ metadata?: Record<string, unknown>;
608
+ }
609
+ /** Entity type definition */
610
+ export interface EntityTypeDefinition {
611
+ type: string;
612
+ label: string;
613
+ color?: string;
614
+ description?: string;
615
+ }
616
+ /** QA request */
617
+ export interface QARequest {
618
+ question: string;
619
+ context?: string;
620
+ documents?: QADocument[];
621
+ model?: string;
622
+ config?: QAConfig;
623
+ }
624
+ /** QA document */
625
+ export interface QADocument {
626
+ id: string;
627
+ text: string;
628
+ metadata?: Record<string, unknown>;
629
+ }
630
+ /** QA config */
631
+ export interface QAConfig {
632
+ maxAnswerLength?: number;
633
+ numAnswers?: number;
634
+ minConfidence?: number;
635
+ useRetrieval?: boolean;
636
+ }
637
+ /** QA result */
638
+ export interface QAResult {
639
+ id: string;
640
+ question: string;
641
+ answers: QAAnswer[];
642
+ retrievedDocuments?: RetrievedDocument[];
643
+ }
644
+ /** QA answer */
645
+ export interface QAAnswer {
646
+ text: string;
647
+ confidence: number;
648
+ start?: number;
649
+ end?: number;
650
+ documentId?: string;
651
+ context?: string;
652
+ }
653
+ /** Retrieved document */
654
+ export interface RetrievedDocument {
655
+ id: string;
656
+ text: string;
657
+ score: number;
658
+ metadata?: Record<string, unknown>;
659
+ }
660
+ /** Code generation request */
661
+ export interface CodeGenerationRequest {
662
+ prompt: string;
663
+ language: string;
664
+ model?: string;
665
+ config?: CodeGenConfig;
666
+ context?: CodeContext;
667
+ }
668
+ /** Code gen config */
669
+ export interface CodeGenConfig {
670
+ maxTokens?: number;
671
+ temperature?: number;
672
+ stopSequences?: string[];
673
+ includeExplanation?: boolean;
674
+ includeTests?: boolean;
675
+ }
676
+ /** Code context */
677
+ export interface CodeContext {
678
+ files?: CodeFile[];
679
+ dependencies?: string[];
680
+ framework?: string;
681
+ style?: string;
682
+ }
683
+ /** Code file */
684
+ export interface CodeFile {
685
+ path: string;
686
+ content: string;
687
+ language?: string;
688
+ }
689
+ /** Code generation result */
690
+ export interface CodeGenerationResult {
691
+ id: string;
692
+ code: string;
693
+ language: string;
694
+ explanation?: string;
695
+ tests?: string;
696
+ suggestions?: CodeSuggestion[];
697
+ }
698
+ /** Code suggestion */
699
+ export interface CodeSuggestion {
700
+ type: 'completion' | 'refactor' | 'fix' | 'optimization';
701
+ code: string;
702
+ description?: string;
703
+ confidence?: number;
704
+ }
705
+ /** Code completion request */
706
+ export interface CodeCompletionRequest {
707
+ prefix: string;
708
+ suffix?: string;
709
+ language: string;
710
+ model?: string;
711
+ maxCompletions?: number;
712
+ }
713
+ /** Code completion result */
714
+ export interface CodeCompletionResult {
715
+ completions: CodeCompletion[];
716
+ }
717
+ /** Code completion */
718
+ export interface CodeCompletion {
719
+ text: string;
720
+ confidence?: number;
721
+ range?: CompletionRange;
722
+ }
723
+ /** Completion range */
724
+ export interface CompletionRange {
725
+ start: number;
726
+ end: number;
727
+ }
728
+ /** Model comparison session */
729
+ export interface ModelComparisonSession {
730
+ id: string;
731
+ name?: string;
732
+ models: ComparisonModel[];
733
+ prompts: ComparisonPrompt[];
734
+ results: ComparisonResult[];
735
+ summary?: ComparisonSummary;
736
+ createdAt: Date;
737
+ }
738
+ /** Comparison model */
739
+ export interface ComparisonModel {
740
+ id: string;
741
+ provider: LLMProvider;
742
+ model: string;
743
+ config?: LLMConfig;
744
+ }
745
+ /** Comparison prompt */
746
+ export interface ComparisonPrompt {
747
+ id: string;
748
+ messages: PlaygroundMessage[];
749
+ tags?: string[];
750
+ }
751
+ /** Comparison result */
752
+ export interface ComparisonResult {
753
+ promptId: string;
754
+ modelId: string;
755
+ response: string;
756
+ latency: number;
757
+ tokens: number;
758
+ cost?: number;
759
+ rating?: number;
760
+ }
761
+ /** Comparison summary */
762
+ export interface ComparisonSummary {
763
+ winner?: string;
764
+ metrics: ComparisonMetrics[];
765
+ analysis?: string;
766
+ }
767
+ /** Comparison metrics */
768
+ export interface ComparisonMetrics {
769
+ modelId: string;
770
+ averageLatency: number;
771
+ totalTokens: number;
772
+ totalCost?: number;
773
+ averageRating?: number;
774
+ }
775
+ /** Usage stats */
776
+ export interface AIUsageStats {
777
+ period: string;
778
+ requests: number;
779
+ tokens: UsageTokens;
780
+ cost: number;
781
+ byModel: ModelUsage[];
782
+ byTask: TaskUsage[];
783
+ timeline?: UsageTimeline;
784
+ }
785
+ /** Usage tokens */
786
+ export interface UsageTokens {
787
+ prompt: number;
788
+ completion: number;
789
+ total: number;
790
+ }
791
+ /** Model usage */
792
+ export interface ModelUsage {
793
+ model: string;
794
+ provider: string;
795
+ requests: number;
796
+ tokens: number;
797
+ cost: number;
798
+ }
799
+ /** Task usage */
800
+ export interface TaskUsage {
801
+ task: AITaskType;
802
+ requests: number;
803
+ tokens: number;
804
+ cost: number;
805
+ }
806
+ /** Usage timeline */
807
+ export interface UsageTimeline {
808
+ timestamps: Date[];
809
+ requests: number[];
810
+ tokens: number[];
811
+ cost: number[];
812
+ }
813
+ /** Playground history */
814
+ export interface PlaygroundHistory {
815
+ sessions: HistorySession[];
816
+ totalCount: number;
817
+ filters?: HistoryFilters;
818
+ }
819
+ /** History session */
820
+ export interface HistorySession {
821
+ id: string;
822
+ type: AITaskType;
823
+ model: string;
824
+ preview: string;
825
+ tokens?: number;
826
+ cost?: number;
827
+ createdAt: Date;
828
+ tags?: string[];
829
+ }
830
+ /** History filters */
831
+ export interface HistoryFilters {
832
+ dateRange?: DateRange;
833
+ models?: string[];
834
+ tasks?: AITaskType[];
835
+ tags?: string[];
836
+ }
837
+ /** Date range */
838
+ export interface DateRange {
839
+ start: Date;
840
+ end: Date;
841
+ }
842
+ //# sourceMappingURL=ai-playgrounds.d.ts.map