@docbrasil/api-systemmanager 1.1.38 → 1.1.40
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/api/ai.js +6 -1
- package/dist/bundle.cjs +6 -1
- package/doc/api.md +13 -8
- package/docs/MyndAI.html +166 -3
- package/docs/ai.js.html +6 -1
- package/package.json +1 -1
- package/.vscode/settings.json +0 -1
package/api/ai.js
CHANGED
|
@@ -54,8 +54,13 @@ class MyndAI {
|
|
|
54
54
|
* @param {string} params.model The model to use for the explain
|
|
55
55
|
* @param {object} params.context The context to apply to a prompt
|
|
56
56
|
* @param {string} params.text The text to add to the prompt
|
|
57
|
-
* @param {array<
|
|
57
|
+
* @param {array<object>} params.medias Medias to add (PDF, Image, Video, Audio)
|
|
58
|
+
* @param {string} params.medias.type can be base64 | document
|
|
59
|
+
* @param {string} params.medias.mime the mime type of the media
|
|
60
|
+
* @param {string} params.medias.base64 the base64 of the image (in the case the type is base64)
|
|
61
|
+
* @param {string} params.medias.document the document path for the image (in the case the type is document)
|
|
58
62
|
* @param {string} params.prompt The actual prompt with context and text to apply to
|
|
63
|
+
* @param {boolean} params.json=false If we return in json format or not
|
|
59
64
|
* @return {Promise<object>} data
|
|
60
65
|
* @return {boolean} data.success true|false for success
|
|
61
66
|
* @return {object} data.result the result of the AI call
|
package/dist/bundle.cjs
CHANGED
|
@@ -14110,8 +14110,13 @@ class MyndAI {
|
|
|
14110
14110
|
* @param {string} params.model The model to use for the explain
|
|
14111
14111
|
* @param {object} params.context The context to apply to a prompt
|
|
14112
14112
|
* @param {string} params.text The text to add to the prompt
|
|
14113
|
-
* @param {array<
|
|
14113
|
+
* @param {array<object>} params.medias Medias to add (PDF, Image, Video, Audio)
|
|
14114
|
+
* @param {string} params.medias.type can be base64 | document
|
|
14115
|
+
* @param {string} params.medias.mime the mime type of the media
|
|
14116
|
+
* @param {string} params.medias.base64 the base64 of the image (in the case the type is base64)
|
|
14117
|
+
* @param {string} params.medias.document the document path for the image (in the case the type is document)
|
|
14114
14118
|
* @param {string} params.prompt The actual prompt with context and text to apply to
|
|
14119
|
+
* @param {boolean} params.json=false If we return in json format or not
|
|
14115
14120
|
* @return {Promise<object>} data
|
|
14116
14121
|
* @return {boolean} data.success true|false for success
|
|
14117
14122
|
* @return {object} data.result the result of the AI call
|
package/doc/api.md
CHANGED
|
@@ -3914,14 +3914,19 @@ Create new document
|
|
|
3914
3914
|
**Access**: public
|
|
3915
3915
|
**Author**: Myndware <augusto.pissarra@myndware.com>
|
|
3916
3916
|
|
|
3917
|
-
| Param | Type | Description |
|
|
3918
|
-
| --- | --- | --- |
|
|
3919
|
-
| params | <code>object</code> | Object for add new document |
|
|
3920
|
-
| params.model | <code>string</code> | The model to use for the explain |
|
|
3921
|
-
| params.context | <code>object</code> | The context to apply to a prompt |
|
|
3922
|
-
| params.text | <code>string</code> | The text to add to the prompt |
|
|
3923
|
-
| params.medias | <code>array.<
|
|
3924
|
-
| params.
|
|
3917
|
+
| Param | Type | Default | Description |
|
|
3918
|
+
| --- | --- | --- | --- |
|
|
3919
|
+
| params | <code>object</code> | | Object for add new document |
|
|
3920
|
+
| params.model | <code>string</code> | | The model to use for the explain |
|
|
3921
|
+
| params.context | <code>object</code> | | The context to apply to a prompt |
|
|
3922
|
+
| params.text | <code>string</code> | | The text to add to the prompt |
|
|
3923
|
+
| params.medias | <code>array.<object></code> | | Medias to add (PDF, Image, Video, Audio) |
|
|
3924
|
+
| params.medias.type | <code>string</code> | | can be base64 | document |
|
|
3925
|
+
| params.medias.mime | <code>string</code> | | the mime type of the media |
|
|
3926
|
+
| params.medias.base64 | <code>string</code> | | the base64 of the image (in the case the type is base64) |
|
|
3927
|
+
| params.medias.document | <code>string</code> | | the document path for the image (in the case the type is document) |
|
|
3928
|
+
| params.prompt | <code>string</code> | | The actual prompt with context and text to apply to |
|
|
3929
|
+
| params.json | <code>boolean</code> | <code>false</code> | If we return in json format or not |
|
|
3925
3930
|
|
|
3926
3931
|
**Example**
|
|
3927
3932
|
```js
|
package/docs/MyndAI.html
CHANGED
|
@@ -269,6 +269,8 @@
|
|
|
269
269
|
|
|
270
270
|
|
|
271
271
|
|
|
272
|
+
<th>Default</th>
|
|
273
|
+
|
|
272
274
|
|
|
273
275
|
<th class="last">Description</th>
|
|
274
276
|
</tr>
|
|
@@ -295,6 +297,10 @@
|
|
|
295
297
|
|
|
296
298
|
|
|
297
299
|
|
|
300
|
+
<td class="default">
|
|
301
|
+
|
|
302
|
+
</td>
|
|
303
|
+
|
|
298
304
|
|
|
299
305
|
<td class="description last">Object for add new document</td>
|
|
300
306
|
</tr>
|
|
@@ -319,6 +325,10 @@
|
|
|
319
325
|
|
|
320
326
|
|
|
321
327
|
|
|
328
|
+
<td class="default">
|
|
329
|
+
|
|
330
|
+
</td>
|
|
331
|
+
|
|
322
332
|
|
|
323
333
|
<td class="description last">The model to use for the explain</td>
|
|
324
334
|
</tr>
|
|
@@ -342,6 +352,10 @@
|
|
|
342
352
|
|
|
343
353
|
|
|
344
354
|
|
|
355
|
+
<td class="default">
|
|
356
|
+
|
|
357
|
+
</td>
|
|
358
|
+
|
|
345
359
|
|
|
346
360
|
<td class="description last">The context to apply to a prompt</td>
|
|
347
361
|
</tr>
|
|
@@ -365,6 +379,10 @@
|
|
|
365
379
|
|
|
366
380
|
|
|
367
381
|
|
|
382
|
+
<td class="default">
|
|
383
|
+
|
|
384
|
+
</td>
|
|
385
|
+
|
|
368
386
|
|
|
369
387
|
<td class="description last">The text to add to the prompt</td>
|
|
370
388
|
</tr>
|
|
@@ -379,7 +397,7 @@
|
|
|
379
397
|
<td class="type">
|
|
380
398
|
|
|
381
399
|
|
|
382
|
-
<code class="param-type">array.<
|
|
400
|
+
<code class="param-type">array.<object></code>
|
|
383
401
|
|
|
384
402
|
|
|
385
403
|
|
|
@@ -388,8 +406,120 @@
|
|
|
388
406
|
|
|
389
407
|
|
|
390
408
|
|
|
409
|
+
<td class="default">
|
|
410
|
+
|
|
411
|
+
</td>
|
|
412
|
+
|
|
391
413
|
|
|
392
|
-
<td class="description last">Medias to add
|
|
414
|
+
<td class="description last">Medias to add (PDF, Image, Video, Audio)</td>
|
|
415
|
+
</tr>
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
<tr class="deep-level-1">
|
|
420
|
+
|
|
421
|
+
<td class="name"><code>medias.type</code></td>
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
<td class="type">
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
<code class="param-type">string</code>
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
</td>
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
<td class="default">
|
|
437
|
+
|
|
438
|
+
</td>
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
<td class="description last">can be base64 | document</td>
|
|
442
|
+
</tr>
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
<tr class="deep-level-1">
|
|
447
|
+
|
|
448
|
+
<td class="name"><code>medias.mime</code></td>
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
<td class="type">
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
<code class="param-type">string</code>
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
</td>
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
<td class="default">
|
|
464
|
+
|
|
465
|
+
</td>
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
<td class="description last">the mime type of the media</td>
|
|
469
|
+
</tr>
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
<tr class="deep-level-1">
|
|
474
|
+
|
|
475
|
+
<td class="name"><code>medias.base64</code></td>
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
<td class="type">
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
<code class="param-type">string</code>
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
</td>
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
<td class="default">
|
|
491
|
+
|
|
492
|
+
</td>
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
<td class="description last">the base64 of the image (in the case the type is base64)</td>
|
|
496
|
+
</tr>
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
<tr class="deep-level-1">
|
|
501
|
+
|
|
502
|
+
<td class="name"><code>medias.document</code></td>
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
<td class="type">
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
<code class="param-type">string</code>
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
</td>
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
<td class="default">
|
|
518
|
+
|
|
519
|
+
</td>
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
<td class="description last">the document path for the image (in the case the type is document)</td>
|
|
393
523
|
</tr>
|
|
394
524
|
|
|
395
525
|
|
|
@@ -411,11 +541,44 @@
|
|
|
411
541
|
|
|
412
542
|
|
|
413
543
|
|
|
544
|
+
<td class="default">
|
|
545
|
+
|
|
546
|
+
</td>
|
|
547
|
+
|
|
414
548
|
|
|
415
549
|
<td class="description last">The actual prompt with context and text to apply to</td>
|
|
416
550
|
</tr>
|
|
417
551
|
|
|
418
552
|
|
|
553
|
+
|
|
554
|
+
<tr class="deep-level-1">
|
|
555
|
+
|
|
556
|
+
<td class="name"><code>json</code></td>
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
<td class="type">
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
<code class="param-type">boolean</code>
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
</td>
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
<td class="default">
|
|
572
|
+
|
|
573
|
+
false
|
|
574
|
+
|
|
575
|
+
</td>
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
<td class="description last">If we return in json format or not</td>
|
|
579
|
+
</tr>
|
|
580
|
+
|
|
581
|
+
|
|
419
582
|
|
|
420
583
|
|
|
421
584
|
|
|
@@ -469,7 +632,7 @@
|
|
|
469
632
|
<p class="tag-source">
|
|
470
633
|
<a href="ai.js.html" class="button">View Source</a>
|
|
471
634
|
<span>
|
|
472
|
-
<a href="ai.js.html">ai.js</a>, <a href="ai.js.html#
|
|
635
|
+
<a href="ai.js.html">ai.js</a>, <a href="ai.js.html#line85">line 85</a>
|
|
473
636
|
</span>
|
|
474
637
|
</p>
|
|
475
638
|
|
package/docs/ai.js.html
CHANGED
|
@@ -141,8 +141,13 @@ class MyndAI {
|
|
|
141
141
|
* @param {string} params.model The model to use for the explain
|
|
142
142
|
* @param {object} params.context The context to apply to a prompt
|
|
143
143
|
* @param {string} params.text The text to add to the prompt
|
|
144
|
-
* @param {array<
|
|
144
|
+
* @param {array<object>} params.medias Medias to add (PDF, Image, Video, Audio)
|
|
145
|
+
* @param {string} params.medias.type can be base64 | document
|
|
146
|
+
* @param {string} params.medias.mime the mime type of the media
|
|
147
|
+
* @param {string} params.medias.base64 the base64 of the image (in the case the type is base64)
|
|
148
|
+
* @param {string} params.medias.document the document path for the image (in the case the type is document)
|
|
145
149
|
* @param {string} params.prompt The actual prompt with context and text to apply to
|
|
150
|
+
* @param {boolean} params.json=false If we return in json format or not
|
|
146
151
|
* @return {Promise<object>} data
|
|
147
152
|
* @return {boolean} data.success true|false for success
|
|
148
153
|
* @return {object} data.result the result of the AI call
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docbrasil/api-systemmanager",
|
|
3
3
|
"description": "Module API System Manager",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.40",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"htmldoc": "rm -rf docs && jsdoc api/** -d docs -t ./node_modules/better-docs",
|
|
7
7
|
"doc": "rm -rf doc && mkdir doc && jsdoc2md api/**/* api/* > doc/api.md",
|
package/.vscode/settings.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|