@promptbook/core 0.94.0-3 → 0.94.0-4

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
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
27
27
  * @generated
28
28
  * @see https://github.com/webgptorg/promptbook
29
29
  */
30
- const PROMPTBOOK_ENGINE_VERSION = '0.94.0-3';
30
+ const PROMPTBOOK_ENGINE_VERSION = '0.94.0-4';
31
31
  /**
32
32
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
33
33
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -10300,7 +10300,10 @@ function usageToWorktime(usage) {
10300
10300
  function usageToHuman(usage) {
10301
10301
  const reportItems = [];
10302
10302
  const uncertainNumberToHuman = ({ value, isUncertain }) => `${isUncertain ? 'approximately ' : ''}${Math.round(value * 100) / 100}`;
10303
- if (usage.price.value > 0.01
10303
+ if (usage.price.value === 0) {
10304
+ reportItems.push(`Zero cost`);
10305
+ }
10306
+ else if (usage.price.value > 0.01
10304
10307
  // <- TODO: [🍓][🧞‍♂️][👩🏽‍🤝‍🧑🏻] Configure negligible value - default value to config + value to `UsageToHumanSettings`
10305
10308
  ) {
10306
10309
  reportItems.push(`Cost ${uncertainNumberToHuman(usage.price)} USD`);