@promptbook/legacy-documents 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 +2 -2
- package/umd/index.umd.js +6 -7
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -28,7 +28,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
28
28
|
* @generated
|
|
29
29
|
* @see https://github.com/webgptorg/promptbook
|
|
30
30
|
*/
|
|
31
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
31
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-18';
|
|
32
32
|
/**
|
|
33
33
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
34
34
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -5399,7 +5399,7 @@ function knowledgePiecesToString(knowledgePieces) {
|
|
|
5399
5399
|
* @private internal utility of `createPipelineExecutor`
|
|
5400
5400
|
*/
|
|
5401
5401
|
async function getKnowledgeForTask(options) {
|
|
5402
|
-
const { tools, preparedPipeline, task } = options;
|
|
5402
|
+
const { tools, preparedPipeline, task, parameters } = options;
|
|
5403
5403
|
const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
|
|
5404
5404
|
const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
|
|
5405
5405
|
// <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
|
|
@@ -5417,9 +5417,7 @@ async function getKnowledgeForTask(options) {
|
|
|
5417
5417
|
modelName: firstKnowlegeIndex.modelName,
|
|
5418
5418
|
},
|
|
5419
5419
|
content: task.content,
|
|
5420
|
-
parameters
|
|
5421
|
-
/* !!!! */
|
|
5422
|
-
},
|
|
5420
|
+
parameters,
|
|
5423
5421
|
};
|
|
5424
5422
|
const taskEmbeddingResult = await llmTools.callEmbeddingModel(taskEmbeddingPrompt);
|
|
5425
5423
|
const knowledgePiecesWithRelevance = preparedPipeline.knowledgePieces.map((knowledgePiece) => {
|
|
@@ -5471,9 +5469,9 @@ async function getKnowledgeForTask(options) {
|
|
|
5471
5469
|
* @private internal utility of `createPipelineExecutor`
|
|
5472
5470
|
*/
|
|
5473
5471
|
async function getReservedParametersForTask(options) {
|
|
5474
|
-
const { tools, preparedPipeline, task, pipelineIdentification } = options;
|
|
5472
|
+
const { tools, preparedPipeline, task, parameters, pipelineIdentification } = options;
|
|
5475
5473
|
const context = await getContextForTask(); // <- [🏍]
|
|
5476
|
-
const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task });
|
|
5474
|
+
const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task, parameters });
|
|
5477
5475
|
const examples = await getExamplesForTask();
|
|
5478
5476
|
const currentDate = new Date().toISOString(); // <- TODO: [🧠][💩] Better
|
|
5479
5477
|
const modelName = RESERVED_PARAMETER_MISSING_VALUE;
|
|
@@ -5539,6 +5537,7 @@ async function executeTask(options) {
|
|
|
5539
5537
|
preparedPipeline,
|
|
5540
5538
|
task: currentTask,
|
|
5541
5539
|
pipelineIdentification,
|
|
5540
|
+
parameters: parametersToPass,
|
|
5542
5541
|
})),
|
|
5543
5542
|
...parametersToPass,
|
|
5544
5543
|
});
|