@promptbook/markdown-utils 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 +6 -7
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +7 -0
- package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +7 -0
- package/package.json +1 -1
- package/umd/index.umd.js +6 -7
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -25,7 +25,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
25
25
|
* @generated
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
28
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-18';
|
|
29
29
|
/**
|
|
30
30
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
31
31
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -5218,7 +5218,7 @@ function knowledgePiecesToString(knowledgePieces) {
|
|
|
5218
5218
|
* @private internal utility of `createPipelineExecutor`
|
|
5219
5219
|
*/
|
|
5220
5220
|
async function getKnowledgeForTask(options) {
|
|
5221
|
-
const { tools, preparedPipeline, task } = options;
|
|
5221
|
+
const { tools, preparedPipeline, task, parameters } = options;
|
|
5222
5222
|
const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
|
|
5223
5223
|
const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
|
|
5224
5224
|
// <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
|
|
@@ -5236,9 +5236,7 @@ async function getKnowledgeForTask(options) {
|
|
|
5236
5236
|
modelName: firstKnowlegeIndex.modelName,
|
|
5237
5237
|
},
|
|
5238
5238
|
content: task.content,
|
|
5239
|
-
parameters
|
|
5240
|
-
/* !!!! */
|
|
5241
|
-
},
|
|
5239
|
+
parameters,
|
|
5242
5240
|
};
|
|
5243
5241
|
const taskEmbeddingResult = await llmTools.callEmbeddingModel(taskEmbeddingPrompt);
|
|
5244
5242
|
const knowledgePiecesWithRelevance = preparedPipeline.knowledgePieces.map((knowledgePiece) => {
|
|
@@ -5290,9 +5288,9 @@ async function getKnowledgeForTask(options) {
|
|
|
5290
5288
|
* @private internal utility of `createPipelineExecutor`
|
|
5291
5289
|
*/
|
|
5292
5290
|
async function getReservedParametersForTask(options) {
|
|
5293
|
-
const { tools, preparedPipeline, task, pipelineIdentification } = options;
|
|
5291
|
+
const { tools, preparedPipeline, task, parameters, pipelineIdentification } = options;
|
|
5294
5292
|
const context = await getContextForTask(); // <- [🏍]
|
|
5295
|
-
const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task });
|
|
5293
|
+
const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task, parameters });
|
|
5296
5294
|
const examples = await getExamplesForTask();
|
|
5297
5295
|
const currentDate = new Date().toISOString(); // <- TODO: [🧠][💩] Better
|
|
5298
5296
|
const modelName = RESERVED_PARAMETER_MISSING_VALUE;
|
|
@@ -5358,6 +5356,7 @@ async function executeTask(options) {
|
|
|
5358
5356
|
preparedPipeline,
|
|
5359
5357
|
task: currentTask,
|
|
5360
5358
|
pipelineIdentification,
|
|
5359
|
+
parameters: parametersToPass,
|
|
5361
5360
|
})),
|
|
5362
5361
|
...parametersToPass,
|
|
5363
5362
|
});
|