@promptbook/remote-server 0.20.6 → 0.21.0

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.
@@ -7,5 +7,6 @@ import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormat
7
7
  import { removeEmojis } from '../utils/removeEmojis';
8
8
  import { removeQuotes } from '../utils/removeQuotes';
9
9
  import { replaceParameters } from '../utils/replaceParameters';
10
+ import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
10
11
  import { unwrapResult } from '../utils/unwrapResult';
11
- export { EMOJIS, EMOJIS_IN_CATEGORIES, extractAllListItemsFromMarkdown, extractBlocksFromMarkdown, extractOneBlockFromMarkdown, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, unwrapResult, };
12
+ export { EMOJIS, EMOJIS_IN_CATEGORIES, extractAllListItemsFromMarkdown, extractBlocksFromMarkdown, extractOneBlockFromMarkdown, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimEndOfCodeBlock, unwrapResult, };
@@ -12,5 +12,6 @@ export declare const PTBK_VERSION: string_version;
12
12
  */
13
13
  export declare const DEFAULT_MODEL_REQUIREMENTS: ModelRequirements;
14
14
  /**
15
+ * TODO: !!! Different default model for different model variant
15
16
  * TODO: [🧠] What should be the default model?
16
17
  */
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Function trimEndOfCodeBlock will remove ending code block from the string if it is present.
3
+ *
4
+ * This is usefull for post-processing of the result of the completion LLM model if you want to start code block in the prompt but you don't want to end it in the result.
5
+ */
6
+ export declare function trimEndOfCodeBlock(value: string): string;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/remote-server",
3
- "version": "0.20.6",
3
+ "version": "0.21.0",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -38,7 +38,7 @@
38
38
  "spacetrim": "0.9.14"
39
39
  },
40
40
  "peerDependencies": {
41
- "@promptbook/core": "0.20.6"
41
+ "@promptbook/core": "0.21.0"
42
42
  },
43
43
  "main": "./umd/index.umd.js",
44
44
  "module": "./esm/index.es.js",
@@ -7,5 +7,6 @@ import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormat
7
7
  import { removeEmojis } from '../utils/removeEmojis';
8
8
  import { removeQuotes } from '../utils/removeQuotes';
9
9
  import { replaceParameters } from '../utils/replaceParameters';
10
+ import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
10
11
  import { unwrapResult } from '../utils/unwrapResult';
11
- export { EMOJIS, EMOJIS_IN_CATEGORIES, extractAllListItemsFromMarkdown, extractBlocksFromMarkdown, extractOneBlockFromMarkdown, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, unwrapResult, };
12
+ export { EMOJIS, EMOJIS_IN_CATEGORIES, extractAllListItemsFromMarkdown, extractBlocksFromMarkdown, extractOneBlockFromMarkdown, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimEndOfCodeBlock, unwrapResult, };
@@ -12,5 +12,6 @@ export declare const PTBK_VERSION: string_version;
12
12
  */
13
13
  export declare const DEFAULT_MODEL_REQUIREMENTS: ModelRequirements;
14
14
  /**
15
+ * TODO: !!! Different default model for different model variant
15
16
  * TODO: [🧠] What should be the default model?
16
17
  */
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Function trimEndOfCodeBlock will remove ending code block from the string if it is present.
3
+ *
4
+ * This is usefull for post-processing of the result of the completion LLM model if you want to start code block in the prompt but you don't want to end it in the result.
5
+ */
6
+ export declare function trimEndOfCodeBlock(value: string): string;
@@ -0,0 +1 @@
1
+ export {};