@promptbook/pdf 0.92.0-16 → 0.92.0-18

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
@@ -26,7 +26,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
26
26
  * @generated
27
27
  * @see https://github.com/webgptorg/promptbook
28
28
  */
29
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-16';
29
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-18';
30
30
  /**
31
31
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
32
32
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -5248,7 +5248,7 @@ function knowledgePiecesToString(knowledgePieces) {
5248
5248
  * @private internal utility of `createPipelineExecutor`
5249
5249
  */
5250
5250
  async function getKnowledgeForTask(options) {
5251
- const { tools, preparedPipeline, task } = options;
5251
+ const { tools, preparedPipeline, task, parameters } = options;
5252
5252
  const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
5253
5253
  const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
5254
5254
  // <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
@@ -5266,9 +5266,7 @@ async function getKnowledgeForTask(options) {
5266
5266
  modelName: firstKnowlegeIndex.modelName,
5267
5267
  },
5268
5268
  content: task.content,
5269
- parameters: {
5270
- /* !!!! */
5271
- },
5269
+ parameters,
5272
5270
  };
5273
5271
  const taskEmbeddingResult = await llmTools.callEmbeddingModel(taskEmbeddingPrompt);
5274
5272
  const knowledgePiecesWithRelevance = preparedPipeline.knowledgePieces.map((knowledgePiece) => {
@@ -5320,9 +5318,9 @@ async function getKnowledgeForTask(options) {
5320
5318
  * @private internal utility of `createPipelineExecutor`
5321
5319
  */
5322
5320
  async function getReservedParametersForTask(options) {
5323
- const { tools, preparedPipeline, task, pipelineIdentification } = options;
5321
+ const { tools, preparedPipeline, task, parameters, pipelineIdentification } = options;
5324
5322
  const context = await getContextForTask(); // <- [🏍]
5325
- const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task });
5323
+ const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task, parameters });
5326
5324
  const examples = await getExamplesForTask();
5327
5325
  const currentDate = new Date().toISOString(); // <- TODO: [🧠][💩] Better
5328
5326
  const modelName = RESERVED_PARAMETER_MISSING_VALUE;
@@ -5388,6 +5386,7 @@ async function executeTask(options) {
5388
5386
  preparedPipeline,
5389
5387
  task: currentTask,
5390
5388
  pipelineIdentification,
5389
+ parameters: parametersToPass,
5391
5390
  })),
5392
5391
  ...parametersToPass,
5393
5392
  });