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