@promptbook/cli 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
@@ -47,7 +47,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
47
47
  * @generated
48
48
  * @see https://github.com/webgptorg/promptbook
49
49
  */
50
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-16';
50
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-18';
51
51
  /**
52
52
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
53
53
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -6573,7 +6573,7 @@ function knowledgePiecesToString(knowledgePieces) {
6573
6573
  * @private internal utility of `createPipelineExecutor`
6574
6574
  */
6575
6575
  async function getKnowledgeForTask(options) {
6576
- const { tools, preparedPipeline, task } = options;
6576
+ const { tools, preparedPipeline, task, parameters } = options;
6577
6577
  const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
6578
6578
  const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
6579
6579
  // <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
@@ -6591,9 +6591,7 @@ async function getKnowledgeForTask(options) {
6591
6591
  modelName: firstKnowlegeIndex.modelName,
6592
6592
  },
6593
6593
  content: task.content,
6594
- parameters: {
6595
- /* !!!! */
6596
- },
6594
+ parameters,
6597
6595
  };
6598
6596
  const taskEmbeddingResult = await llmTools.callEmbeddingModel(taskEmbeddingPrompt);
6599
6597
  const knowledgePiecesWithRelevance = preparedPipeline.knowledgePieces.map((knowledgePiece) => {
@@ -6645,9 +6643,9 @@ async function getKnowledgeForTask(options) {
6645
6643
  * @private internal utility of `createPipelineExecutor`
6646
6644
  */
6647
6645
  async function getReservedParametersForTask(options) {
6648
- const { tools, preparedPipeline, task, pipelineIdentification } = options;
6646
+ const { tools, preparedPipeline, task, parameters, pipelineIdentification } = options;
6649
6647
  const context = await getContextForTask(); // <- [🏍]
6650
- const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task });
6648
+ const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task, parameters });
6651
6649
  const examples = await getExamplesForTask();
6652
6650
  const currentDate = new Date().toISOString(); // <- TODO: [🧠][💩] Better
6653
6651
  const modelName = RESERVED_PARAMETER_MISSING_VALUE;
@@ -6713,6 +6711,7 @@ async function executeTask(options) {
6713
6711
  preparedPipeline,
6714
6712
  task: currentTask,
6715
6713
  pipelineIdentification,
6714
+ parameters: parametersToPass,
6716
6715
  })),
6717
6716
  ...parametersToPass,
6718
6717
  });