@promptbook/remote-server 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
|
@@ -33,7 +33,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
33
33
|
* @generated
|
|
34
34
|
* @see https://github.com/webgptorg/promptbook
|
|
35
35
|
*/
|
|
36
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
36
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-18';
|
|
37
37
|
/**
|
|
38
38
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
39
39
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -5583,7 +5583,7 @@ function knowledgePiecesToString(knowledgePieces) {
|
|
|
5583
5583
|
* @private internal utility of `createPipelineExecutor`
|
|
5584
5584
|
*/
|
|
5585
5585
|
async function getKnowledgeForTask(options) {
|
|
5586
|
-
const { tools, preparedPipeline, task } = options;
|
|
5586
|
+
const { tools, preparedPipeline, task, parameters } = options;
|
|
5587
5587
|
const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
|
|
5588
5588
|
const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
|
|
5589
5589
|
// <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
|
|
@@ -5601,9 +5601,7 @@ async function getKnowledgeForTask(options) {
|
|
|
5601
5601
|
modelName: firstKnowlegeIndex.modelName,
|
|
5602
5602
|
},
|
|
5603
5603
|
content: task.content,
|
|
5604
|
-
parameters
|
|
5605
|
-
/* !!!! */
|
|
5606
|
-
},
|
|
5604
|
+
parameters,
|
|
5607
5605
|
};
|
|
5608
5606
|
const taskEmbeddingResult = await llmTools.callEmbeddingModel(taskEmbeddingPrompt);
|
|
5609
5607
|
const knowledgePiecesWithRelevance = preparedPipeline.knowledgePieces.map((knowledgePiece) => {
|
|
@@ -5655,9 +5653,9 @@ async function getKnowledgeForTask(options) {
|
|
|
5655
5653
|
* @private internal utility of `createPipelineExecutor`
|
|
5656
5654
|
*/
|
|
5657
5655
|
async function getReservedParametersForTask(options) {
|
|
5658
|
-
const { tools, preparedPipeline, task, pipelineIdentification } = options;
|
|
5656
|
+
const { tools, preparedPipeline, task, parameters, pipelineIdentification } = options;
|
|
5659
5657
|
const context = await getContextForTask(); // <- [🏍]
|
|
5660
|
-
const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task });
|
|
5658
|
+
const knowledge = await getKnowledgeForTask({ tools, preparedPipeline, task, parameters });
|
|
5661
5659
|
const examples = await getExamplesForTask();
|
|
5662
5660
|
const currentDate = new Date().toISOString(); // <- TODO: [🧠][💩] Better
|
|
5663
5661
|
const modelName = RESERVED_PARAMETER_MISSING_VALUE;
|
|
@@ -5723,6 +5721,7 @@ async function executeTask(options) {
|
|
|
5723
5721
|
preparedPipeline,
|
|
5724
5722
|
task: currentTask,
|
|
5725
5723
|
pipelineIdentification,
|
|
5724
|
+
parameters: parametersToPass,
|
|
5726
5725
|
})),
|
|
5727
5726
|
...parametersToPass,
|
|
5728
5727
|
});
|