@promptbook/markdown-utils 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.
@@ -102,12 +102,12 @@ import { createLlmToolsFromConfiguration } from '../llm-providers/_common/regist
102
102
  import { cacheLlmTools } from '../llm-providers/_common/utils/cache/cacheLlmTools';
103
103
  import { countUsage } from '../llm-providers/_common/utils/count-total-usage/countUsage';
104
104
  import { limitTotalUsage } from '../llm-providers/_common/utils/count-total-usage/limitTotalUsage';
105
+ import { joinLlmExecutionTools } from '../llm-providers/_multiple/joinLlmExecutionTools';
106
+ import { MultipleLlmExecutionTools } from '../llm-providers/_multiple/MultipleLlmExecutionTools';
105
107
  import { _AnthropicClaudeMetadataRegistration } from '../llm-providers/anthropic-claude/register-configuration';
106
108
  import { _AzureOpenAiMetadataRegistration } from '../llm-providers/azure-openai/register-configuration';
107
109
  import { _DeepseekMetadataRegistration } from '../llm-providers/deepseek/register-configuration';
108
110
  import { _GoogleMetadataRegistration } from '../llm-providers/google/register-configuration';
109
- import { joinLlmExecutionTools } from '../llm-providers/multiple/joinLlmExecutionTools';
110
- import { MultipleLlmExecutionTools } from '../llm-providers/multiple/MultipleLlmExecutionTools';
111
111
  import { _OpenAiMetadataRegistration } from '../llm-providers/openai/register-configuration';
112
112
  import { _OpenAiAssistantMetadataRegistration } from '../llm-providers/openai/register-configuration';
113
113
  import { migratePipeline } from '../migrations/migratePipeline';
@@ -249,12 +249,12 @@ export { createLlmToolsFromConfiguration };
249
249
  export { cacheLlmTools };
250
250
  export { countUsage };
251
251
  export { limitTotalUsage };
252
+ export { joinLlmExecutionTools };
253
+ export { MultipleLlmExecutionTools };
252
254
  export { _AnthropicClaudeMetadataRegistration };
253
255
  export { _AzureOpenAiMetadataRegistration };
254
256
  export { _DeepseekMetadataRegistration };
255
257
  export { _GoogleMetadataRegistration };
256
- export { joinLlmExecutionTools };
257
- export { MultipleLlmExecutionTools };
258
258
  export { _OpenAiMetadataRegistration };
259
259
  export { _OpenAiAssistantMetadataRegistration };
260
260
  export { migratePipeline };
@@ -1,4 +1,4 @@
1
- import { MultipleLlmExecutionTools } from '../../multiple/MultipleLlmExecutionTools';
1
+ import { MultipleLlmExecutionTools } from '../../_multiple/MultipleLlmExecutionTools';
2
2
  import type { CreateLlmToolsFromConfigurationOptions } from './createLlmToolsFromConfiguration';
3
3
  /**
4
4
  * Automatically configures LLM tools from environment variables in Node.js
@@ -1,5 +1,5 @@
1
1
  import type { string_user_id } from '../../../types/typeAliases';
2
- import { MultipleLlmExecutionTools } from '../../multiple/MultipleLlmExecutionTools';
2
+ import { MultipleLlmExecutionTools } from '../../_multiple/MultipleLlmExecutionTools';
3
3
  import type { LlmToolsConfiguration } from './LlmToolsConfiguration';
4
4
  /**
5
5
  * Options for `$provideLlmToolsFromEnv`
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.92.0-32`).
18
+ * It follows semantic versioning (e.g., `0.92.0-33`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/markdown-utils",
3
- "version": "0.92.0-33",
3
+ "version": "0.92.0-34",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "private": false,
6
6
  "sideEffects": false,
package/umd/index.umd.js CHANGED
@@ -25,7 +25,7 @@
25
25
  * @generated
26
26
  * @see https://github.com/webgptorg/promptbook
27
27
  */
28
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-33';
28
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-34';
29
29
  /**
30
30
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
31
31
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2459,12 +2459,14 @@
2459
2459
  const spending = new rxjs.Subject();
2460
2460
  const proxyTools = {
2461
2461
  get title() {
2462
- // TODO: [🧠] Maybe put here some suffix
2463
- return llmTools.title;
2462
+ return `${llmTools.title} (+usage)`;
2463
+ // <- TODO: [🧈] Maybe standartize the suffix when wrapping `LlmExecutionTools` up
2464
+ // <- TODO: [🧈][🧠] Does it make sence to suffix "(+usage)"?
2464
2465
  },
2465
2466
  get description() {
2466
- // TODO: [🧠] Maybe put here some suffix
2467
- return llmTools.description;
2467
+ return `${llmTools.description} (+usage)`;
2468
+ // <- TODO: [🧈] Maybe standartize the suffix when wrapping `LlmExecutionTools` up
2469
+ // <- TODO: [🧈][🧠] Does it make sence to suffix "(+usage)"?
2468
2470
  },
2469
2471
  checkConfiguration() {
2470
2472
  return /* not await */ llmTools.checkConfiguration();
@@ -2535,7 +2537,14 @@
2535
2537
  return 'Multiple LLM Providers';
2536
2538
  }
2537
2539
  get description() {
2538
- return this.llmExecutionTools.map(({ title }, index) => `${index + 1}) \`${title}\``).join('\n');
2540
+ const innerModelsTitlesAndDescriptions = this.llmExecutionTools
2541
+ .map(({ title, description }, index) => `${index + 1}) \`${title}\`\n${description}`)
2542
+ .join('\n\n');
2543
+ return spaceTrim__default["default"]((block) => `
2544
+ Multiple LLM Providers:
2545
+
2546
+ ${block(innerModelsTitlesAndDescriptions)}
2547
+ `);
2539
2548
  }
2540
2549
  /**
2541
2550
  * Check the configuration of all execution tools
@@ -5309,6 +5318,7 @@
5309
5318
  */
5310
5319
  async function getKnowledgeForTask(options) {
5311
5320
  const { tools, preparedPipeline, task, parameters } = options;
5321
+ console.log('!!! getKnowledgeForTask', options);
5312
5322
  const firstKnowlegePiece = preparedPipeline.knowledgePieces[0];
5313
5323
  const firstKnowlegeIndex = firstKnowlegePiece === null || firstKnowlegePiece === void 0 ? void 0 : firstKnowlegePiece.index[0];
5314
5324
  // <- TODO: Do not use just first knowledge piece and first index to determine embedding model, use also keyword search
@@ -6030,6 +6040,12 @@
6030
6040
  }
6031
6041
  // ---
6032
6042
  if (!llmTools.callEmbeddingModel) {
6043
+ console.log('!!! No callEmbeddingModel function provided', {
6044
+ 'llmTools.title': llmTools.title,
6045
+ 'llmTools.description': llmTools.description,
6046
+ 'llmTools.callEmbeddingModel': llmTools.callEmbeddingModel,
6047
+ llmTools,
6048
+ });
6033
6049
  // TODO: [🟥] Detect browser / node and make it colorfull
6034
6050
  console.error('No callEmbeddingModel function provided');
6035
6051
  }