@promptbook/pdf 0.92.0-33 → 0.92.0-34
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 +22 -6
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +4 -4
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +1 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +22 -6
- package/umd/index.umd.js.map +1 -1
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/MultipleLlmExecutionTools.d.ts +0 -0
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/joinLlmExecutionTools.d.ts +0 -0
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/playground/playground.d.ts +0 -0
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-34';
|
|
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
|
|
@@ -2773,12 +2773,14 @@ function countUsage(llmTools) {
|
|
|
2773
2773
|
const spending = new Subject();
|
|
2774
2774
|
const proxyTools = {
|
|
2775
2775
|
get title() {
|
|
2776
|
-
|
|
2777
|
-
|
|
2776
|
+
return `${llmTools.title} (+usage)`;
|
|
2777
|
+
// <- TODO: [🧈] Maybe standartize the suffix when wrapping `LlmExecutionTools` up
|
|
2778
|
+
// <- TODO: [🧈][🧠] Does it make sence to suffix "(+usage)"?
|
|
2778
2779
|
},
|
|
2779
2780
|
get description() {
|
|
2780
|
-
|
|
2781
|
-
|
|
2781
|
+
return `${llmTools.description} (+usage)`;
|
|
2782
|
+
// <- TODO: [🧈] Maybe standartize the suffix when wrapping `LlmExecutionTools` up
|
|
2783
|
+
// <- TODO: [🧈][🧠] Does it make sence to suffix "(+usage)"?
|
|
2782
2784
|
},
|
|
2783
2785
|
checkConfiguration() {
|
|
2784
2786
|
return /* not await */ llmTools.checkConfiguration();
|
|
@@ -2849,7 +2851,14 @@ class MultipleLlmExecutionTools {
|
|
|
2849
2851
|
return 'Multiple LLM Providers';
|
|
2850
2852
|
}
|
|
2851
2853
|
get description() {
|
|
2852
|
-
|
|
2854
|
+
const innerModelsTitlesAndDescriptions = this.llmExecutionTools
|
|
2855
|
+
.map(({ title, description }, index) => `${index + 1}) \`${title}\`\n${description}`)
|
|
2856
|
+
.join('\n\n');
|
|
2857
|
+
return spaceTrim((block) => `
|
|
2858
|
+
Multiple LLM Providers:
|
|
2859
|
+
|
|
2860
|
+
${block(innerModelsTitlesAndDescriptions)}
|
|
2861
|
+
`);
|
|
2853
2862
|
}
|
|
2854
2863
|
/**
|
|
2855
2864
|
* Check the configuration of all execution tools
|
|
@@ -5338,6 +5347,7 @@ function knowledgePiecesToString(knowledgePieces) {
|
|
|
5338
5347
|
*/
|
|
5339
5348
|
async function getKnowledgeForTask(options) {
|
|
5340
5349
|
const { tools, preparedPipeline, task, parameters } = options;
|
|
5350
|
+
console.log('!!! getKnowledgeForTask', options);
|
|
5341
5351
|
const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
|
|
5342
5352
|
const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
|
|
5343
5353
|
// <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
|
|
@@ -6059,6 +6069,12 @@ class MarkdownScraper {
|
|
|
6059
6069
|
}
|
|
6060
6070
|
// ---
|
|
6061
6071
|
if (!llmTools.callEmbeddingModel) {
|
|
6072
|
+
console.log('!!! No callEmbeddingModel function provided', {
|
|
6073
|
+
'llmTools.title': llmTools.title,
|
|
6074
|
+
'llmTools.description': llmTools.description,
|
|
6075
|
+
'llmTools.callEmbeddingModel': llmTools.callEmbeddingModel,
|
|
6076
|
+
llmTools,
|
|
6077
|
+
});
|
|
6062
6078
|
// TODO: [🟥] Detect browser / node and make it colorfull
|
|
6063
6079
|
console.error('No callEmbeddingModel function provided');
|
|
6064
6080
|
}
|