@promptbook/remote-server 0.92.0-29 → 0.92.0-30
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/esm/index.es.js +12 -15
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +2 -2
- package/esm/typings/src/config.d.ts +1 -1
- package/esm/typings/src/remote-server/openapi.d.ts +1 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +16 -19
- package/umd/index.umd.js.map +1 -1
|
@@ -35,7 +35,7 @@ import { DEFAULT_IS_VERBOSE } from '../config';
|
|
|
35
35
|
import { SET_IS_VERBOSE } from '../config';
|
|
36
36
|
import { DEFAULT_IS_AUTO_INSTALLED } from '../config';
|
|
37
37
|
import { DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME } from '../config';
|
|
38
|
-
import {
|
|
38
|
+
import { DEFAULT_MAX_REQUESTS_PER_MINUTE } from '../config';
|
|
39
39
|
import { MODEL_TRUST_LEVELS } from '../constants';
|
|
40
40
|
import { MODEL_ORDERS } from '../constants';
|
|
41
41
|
import { ORDER_OF_PIPELINE_JSON } from '../constants';
|
|
@@ -182,7 +182,7 @@ export { DEFAULT_IS_VERBOSE };
|
|
|
182
182
|
export { SET_IS_VERBOSE };
|
|
183
183
|
export { DEFAULT_IS_AUTO_INSTALLED };
|
|
184
184
|
export { DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME };
|
|
185
|
-
export {
|
|
185
|
+
export { DEFAULT_MAX_REQUESTS_PER_MINUTE };
|
|
186
186
|
export { MODEL_TRUST_LEVELS };
|
|
187
187
|
export { MODEL_ORDERS };
|
|
188
188
|
export { ORDER_OF_PIPELINE_JSON };
|
|
@@ -294,7 +294,7 @@ export declare const DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME = "getPipelin
|
|
|
294
294
|
*
|
|
295
295
|
* @public exported from `@promptbook/core`
|
|
296
296
|
*/
|
|
297
|
-
export declare const
|
|
297
|
+
export declare const DEFAULT_MAX_REQUESTS_PER_MINUTE = 60;
|
|
298
298
|
/**
|
|
299
299
|
* Indicates whether pipeline logic validation is enabled. When true, the pipeline logic is checked for consistency.
|
|
300
300
|
*
|
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.92.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.92.0-29`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.92.0-
|
|
3
|
+
"version": "0.92.0-30",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"module": "./esm/index.es.js",
|
|
52
52
|
"typings": "./esm/typings/src/_packages/remote-server.index.d.ts",
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@promptbook/core": "0.92.0-
|
|
54
|
+
"@promptbook/core": "0.92.0-30"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('colors'), require('express'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'colors', 'express', 'http', 'socket.io', 'spacetrim', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-remote-server"] = {}, global.colors, global.express, global.
|
|
5
|
-
})(this, (function (exports, colors, express, http, socket_io, spaceTrim,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('colors'), require('express'), require('express-openapi-validator'), require('http'), require('socket.io'), require('spacetrim'), require('swagger-ui-express'), require('waitasecond'), require('crypto'), require('child_process'), require('fs/promises'), require('path'), require('rxjs'), require('prettier'), require('prettier/parser-html'), require('crypto-js/enc-hex'), require('crypto-js/sha256'), require('crypto-js'), require('mime-types'), require('papaparse')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'colors', 'express', 'express-openapi-validator', 'http', 'socket.io', 'spacetrim', 'swagger-ui-express', 'waitasecond', 'crypto', 'child_process', 'fs/promises', 'path', 'rxjs', 'prettier', 'prettier/parser-html', 'crypto-js/enc-hex', 'crypto-js/sha256', 'crypto-js', 'mime-types', 'papaparse'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-remote-server"] = {}, global.colors, global.express, global.OpenApiValidator, global.http, global.socket_io, global.spaceTrim, global.swaggerUi, global.waitasecond, global.crypto, global.child_process, global.promises, global.path, global.rxjs, global.prettier, global.parserHtml, global.hexEncoder, global.sha256, global.cryptoJs, global.mimeTypes, global.papaparse));
|
|
5
|
+
})(this, (function (exports, colors, express, OpenApiValidator, http, socket_io, spaceTrim, swaggerUi, waitasecond, crypto, child_process, promises, path, rxjs, prettier, parserHtml, hexEncoder, sha256, cryptoJs, mimeTypes, papaparse) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
|
|
27
27
|
var colors__default = /*#__PURE__*/_interopDefaultLegacy(colors);
|
|
28
28
|
var express__default = /*#__PURE__*/_interopDefaultLegacy(express);
|
|
29
|
+
var OpenApiValidator__namespace = /*#__PURE__*/_interopNamespace(OpenApiValidator);
|
|
29
30
|
var http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
|
30
31
|
var spaceTrim__default = /*#__PURE__*/_interopDefaultLegacy(spaceTrim);
|
|
31
|
-
var OpenApiValidator__namespace = /*#__PURE__*/_interopNamespace(OpenApiValidator);
|
|
32
32
|
var swaggerUi__default = /*#__PURE__*/_interopDefaultLegacy(swaggerUi);
|
|
33
33
|
var parserHtml__default = /*#__PURE__*/_interopDefaultLegacy(parserHtml);
|
|
34
34
|
var hexEncoder__default = /*#__PURE__*/_interopDefaultLegacy(hexEncoder);
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* @generated
|
|
49
49
|
* @see https://github.com/webgptorg/promptbook
|
|
50
50
|
*/
|
|
51
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
51
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-30';
|
|
52
52
|
/**
|
|
53
53
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
54
54
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -4549,13 +4549,10 @@
|
|
|
4549
4549
|
if (onProgress) {
|
|
4550
4550
|
// Note: Report the CSV with all rows mapped so far
|
|
4551
4551
|
/*
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
);
|
|
4557
|
-
|
|
4558
|
-
|
|
4552
|
+
// TODO: [🛕] Report progress with all the rows including the pending ones
|
|
4553
|
+
const progressData = mappedData.map((row, i) =>
|
|
4554
|
+
i > index ? { ...row, [outputParameterName]: PENDING_VALUE_PLACEHOLDER } : row,
|
|
4555
|
+
);
|
|
4559
4556
|
*/
|
|
4560
4557
|
await onProgress(papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
|
|
4561
4558
|
}
|
|
@@ -7139,15 +7136,15 @@
|
|
|
7139
7136
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
7140
7137
|
*/
|
|
7141
7138
|
|
|
7142
|
-
// TODO:
|
|
7143
|
-
// TODO:
|
|
7139
|
+
// TODO: [🥺] List running services from REMOTE_SERVER_URLS
|
|
7140
|
+
// TODO: [🥺] Import directly from YML
|
|
7144
7141
|
/**
|
|
7145
|
-
* @private
|
|
7142
|
+
* @private [🥺] Decide how to expose this
|
|
7146
7143
|
*/
|
|
7147
7144
|
const openapiJson = {
|
|
7148
7145
|
openapi: '3.0.0',
|
|
7149
7146
|
info: {
|
|
7150
|
-
title: 'Promptbook Remote Server API (
|
|
7147
|
+
title: 'Promptbook Remote Server API ([🥺] From YML)',
|
|
7151
7148
|
version: '1.0.0',
|
|
7152
7149
|
description: 'API documentation for the Promptbook Remote Server',
|
|
7153
7150
|
},
|
|
@@ -7805,7 +7802,7 @@
|
|
|
7805
7802
|
response.setHeader('X-Powered-By', 'Promptbook engine');
|
|
7806
7803
|
next();
|
|
7807
7804
|
});
|
|
7808
|
-
// TODO:
|
|
7805
|
+
// TODO: [🥺] Expose openapiJson to consumer and also allow to add new routes
|
|
7809
7806
|
app.use(OpenApiValidator__namespace.middleware({
|
|
7810
7807
|
apiSpec: openapiJson,
|
|
7811
7808
|
ignorePaths(path) {
|
|
@@ -8102,7 +8099,7 @@
|
|
|
8102
8099
|
promptResult = await llm.callCompletionModel(prompt);
|
|
8103
8100
|
break;
|
|
8104
8101
|
case 'EMBEDDING':
|
|
8105
|
-
console.log('!!! llm');
|
|
8102
|
+
console.log('!!! llm (EMBEDDING)', llm);
|
|
8106
8103
|
if (llm.callEmbeddingModel === undefined) {
|
|
8107
8104
|
// Note: [0] This check should not be a thing
|
|
8108
8105
|
throw new PipelineExecutionError(`Embedding model is not available`);
|