@promptbook/legacy-documents 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 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-33';
31
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-34';
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
@@ -2934,12 +2934,14 @@ function countUsage(llmTools) {
2934
2934
  const spending = new Subject();
2935
2935
  const proxyTools = {
2936
2936
  get title() {
2937
- // TODO: [🧠] Maybe put here some suffix
2938
- return llmTools.title;
2937
+ return `${llmTools.title} (+usage)`;
2938
+ // <- TODO: [🧈] Maybe standartize the suffix when wrapping `LlmExecutionTools` up
2939
+ // <- TODO: [🧈][🧠] Does it make sence to suffix "(+usage)"?
2939
2940
  },
2940
2941
  get description() {
2941
- // TODO: [🧠] Maybe put here some suffix
2942
- return llmTools.description;
2942
+ return `${llmTools.description} (+usage)`;
2943
+ // <- TODO: [🧈] Maybe standartize the suffix when wrapping `LlmExecutionTools` up
2944
+ // <- TODO: [🧈][🧠] Does it make sence to suffix "(+usage)"?
2943
2945
  },
2944
2946
  checkConfiguration() {
2945
2947
  return /* not await */ llmTools.checkConfiguration();
@@ -3010,7 +3012,14 @@ class MultipleLlmExecutionTools {
3010
3012
  return 'Multiple LLM Providers';
3011
3013
  }
3012
3014
  get description() {
3013
- return this.llmExecutionTools.map(({ title }, index) => `${index + 1}) \`${title}\``).join('\n');
3015
+ const innerModelsTitlesAndDescriptions = this.llmExecutionTools
3016
+ .map(({ title, description }, index) => `${index + 1}) \`${title}\`\n${description}`)
3017
+ .join('\n\n');
3018
+ return spaceTrim$1((block) => `
3019
+ Multiple LLM Providers:
3020
+
3021
+ ${block(innerModelsTitlesAndDescriptions)}
3022
+ `);
3014
3023
  }
3015
3024
  /**
3016
3025
  * Check the configuration of all execution tools
@@ -5489,6 +5498,7 @@ function knowledgePiecesToString(knowledgePieces) {
5489
5498
  */
5490
5499
  async function getKnowledgeForTask(options) {
5491
5500
  const { tools, preparedPipeline, task, parameters } = options;
5501
+ console.log('!!! getKnowledgeForTask', options);
5492
5502
  const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
5493
5503
  const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
5494
5504
  // <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
@@ -6210,6 +6220,12 @@ class MarkdownScraper {
6210
6220
  }
6211
6221
  // ---
6212
6222
  if (!llmTools.callEmbeddingModel) {
6223
+ console.log('!!! No callEmbeddingModel function provided', {
6224
+ 'llmTools.title': llmTools.title,
6225
+ 'llmTools.description': llmTools.description,
6226
+ 'llmTools.callEmbeddingModel': llmTools.callEmbeddingModel,
6227
+ llmTools,
6228
+ });
6213
6229
  // TODO: [🟥] Detect browser / node and make it colorfull
6214
6230
  console.error('No callEmbeddingModel function provided');
6215
6231
  }