@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 CHANGED
@@ -1,9 +1,9 @@
1
1
  import colors from 'colors';
2
2
  import express from 'express';
3
+ import * as OpenApiValidator from 'express-openapi-validator';
3
4
  import http from 'http';
4
5
  import { Server } from 'socket.io';
5
6
  import spaceTrim, { spaceTrim as spaceTrim$1 } from 'spacetrim';
6
- import * as OpenApiValidator from 'express-openapi-validator';
7
7
  import swaggerUi from 'swagger-ui-express';
8
8
  import { forTime } from 'waitasecond';
9
9
  import { randomBytes } from 'crypto';
@@ -33,7 +33,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
33
33
  * @generated
34
34
  * @see https://github.com/webgptorg/promptbook
35
35
  */
36
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-29';
36
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-30';
37
37
  /**
38
38
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
39
39
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -4534,13 +4534,10 @@ const CsvFormatParser = {
4534
4534
  if (onProgress) {
4535
4535
  // Note: Report the CSV with all rows mapped so far
4536
4536
  /*
4537
- !!!!
4538
- // Report progress with updated value
4539
- const progressData = mappedData.map((row, i) =>
4540
- i > index ? { ...row, [outputParameterName]: PENDING_VALUE_PLACEHOLDER } : row,
4541
- );
4542
-
4543
-
4537
+ // TODO: [🛕] Report progress with all the rows including the pending ones
4538
+ const progressData = mappedData.map((row, i) =>
4539
+ i > index ? { ...row, [outputParameterName]: PENDING_VALUE_PLACEHOLDER } : row,
4540
+ );
4544
4541
  */
4545
4542
  await onProgress(unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
4546
4543
  }
@@ -7124,15 +7121,15 @@ async function $provideScriptingForNode(options) {
7124
7121
  * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
7125
7122
  */
7126
7123
 
7127
- // TODO: !!!! List running services from REMOTE_SERVER_URLS
7128
- // TODO: !!!! Import directly from YML
7124
+ // TODO: [🥺] List running services from REMOTE_SERVER_URLS
7125
+ // TODO: [🥺] Import directly from YML
7129
7126
  /**
7130
- * @private !!!! Decide how to expose this
7127
+ * @private [🥺] Decide how to expose this
7131
7128
  */
7132
7129
  const openapiJson = {
7133
7130
  openapi: '3.0.0',
7134
7131
  info: {
7135
- title: 'Promptbook Remote Server API (!!!! From YML)',
7132
+ title: 'Promptbook Remote Server API ([🥺] From YML)',
7136
7133
  version: '1.0.0',
7137
7134
  description: 'API documentation for the Promptbook Remote Server',
7138
7135
  },
@@ -7790,7 +7787,7 @@ function startRemoteServer(options) {
7790
7787
  response.setHeader('X-Powered-By', 'Promptbook engine');
7791
7788
  next();
7792
7789
  });
7793
- // TODO: !!!! Expose openapiJson to consumer and also allow to add new routes
7790
+ // TODO: [🥺] Expose openapiJson to consumer and also allow to add new routes
7794
7791
  app.use(OpenApiValidator.middleware({
7795
7792
  apiSpec: openapiJson,
7796
7793
  ignorePaths(path) {
@@ -8087,7 +8084,7 @@ function startRemoteServer(options) {
8087
8084
  promptResult = await llm.callCompletionModel(prompt);
8088
8085
  break;
8089
8086
  case 'EMBEDDING':
8090
- console.log('!!! llm');
8087
+ console.log('!!! llm (EMBEDDING)', llm);
8091
8088
  if (llm.callEmbeddingModel === undefined) {
8092
8089
  // Note: [0] This check should not be a thing
8093
8090
  throw new PipelineExecutionError(`Embedding model is not available`);