@promptbook/core 0.92.0-17 → 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
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
27
27
  * @generated
28
28
  * @see https://github.com/webgptorg/promptbook
29
29
  */
30
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-17';
30
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-18';
31
31
  /**
32
32
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
33
33
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -4422,7 +4422,7 @@ function knowledgePiecesToString(knowledgePieces) {
4422
4422
  * @private internal utility of `createPipelineExecutor`
4423
4423
  */
4424
4424
  async function getKnowledgeForTask(options) {
4425
- const { tools, preparedPipeline, task } = options;
4425
+ const { tools, preparedPipeline, task, parameters } = options;
4426
4426
  const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
4427
4427
  const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
4428
4428
  // <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
@@ -4440,9 +4440,7 @@ async function getKnowledgeForTask(options) {
4440
4440
  modelName: firstKnowlegeIndex.modelName,
4441
4441
  },
4442
4442
  content: task.content,
4443
- parameters: {
4444
- /* !!!! */
4445
- },
4443
+ parameters,
4446
4444
  };
4447
4445
  const taskEmbeddingResult = await llmTools.callEmbeddingModel(taskEmbeddingPrompt);
4448
4446
  const knowledgePiecesWithRelevance = preparedPipeline.knowledgePieces.map((knowledgePiece) => {
@@ -4494,9 +4492,9 @@ async function getKnowledgeForTask(options) {
4494
4492
  * @private internal utility of `createPipelineExecutor`
4495
4493
  */
4496
4494
  async function getReservedParametersForTask(options) {
4497
- const { tools, preparedPipeline, task, pipelineIdentification } = options;
4495
+ const { tools, preparedPipeline, task, parameters, pipelineIdentification } = options;
4498
4496
  const context = await getContextForTask(); // <- [🏍]
4499
- const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task });
4497
+ const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task, parameters });
4500
4498
  const examples = await getExamplesForTask();
4501
4499
  const currentDate = new Date().toISOString(); // <- TODO: [🧠][💩] Better
4502
4500
  const modelName = RESERVED_PARAMETER_MISSING_VALUE;
@@ -4562,6 +4560,7 @@ async function executeTask(options) {
4562
4560
  preparedPipeline,
4563
4561
  task: currentTask,
4564
4562
  pipelineIdentification,
4563
+ parameters: parametersToPass,
4565
4564
  })),
4566
4565
  ...parametersToPass,
4567
4566
  });