@promptbook/node 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
|
@@ -30,7 +30,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
30
30
|
* @generated
|
|
31
31
|
* @see https://github.com/webgptorg/promptbook
|
|
32
32
|
*/
|
|
33
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
33
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-18';
|
|
34
34
|
/**
|
|
35
35
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
36
36
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -4171,7 +4171,7 @@ function knowledgePiecesToString(knowledgePieces) {
|
|
|
4171
4171
|
* @private internal utility of `createPipelineExecutor`
|
|
4172
4172
|
*/
|
|
4173
4173
|
async function getKnowledgeForTask(options) {
|
|
4174
|
-
const { tools, preparedPipeline, task } = options;
|
|
4174
|
+
const { tools, preparedPipeline, task, parameters } = options;
|
|
4175
4175
|
const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
|
|
4176
4176
|
const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
|
|
4177
4177
|
// <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
|
|
@@ -4189,9 +4189,7 @@ async function getKnowledgeForTask(options) {
|
|
|
4189
4189
|
modelName: firstKnowlegeIndex.modelName,
|
|
4190
4190
|
},
|
|
4191
4191
|
content: task.content,
|
|
4192
|
-
parameters
|
|
4193
|
-
/* !!!! */
|
|
4194
|
-
},
|
|
4192
|
+
parameters,
|
|
4195
4193
|
};
|
|
4196
4194
|
const taskEmbeddingResult = await llmTools.callEmbeddingModel(taskEmbeddingPrompt);
|
|
4197
4195
|
const knowledgePiecesWithRelevance = preparedPipeline.knowledgePieces.map((knowledgePiece) => {
|
|
@@ -4243,9 +4241,9 @@ async function getKnowledgeForTask(options) {
|
|
|
4243
4241
|
* @private internal utility of `createPipelineExecutor`
|
|
4244
4242
|
*/
|
|
4245
4243
|
async function getReservedParametersForTask(options) {
|
|
4246
|
-
const { tools, preparedPipeline, task, pipelineIdentification } = options;
|
|
4244
|
+
const { tools, preparedPipeline, task, parameters, pipelineIdentification } = options;
|
|
4247
4245
|
const context = await getContextForTask(); // <- [🏍]
|
|
4248
|
-
const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task });
|
|
4246
|
+
const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task, parameters });
|
|
4249
4247
|
const examples = await getExamplesForTask();
|
|
4250
4248
|
const currentDate = new Date().toISOString(); // <- TODO: [🧠][💩] Better
|
|
4251
4249
|
const modelName = RESERVED_PARAMETER_MISSING_VALUE;
|
|
@@ -4311,6 +4309,7 @@ async function executeTask(options) {
|
|
|
4311
4309
|
preparedPipeline,
|
|
4312
4310
|
task: currentTask,
|
|
4313
4311
|
pipelineIdentification,
|
|
4312
|
+
parameters: parametersToPass,
|
|
4314
4313
|
})),
|
|
4315
4314
|
...parametersToPass,
|
|
4316
4315
|
});
|