@promptbook/markitdown 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 +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 +2 -2
- package/umd/index.umd.js +6 -7
- package/umd/index.umd.js.map +1 -1
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-
|
|
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
|
|
@@ -5235,7 +5235,7 @@ function knowledgePiecesToString(knowledgePieces) {
|
|
|
5235
5235
|
* @private internal utility of `createPipelineExecutor`
|
|
5236
5236
|
*/
|
|
5237
5237
|
async function getKnowledgeForTask(options) {
|
|
5238
|
-
const { tools, preparedPipeline, task } = options;
|
|
5238
|
+
const { tools, preparedPipeline, task, parameters } = options;
|
|
5239
5239
|
const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
|
|
5240
5240
|
const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
|
|
5241
5241
|
// <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
|
|
@@ -5253,9 +5253,7 @@ async function getKnowledgeForTask(options) {
|
|
|
5253
5253
|
modelName: firstKnowlegeIndex.modelName,
|
|
5254
5254
|
},
|
|
5255
5255
|
content: task.content,
|
|
5256
|
-
parameters
|
|
5257
|
-
/* !!!! */
|
|
5258
|
-
},
|
|
5256
|
+
parameters,
|
|
5259
5257
|
};
|
|
5260
5258
|
const taskEmbeddingResult = await llmTools.callEmbeddingModel(taskEmbeddingPrompt);
|
|
5261
5259
|
const knowledgePiecesWithRelevance = preparedPipeline.knowledgePieces.map((knowledgePiece) => {
|
|
@@ -5307,9 +5305,9 @@ async function getKnowledgeForTask(options) {
|
|
|
5307
5305
|
* @private internal utility of `createPipelineExecutor`
|
|
5308
5306
|
*/
|
|
5309
5307
|
async function getReservedParametersForTask(options) {
|
|
5310
|
-
const { tools, preparedPipeline, task, pipelineIdentification } = options;
|
|
5308
|
+
const { tools, preparedPipeline, task, parameters, pipelineIdentification } = options;
|
|
5311
5309
|
const context = await getContextForTask(); // <- [🏍]
|
|
5312
|
-
const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task });
|
|
5310
|
+
const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task, parameters });
|
|
5313
5311
|
const examples = await getExamplesForTask();
|
|
5314
5312
|
const currentDate = new Date().toISOString(); // <- TODO: [🧠][💩] Better
|
|
5315
5313
|
const modelName = RESERVED_PARAMETER_MISSING_VALUE;
|
|
@@ -5375,6 +5373,7 @@ async function executeTask(options) {
|
|
|
5375
5373
|
preparedPipeline,
|
|
5376
5374
|
task: currentTask,
|
|
5377
5375
|
pipelineIdentification,
|
|
5376
|
+
parameters: parametersToPass,
|
|
5378
5377
|
})),
|
|
5379
5378
|
...parametersToPass,
|
|
5380
5379
|
});
|