digital-tools 2.0.2 → 2.1.1
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/CHANGELOG.md +17 -0
- package/package.json +3 -4
- package/src/define.js +267 -0
- package/src/entities/advertising.js +999 -0
- package/src/entities/ai.js +756 -0
- package/src/entities/analytics.js +1588 -0
- package/src/entities/automation.js +601 -0
- package/src/entities/communication.js +1150 -0
- package/src/entities/crm.js +1386 -0
- package/src/entities/design.js +546 -0
- package/src/entities/development.js +2212 -0
- package/src/entities/document.js +874 -0
- package/src/entities/ecommerce.js +1429 -0
- package/src/entities/experiment.js +1039 -0
- package/src/entities/finance.js +3478 -0
- package/src/entities/forms.js +1892 -0
- package/src/entities/hr.js +661 -0
- package/src/entities/identity.js +997 -0
- package/src/entities/index.js +282 -0
- package/src/entities/infrastructure.js +1153 -0
- package/src/entities/knowledge.js +1438 -0
- package/src/entities/marketing.js +1610 -0
- package/src/entities/media.js +1634 -0
- package/src/entities/notification.js +1199 -0
- package/src/entities/presentation.js +1274 -0
- package/src/entities/productivity.js +1317 -0
- package/src/entities/project-management.js +1136 -0
- package/src/entities/recruiting.js +736 -0
- package/src/entities/shipping.js +509 -0
- package/src/entities/signature.js +1102 -0
- package/src/entities/site.js +222 -0
- package/src/entities/spreadsheet.js +1341 -0
- package/src/entities/storage.js +1198 -0
- package/src/entities/support.js +1166 -0
- package/src/entities/video-conferencing.js +1750 -0
- package/src/entities/video.js +950 -0
- package/src/entities.js +1663 -0
- package/src/index.js +74 -0
- package/src/providers/analytics/index.js +17 -0
- package/src/providers/analytics/mixpanel.js +255 -0
- package/src/providers/calendar/cal-com.js +303 -0
- package/src/providers/calendar/google-calendar.js +335 -0
- package/src/providers/calendar/index.js +20 -0
- package/src/providers/crm/hubspot.js +566 -0
- package/src/providers/crm/index.js +17 -0
- package/src/providers/development/github.js +472 -0
- package/src/providers/development/index.js +17 -0
- package/src/providers/ecommerce/index.js +17 -0
- package/src/providers/ecommerce/shopify.js +378 -0
- package/src/providers/email/index.js +20 -0
- package/src/providers/email/resend.js +258 -0
- package/src/providers/email/sendgrid.js +161 -0
- package/src/providers/finance/index.js +17 -0
- package/src/providers/finance/stripe.js +549 -0
- package/src/providers/forms/index.js +17 -0
- package/src/providers/forms/typeform.js +500 -0
- package/src/providers/index.js +123 -0
- package/src/providers/knowledge/index.js +17 -0
- package/src/providers/knowledge/notion.js +389 -0
- package/src/providers/marketing/index.js +17 -0
- package/src/providers/marketing/mailchimp.js +443 -0
- package/src/providers/media/cloudinary.js +318 -0
- package/src/providers/media/index.js +17 -0
- package/src/providers/messaging/index.js +20 -0
- package/src/providers/messaging/slack.js +393 -0
- package/src/providers/messaging/twilio-sms.js +249 -0
- package/src/providers/project-management/index.js +17 -0
- package/src/providers/project-management/linear.js +575 -0
- package/src/providers/registry.js +86 -0
- package/src/providers/spreadsheet/google-sheets.js +375 -0
- package/src/providers/spreadsheet/index.js +20 -0
- package/src/providers/spreadsheet/xlsx.js +423 -0
- package/src/providers/storage/index.js +24 -0
- package/src/providers/storage/s3.js +419 -0
- package/src/providers/support/index.js +17 -0
- package/src/providers/support/zendesk.js +373 -0
- package/src/providers/tasks/index.js +17 -0
- package/src/providers/tasks/todoist.js +286 -0
- package/src/providers/types.js +9 -0
- package/src/providers/video-conferencing/google-meet.js +286 -0
- package/src/providers/video-conferencing/index.js +31 -0
- package/src/providers/video-conferencing/jitsi.js +254 -0
- package/src/providers/video-conferencing/teams.js +270 -0
- package/src/providers/video-conferencing/zoom.js +332 -0
- package/src/registry.js +128 -0
- package/src/tools/communication.js +184 -0
- package/src/tools/data.js +205 -0
- package/src/tools/index.js +11 -0
- package/src/tools/web.js +137 -0
- package/src/types.js +10 -0
- package/test/define.test.js +306 -0
- package/test/registry.test.js +357 -0
- package/test/tools.test.js +363 -0
|
@@ -0,0 +1,756 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Entity Types (Nouns)
|
|
3
|
+
*
|
|
4
|
+
* AI and machine learning entities for models, prompts,
|
|
5
|
+
* completions, agents, and embeddings.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// Model
|
|
11
|
+
// =============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Model entity
|
|
14
|
+
*
|
|
15
|
+
* Represents an AI/ML model.
|
|
16
|
+
*/
|
|
17
|
+
export const Model = {
|
|
18
|
+
singular: 'model',
|
|
19
|
+
plural: 'models',
|
|
20
|
+
description: 'An AI/ML model',
|
|
21
|
+
properties: {
|
|
22
|
+
// Identity
|
|
23
|
+
name: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'Model name',
|
|
26
|
+
},
|
|
27
|
+
provider: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'Model provider',
|
|
30
|
+
examples: ['openai', 'anthropic', 'google', 'meta', 'mistral', 'cohere', 'custom'],
|
|
31
|
+
},
|
|
32
|
+
modelId: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
description: 'Provider model ID',
|
|
35
|
+
},
|
|
36
|
+
// Type
|
|
37
|
+
type: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Model type',
|
|
40
|
+
examples: ['chat', 'completion', 'embedding', 'image', 'audio', 'video', 'multimodal'],
|
|
41
|
+
},
|
|
42
|
+
// Capabilities
|
|
43
|
+
contextWindow: {
|
|
44
|
+
type: 'number',
|
|
45
|
+
optional: true,
|
|
46
|
+
description: 'Context window size in tokens',
|
|
47
|
+
},
|
|
48
|
+
maxOutputTokens: {
|
|
49
|
+
type: 'number',
|
|
50
|
+
optional: true,
|
|
51
|
+
description: 'Max output tokens',
|
|
52
|
+
},
|
|
53
|
+
supportsStreaming: {
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
optional: true,
|
|
56
|
+
description: 'Supports streaming',
|
|
57
|
+
},
|
|
58
|
+
supportsTools: {
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
optional: true,
|
|
61
|
+
description: 'Supports tool/function calling',
|
|
62
|
+
},
|
|
63
|
+
supportsVision: {
|
|
64
|
+
type: 'boolean',
|
|
65
|
+
optional: true,
|
|
66
|
+
description: 'Supports image input',
|
|
67
|
+
},
|
|
68
|
+
// Pricing
|
|
69
|
+
inputCostPer1k: {
|
|
70
|
+
type: 'number',
|
|
71
|
+
optional: true,
|
|
72
|
+
description: 'Cost per 1k input tokens',
|
|
73
|
+
},
|
|
74
|
+
outputCostPer1k: {
|
|
75
|
+
type: 'number',
|
|
76
|
+
optional: true,
|
|
77
|
+
description: 'Cost per 1k output tokens',
|
|
78
|
+
},
|
|
79
|
+
currency: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
optional: true,
|
|
82
|
+
description: 'Currency',
|
|
83
|
+
},
|
|
84
|
+
// Status
|
|
85
|
+
status: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
optional: true,
|
|
88
|
+
description: 'Model status',
|
|
89
|
+
examples: ['available', 'deprecated', 'beta', 'preview'],
|
|
90
|
+
},
|
|
91
|
+
isActive: {
|
|
92
|
+
type: 'boolean',
|
|
93
|
+
description: 'Whether model is active',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
relationships: {
|
|
97
|
+
completions: {
|
|
98
|
+
type: 'Completion[]',
|
|
99
|
+
description: 'Completions using this model',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
actions: [
|
|
103
|
+
'create',
|
|
104
|
+
'update',
|
|
105
|
+
'activate',
|
|
106
|
+
'deactivate',
|
|
107
|
+
'test',
|
|
108
|
+
],
|
|
109
|
+
events: [
|
|
110
|
+
'created',
|
|
111
|
+
'updated',
|
|
112
|
+
'activated',
|
|
113
|
+
'deactivated',
|
|
114
|
+
'deprecated',
|
|
115
|
+
],
|
|
116
|
+
};
|
|
117
|
+
// =============================================================================
|
|
118
|
+
// Prompt
|
|
119
|
+
// =============================================================================
|
|
120
|
+
/**
|
|
121
|
+
* Prompt entity
|
|
122
|
+
*
|
|
123
|
+
* Represents a reusable prompt template.
|
|
124
|
+
*/
|
|
125
|
+
export const Prompt = {
|
|
126
|
+
singular: 'prompt',
|
|
127
|
+
plural: 'prompts',
|
|
128
|
+
description: 'A reusable prompt template',
|
|
129
|
+
properties: {
|
|
130
|
+
// Identity
|
|
131
|
+
name: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: 'Prompt name',
|
|
134
|
+
},
|
|
135
|
+
slug: {
|
|
136
|
+
type: 'string',
|
|
137
|
+
optional: true,
|
|
138
|
+
description: 'URL-friendly identifier',
|
|
139
|
+
},
|
|
140
|
+
description: {
|
|
141
|
+
type: 'string',
|
|
142
|
+
optional: true,
|
|
143
|
+
description: 'Prompt description',
|
|
144
|
+
},
|
|
145
|
+
// Content
|
|
146
|
+
template: {
|
|
147
|
+
type: 'string',
|
|
148
|
+
description: 'Prompt template with variables',
|
|
149
|
+
},
|
|
150
|
+
systemPrompt: {
|
|
151
|
+
type: 'string',
|
|
152
|
+
optional: true,
|
|
153
|
+
description: 'System prompt',
|
|
154
|
+
},
|
|
155
|
+
variables: {
|
|
156
|
+
type: 'json',
|
|
157
|
+
optional: true,
|
|
158
|
+
description: 'Template variables definition',
|
|
159
|
+
},
|
|
160
|
+
// Configuration
|
|
161
|
+
defaultModel: {
|
|
162
|
+
type: 'string',
|
|
163
|
+
optional: true,
|
|
164
|
+
description: 'Default model to use',
|
|
165
|
+
},
|
|
166
|
+
temperature: {
|
|
167
|
+
type: 'number',
|
|
168
|
+
optional: true,
|
|
169
|
+
description: 'Temperature setting',
|
|
170
|
+
},
|
|
171
|
+
maxTokens: {
|
|
172
|
+
type: 'number',
|
|
173
|
+
optional: true,
|
|
174
|
+
description: 'Max output tokens',
|
|
175
|
+
},
|
|
176
|
+
topP: {
|
|
177
|
+
type: 'number',
|
|
178
|
+
optional: true,
|
|
179
|
+
description: 'Top-p sampling',
|
|
180
|
+
},
|
|
181
|
+
stopSequences: {
|
|
182
|
+
type: 'string',
|
|
183
|
+
array: true,
|
|
184
|
+
optional: true,
|
|
185
|
+
description: 'Stop sequences',
|
|
186
|
+
},
|
|
187
|
+
// Organization
|
|
188
|
+
category: {
|
|
189
|
+
type: 'string',
|
|
190
|
+
optional: true,
|
|
191
|
+
description: 'Prompt category',
|
|
192
|
+
},
|
|
193
|
+
tags: {
|
|
194
|
+
type: 'string',
|
|
195
|
+
array: true,
|
|
196
|
+
optional: true,
|
|
197
|
+
description: 'Tags',
|
|
198
|
+
},
|
|
199
|
+
// Versioning
|
|
200
|
+
version: {
|
|
201
|
+
type: 'string',
|
|
202
|
+
optional: true,
|
|
203
|
+
description: 'Version',
|
|
204
|
+
},
|
|
205
|
+
isPublished: {
|
|
206
|
+
type: 'boolean',
|
|
207
|
+
optional: true,
|
|
208
|
+
description: 'Whether published',
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
relationships: {
|
|
212
|
+
owner: {
|
|
213
|
+
type: 'User',
|
|
214
|
+
description: 'Prompt owner',
|
|
215
|
+
},
|
|
216
|
+
completions: {
|
|
217
|
+
type: 'Completion[]',
|
|
218
|
+
description: 'Completions using this prompt',
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
actions: [
|
|
222
|
+
'create',
|
|
223
|
+
'update',
|
|
224
|
+
'publish',
|
|
225
|
+
'unpublish',
|
|
226
|
+
'duplicate',
|
|
227
|
+
'version',
|
|
228
|
+
'test',
|
|
229
|
+
],
|
|
230
|
+
events: [
|
|
231
|
+
'created',
|
|
232
|
+
'updated',
|
|
233
|
+
'published',
|
|
234
|
+
'unpublished',
|
|
235
|
+
'versioned',
|
|
236
|
+
],
|
|
237
|
+
};
|
|
238
|
+
// =============================================================================
|
|
239
|
+
// Completion
|
|
240
|
+
// =============================================================================
|
|
241
|
+
/**
|
|
242
|
+
* Completion entity
|
|
243
|
+
*
|
|
244
|
+
* Represents an AI completion/response.
|
|
245
|
+
*/
|
|
246
|
+
export const Completion = {
|
|
247
|
+
singular: 'completion',
|
|
248
|
+
plural: 'completions',
|
|
249
|
+
description: 'An AI completion or response',
|
|
250
|
+
properties: {
|
|
251
|
+
// Request
|
|
252
|
+
input: {
|
|
253
|
+
type: 'string',
|
|
254
|
+
description: 'Input prompt/messages',
|
|
255
|
+
},
|
|
256
|
+
systemPrompt: {
|
|
257
|
+
type: 'string',
|
|
258
|
+
optional: true,
|
|
259
|
+
description: 'System prompt used',
|
|
260
|
+
},
|
|
261
|
+
// Response
|
|
262
|
+
output: {
|
|
263
|
+
type: 'string',
|
|
264
|
+
description: 'Model output',
|
|
265
|
+
},
|
|
266
|
+
finishReason: {
|
|
267
|
+
type: 'string',
|
|
268
|
+
optional: true,
|
|
269
|
+
description: 'Finish reason',
|
|
270
|
+
examples: ['stop', 'length', 'tool_calls', 'content_filter'],
|
|
271
|
+
},
|
|
272
|
+
// Usage
|
|
273
|
+
inputTokens: {
|
|
274
|
+
type: 'number',
|
|
275
|
+
optional: true,
|
|
276
|
+
description: 'Input tokens used',
|
|
277
|
+
},
|
|
278
|
+
outputTokens: {
|
|
279
|
+
type: 'number',
|
|
280
|
+
optional: true,
|
|
281
|
+
description: 'Output tokens generated',
|
|
282
|
+
},
|
|
283
|
+
totalTokens: {
|
|
284
|
+
type: 'number',
|
|
285
|
+
optional: true,
|
|
286
|
+
description: 'Total tokens',
|
|
287
|
+
},
|
|
288
|
+
// Cost
|
|
289
|
+
cost: {
|
|
290
|
+
type: 'number',
|
|
291
|
+
optional: true,
|
|
292
|
+
description: 'Cost in USD',
|
|
293
|
+
},
|
|
294
|
+
// Timing
|
|
295
|
+
latency: {
|
|
296
|
+
type: 'number',
|
|
297
|
+
optional: true,
|
|
298
|
+
description: 'Latency in milliseconds',
|
|
299
|
+
},
|
|
300
|
+
timeToFirstToken: {
|
|
301
|
+
type: 'number',
|
|
302
|
+
optional: true,
|
|
303
|
+
description: 'Time to first token in ms',
|
|
304
|
+
},
|
|
305
|
+
// Configuration used
|
|
306
|
+
modelId: {
|
|
307
|
+
type: 'string',
|
|
308
|
+
description: 'Model used',
|
|
309
|
+
},
|
|
310
|
+
temperature: {
|
|
311
|
+
type: 'number',
|
|
312
|
+
optional: true,
|
|
313
|
+
description: 'Temperature used',
|
|
314
|
+
},
|
|
315
|
+
maxTokens: {
|
|
316
|
+
type: 'number',
|
|
317
|
+
optional: true,
|
|
318
|
+
description: 'Max tokens setting',
|
|
319
|
+
},
|
|
320
|
+
// Metadata
|
|
321
|
+
requestId: {
|
|
322
|
+
type: 'string',
|
|
323
|
+
optional: true,
|
|
324
|
+
description: 'Provider request ID',
|
|
325
|
+
},
|
|
326
|
+
status: {
|
|
327
|
+
type: 'string',
|
|
328
|
+
description: 'Completion status',
|
|
329
|
+
examples: ['completed', 'failed', 'cancelled'],
|
|
330
|
+
},
|
|
331
|
+
error: {
|
|
332
|
+
type: 'string',
|
|
333
|
+
optional: true,
|
|
334
|
+
description: 'Error message if failed',
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
relationships: {
|
|
338
|
+
model: {
|
|
339
|
+
type: 'Model',
|
|
340
|
+
description: 'Model used',
|
|
341
|
+
},
|
|
342
|
+
prompt: {
|
|
343
|
+
type: 'Prompt',
|
|
344
|
+
required: false,
|
|
345
|
+
description: 'Prompt template used',
|
|
346
|
+
},
|
|
347
|
+
conversation: {
|
|
348
|
+
type: 'Conversation',
|
|
349
|
+
required: false,
|
|
350
|
+
description: 'Parent conversation',
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
actions: [
|
|
354
|
+
'create',
|
|
355
|
+
'cancel',
|
|
356
|
+
'retry',
|
|
357
|
+
],
|
|
358
|
+
events: [
|
|
359
|
+
'started',
|
|
360
|
+
'streamed',
|
|
361
|
+
'completed',
|
|
362
|
+
'failed',
|
|
363
|
+
'cancelled',
|
|
364
|
+
],
|
|
365
|
+
};
|
|
366
|
+
// =============================================================================
|
|
367
|
+
// AIConversation
|
|
368
|
+
// =============================================================================
|
|
369
|
+
/**
|
|
370
|
+
* AIConversation entity
|
|
371
|
+
*
|
|
372
|
+
* Represents a conversation/chat session.
|
|
373
|
+
*/
|
|
374
|
+
export const AIConversation = {
|
|
375
|
+
singular: 'ai-conversation',
|
|
376
|
+
plural: 'ai-conversations',
|
|
377
|
+
description: 'An AI conversation or chat session',
|
|
378
|
+
properties: {
|
|
379
|
+
// Identity
|
|
380
|
+
title: {
|
|
381
|
+
type: 'string',
|
|
382
|
+
optional: true,
|
|
383
|
+
description: 'Conversation title',
|
|
384
|
+
},
|
|
385
|
+
// Configuration
|
|
386
|
+
systemPrompt: {
|
|
387
|
+
type: 'string',
|
|
388
|
+
optional: true,
|
|
389
|
+
description: 'System prompt',
|
|
390
|
+
},
|
|
391
|
+
modelId: {
|
|
392
|
+
type: 'string',
|
|
393
|
+
optional: true,
|
|
394
|
+
description: 'Default model',
|
|
395
|
+
},
|
|
396
|
+
// Stats
|
|
397
|
+
messageCount: {
|
|
398
|
+
type: 'number',
|
|
399
|
+
optional: true,
|
|
400
|
+
description: 'Number of messages',
|
|
401
|
+
},
|
|
402
|
+
totalTokens: {
|
|
403
|
+
type: 'number',
|
|
404
|
+
optional: true,
|
|
405
|
+
description: 'Total tokens used',
|
|
406
|
+
},
|
|
407
|
+
totalCost: {
|
|
408
|
+
type: 'number',
|
|
409
|
+
optional: true,
|
|
410
|
+
description: 'Total cost',
|
|
411
|
+
},
|
|
412
|
+
// Dates
|
|
413
|
+
lastMessageAt: {
|
|
414
|
+
type: 'datetime',
|
|
415
|
+
optional: true,
|
|
416
|
+
description: 'Last message time',
|
|
417
|
+
},
|
|
418
|
+
// Status
|
|
419
|
+
status: {
|
|
420
|
+
type: 'string',
|
|
421
|
+
optional: true,
|
|
422
|
+
description: 'Conversation status',
|
|
423
|
+
examples: ['active', 'archived'],
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
relationships: {
|
|
427
|
+
user: {
|
|
428
|
+
type: 'User',
|
|
429
|
+
description: 'Conversation owner',
|
|
430
|
+
},
|
|
431
|
+
messages: {
|
|
432
|
+
type: 'Completion[]',
|
|
433
|
+
description: 'Conversation messages',
|
|
434
|
+
},
|
|
435
|
+
agent: {
|
|
436
|
+
type: 'Agent',
|
|
437
|
+
required: false,
|
|
438
|
+
description: 'Agent if using one',
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
actions: [
|
|
442
|
+
'create',
|
|
443
|
+
'update',
|
|
444
|
+
'archive',
|
|
445
|
+
'delete',
|
|
446
|
+
'fork',
|
|
447
|
+
],
|
|
448
|
+
events: [
|
|
449
|
+
'created',
|
|
450
|
+
'updated',
|
|
451
|
+
'messageAdded',
|
|
452
|
+
'archived',
|
|
453
|
+
'deleted',
|
|
454
|
+
],
|
|
455
|
+
};
|
|
456
|
+
// =============================================================================
|
|
457
|
+
// Agent
|
|
458
|
+
// =============================================================================
|
|
459
|
+
/**
|
|
460
|
+
* Agent entity
|
|
461
|
+
*
|
|
462
|
+
* Represents an AI agent with tools and capabilities.
|
|
463
|
+
*/
|
|
464
|
+
export const Agent = {
|
|
465
|
+
singular: 'agent',
|
|
466
|
+
plural: 'agents',
|
|
467
|
+
description: 'An AI agent with tools and capabilities',
|
|
468
|
+
properties: {
|
|
469
|
+
// Identity
|
|
470
|
+
name: {
|
|
471
|
+
type: 'string',
|
|
472
|
+
description: 'Agent name',
|
|
473
|
+
},
|
|
474
|
+
description: {
|
|
475
|
+
type: 'string',
|
|
476
|
+
optional: true,
|
|
477
|
+
description: 'Agent description',
|
|
478
|
+
},
|
|
479
|
+
avatarUrl: {
|
|
480
|
+
type: 'url',
|
|
481
|
+
optional: true,
|
|
482
|
+
description: 'Agent avatar URL',
|
|
483
|
+
},
|
|
484
|
+
// Configuration
|
|
485
|
+
systemPrompt: {
|
|
486
|
+
type: 'string',
|
|
487
|
+
optional: true,
|
|
488
|
+
description: 'System prompt',
|
|
489
|
+
},
|
|
490
|
+
modelId: {
|
|
491
|
+
type: 'string',
|
|
492
|
+
description: 'Default model',
|
|
493
|
+
},
|
|
494
|
+
temperature: {
|
|
495
|
+
type: 'number',
|
|
496
|
+
optional: true,
|
|
497
|
+
description: 'Temperature',
|
|
498
|
+
},
|
|
499
|
+
// Tools
|
|
500
|
+
tools: {
|
|
501
|
+
type: 'json',
|
|
502
|
+
optional: true,
|
|
503
|
+
description: 'Available tools/functions',
|
|
504
|
+
},
|
|
505
|
+
allowedTools: {
|
|
506
|
+
type: 'string',
|
|
507
|
+
array: true,
|
|
508
|
+
optional: true,
|
|
509
|
+
description: 'Allowed tool names',
|
|
510
|
+
},
|
|
511
|
+
// Behavior
|
|
512
|
+
maxIterations: {
|
|
513
|
+
type: 'number',
|
|
514
|
+
optional: true,
|
|
515
|
+
description: 'Max tool call iterations',
|
|
516
|
+
},
|
|
517
|
+
returnIntermediateSteps: {
|
|
518
|
+
type: 'boolean',
|
|
519
|
+
optional: true,
|
|
520
|
+
description: 'Return intermediate steps',
|
|
521
|
+
},
|
|
522
|
+
// Status
|
|
523
|
+
status: {
|
|
524
|
+
type: 'string',
|
|
525
|
+
description: 'Agent status',
|
|
526
|
+
examples: ['draft', 'active', 'paused', 'archived'],
|
|
527
|
+
},
|
|
528
|
+
isPublic: {
|
|
529
|
+
type: 'boolean',
|
|
530
|
+
optional: true,
|
|
531
|
+
description: 'Whether agent is public',
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
relationships: {
|
|
535
|
+
owner: {
|
|
536
|
+
type: 'User',
|
|
537
|
+
description: 'Agent owner',
|
|
538
|
+
},
|
|
539
|
+
conversations: {
|
|
540
|
+
type: 'AIConversation[]',
|
|
541
|
+
description: 'Conversations with agent',
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
|
+
actions: [
|
|
545
|
+
'create',
|
|
546
|
+
'update',
|
|
547
|
+
'activate',
|
|
548
|
+
'pause',
|
|
549
|
+
'archive',
|
|
550
|
+
'duplicate',
|
|
551
|
+
'invoke',
|
|
552
|
+
],
|
|
553
|
+
events: [
|
|
554
|
+
'created',
|
|
555
|
+
'updated',
|
|
556
|
+
'activated',
|
|
557
|
+
'paused',
|
|
558
|
+
'archived',
|
|
559
|
+
'invoked',
|
|
560
|
+
],
|
|
561
|
+
};
|
|
562
|
+
// =============================================================================
|
|
563
|
+
// Embedding
|
|
564
|
+
// =============================================================================
|
|
565
|
+
/**
|
|
566
|
+
* Embedding entity
|
|
567
|
+
*
|
|
568
|
+
* Represents a vector embedding.
|
|
569
|
+
*/
|
|
570
|
+
export const Embedding = {
|
|
571
|
+
singular: 'embedding',
|
|
572
|
+
plural: 'embeddings',
|
|
573
|
+
description: 'A vector embedding',
|
|
574
|
+
properties: {
|
|
575
|
+
// Content
|
|
576
|
+
text: {
|
|
577
|
+
type: 'string',
|
|
578
|
+
description: 'Source text',
|
|
579
|
+
},
|
|
580
|
+
vector: {
|
|
581
|
+
type: 'json',
|
|
582
|
+
description: 'Embedding vector',
|
|
583
|
+
},
|
|
584
|
+
dimensions: {
|
|
585
|
+
type: 'number',
|
|
586
|
+
description: 'Vector dimensions',
|
|
587
|
+
},
|
|
588
|
+
// Source
|
|
589
|
+
sourceType: {
|
|
590
|
+
type: 'string',
|
|
591
|
+
optional: true,
|
|
592
|
+
description: 'Source type',
|
|
593
|
+
examples: ['document', 'chunk', 'query', 'image'],
|
|
594
|
+
},
|
|
595
|
+
sourceId: {
|
|
596
|
+
type: 'string',
|
|
597
|
+
optional: true,
|
|
598
|
+
description: 'Source document/item ID',
|
|
599
|
+
},
|
|
600
|
+
// Metadata
|
|
601
|
+
modelId: {
|
|
602
|
+
type: 'string',
|
|
603
|
+
description: 'Model used',
|
|
604
|
+
},
|
|
605
|
+
namespace: {
|
|
606
|
+
type: 'string',
|
|
607
|
+
optional: true,
|
|
608
|
+
description: 'Vector namespace',
|
|
609
|
+
},
|
|
610
|
+
metadata: {
|
|
611
|
+
type: 'json',
|
|
612
|
+
optional: true,
|
|
613
|
+
description: 'Additional metadata',
|
|
614
|
+
},
|
|
615
|
+
// Tokens
|
|
616
|
+
tokenCount: {
|
|
617
|
+
type: 'number',
|
|
618
|
+
optional: true,
|
|
619
|
+
description: 'Token count',
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
relationships: {},
|
|
623
|
+
actions: [
|
|
624
|
+
'create',
|
|
625
|
+
'delete',
|
|
626
|
+
'search',
|
|
627
|
+
],
|
|
628
|
+
events: [
|
|
629
|
+
'created',
|
|
630
|
+
'deleted',
|
|
631
|
+
],
|
|
632
|
+
};
|
|
633
|
+
// =============================================================================
|
|
634
|
+
// FineTune
|
|
635
|
+
// =============================================================================
|
|
636
|
+
/**
|
|
637
|
+
* FineTune entity
|
|
638
|
+
*
|
|
639
|
+
* Represents a fine-tuning job.
|
|
640
|
+
*/
|
|
641
|
+
export const FineTune = {
|
|
642
|
+
singular: 'fine-tune',
|
|
643
|
+
plural: 'fine-tunes',
|
|
644
|
+
description: 'A model fine-tuning job',
|
|
645
|
+
properties: {
|
|
646
|
+
// Identity
|
|
647
|
+
name: {
|
|
648
|
+
type: 'string',
|
|
649
|
+
optional: true,
|
|
650
|
+
description: 'Fine-tune name',
|
|
651
|
+
},
|
|
652
|
+
// Base model
|
|
653
|
+
baseModel: {
|
|
654
|
+
type: 'string',
|
|
655
|
+
description: 'Base model ID',
|
|
656
|
+
},
|
|
657
|
+
fineTunedModel: {
|
|
658
|
+
type: 'string',
|
|
659
|
+
optional: true,
|
|
660
|
+
description: 'Resulting fine-tuned model ID',
|
|
661
|
+
},
|
|
662
|
+
// Status
|
|
663
|
+
status: {
|
|
664
|
+
type: 'string',
|
|
665
|
+
description: 'Job status',
|
|
666
|
+
examples: ['pending', 'running', 'succeeded', 'failed', 'cancelled'],
|
|
667
|
+
},
|
|
668
|
+
// Training
|
|
669
|
+
trainingFile: {
|
|
670
|
+
type: 'string',
|
|
671
|
+
description: 'Training data file ID',
|
|
672
|
+
},
|
|
673
|
+
validationFile: {
|
|
674
|
+
type: 'string',
|
|
675
|
+
optional: true,
|
|
676
|
+
description: 'Validation data file ID',
|
|
677
|
+
},
|
|
678
|
+
// Hyperparameters
|
|
679
|
+
epochs: {
|
|
680
|
+
type: 'number',
|
|
681
|
+
optional: true,
|
|
682
|
+
description: 'Training epochs',
|
|
683
|
+
},
|
|
684
|
+
batchSize: {
|
|
685
|
+
type: 'number',
|
|
686
|
+
optional: true,
|
|
687
|
+
description: 'Batch size',
|
|
688
|
+
},
|
|
689
|
+
learningRate: {
|
|
690
|
+
type: 'number',
|
|
691
|
+
optional: true,
|
|
692
|
+
description: 'Learning rate',
|
|
693
|
+
},
|
|
694
|
+
// Progress
|
|
695
|
+
trainedTokens: {
|
|
696
|
+
type: 'number',
|
|
697
|
+
optional: true,
|
|
698
|
+
description: 'Tokens trained',
|
|
699
|
+
},
|
|
700
|
+
// Timing
|
|
701
|
+
startedAt: {
|
|
702
|
+
type: 'datetime',
|
|
703
|
+
optional: true,
|
|
704
|
+
description: 'Start time',
|
|
705
|
+
},
|
|
706
|
+
completedAt: {
|
|
707
|
+
type: 'datetime',
|
|
708
|
+
optional: true,
|
|
709
|
+
description: 'Completion time',
|
|
710
|
+
},
|
|
711
|
+
// Error
|
|
712
|
+
error: {
|
|
713
|
+
type: 'string',
|
|
714
|
+
optional: true,
|
|
715
|
+
description: 'Error message',
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
relationships: {
|
|
719
|
+
owner: {
|
|
720
|
+
type: 'User',
|
|
721
|
+
description: 'Job owner',
|
|
722
|
+
},
|
|
723
|
+
},
|
|
724
|
+
actions: [
|
|
725
|
+
'create',
|
|
726
|
+
'cancel',
|
|
727
|
+
],
|
|
728
|
+
events: [
|
|
729
|
+
'created',
|
|
730
|
+
'started',
|
|
731
|
+
'progressed',
|
|
732
|
+
'succeeded',
|
|
733
|
+
'failed',
|
|
734
|
+
'cancelled',
|
|
735
|
+
],
|
|
736
|
+
};
|
|
737
|
+
// =============================================================================
|
|
738
|
+
// Exports
|
|
739
|
+
// =============================================================================
|
|
740
|
+
export const AIEntities = {
|
|
741
|
+
Model,
|
|
742
|
+
Prompt,
|
|
743
|
+
Completion,
|
|
744
|
+
AIConversation,
|
|
745
|
+
Agent,
|
|
746
|
+
Embedding,
|
|
747
|
+
FineTune,
|
|
748
|
+
};
|
|
749
|
+
export const AICategories = {
|
|
750
|
+
models: ['Model', 'FineTune'],
|
|
751
|
+
prompts: ['Prompt'],
|
|
752
|
+
completions: ['Completion'],
|
|
753
|
+
conversations: ['AIConversation'],
|
|
754
|
+
agents: ['Agent'],
|
|
755
|
+
embeddings: ['Embedding'],
|
|
756
|
+
};
|