@promptbook/remote-server 0.21.1 → 0.22.1

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.
@@ -1,4 +1,5 @@
1
1
  import { EMOJIS, EMOJIS_IN_CATEGORIES } from '../utils/emojis';
2
+ import { isValidJsonString } from '../utils/isValidJsonString';
2
3
  import { extractAllListItemsFromMarkdown } from '../utils/markdown/extractAllListItemsFromMarkdown';
3
4
  import { extractBlocksFromMarkdown } from '../utils/markdown/extractBlocksFromMarkdown';
4
5
  import { extractOneBlockFromMarkdown } from '../utils/markdown/extractOneBlockFromMarkdown';
@@ -9,4 +10,4 @@ import { removeQuotes } from '../utils/removeQuotes';
9
10
  import { replaceParameters } from '../utils/replaceParameters';
10
11
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
11
12
  import { unwrapResult } from '../utils/unwrapResult';
12
- export { EMOJIS, EMOJIS_IN_CATEGORIES, extractAllListItemsFromMarkdown, extractBlocksFromMarkdown, extractOneBlockFromMarkdown, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimEndOfCodeBlock, unwrapResult, };
13
+ export { EMOJIS, EMOJIS_IN_CATEGORIES, extractAllListItemsFromMarkdown, extractBlocksFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimEndOfCodeBlock, unwrapResult, };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Function isValidJsonString will tell you if the string is valid JSON or not
3
+ */
4
+ export declare function isValidJsonString(value: string): boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -8,7 +8,3 @@ import { Parameters } from '../types/Parameters';
8
8
  * @returns the template with replaced parameters
9
9
  */
10
10
  export declare function replaceParameters(template: string_template, parameters: Parameters): string;
11
- /**
12
- * TODO: [🧠] More advanced templating
13
- * TODO: [🧠] Maybe use some template engine / library not own simple implementation
14
- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/remote-server",
3
- "version": "0.21.1",
3
+ "version": "0.22.1",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -35,10 +35,10 @@
35
35
  "homepage": "https://www.npmjs.com/package/@promptbook/core",
36
36
  "dependencies": {
37
37
  "socket.io": "4.7.2",
38
- "spacetrim": "0.9.14"
38
+ "spacetrim": "0.9.15"
39
39
  },
40
40
  "peerDependencies": {
41
- "@promptbook/core": "0.21.1"
41
+ "@promptbook/core": "0.22.1"
42
42
  },
43
43
  "main": "./umd/index.umd.js",
44
44
  "module": "./esm/index.es.js",
@@ -1,4 +1,5 @@
1
1
  import { EMOJIS, EMOJIS_IN_CATEGORIES } from '../utils/emojis';
2
+ import { isValidJsonString } from '../utils/isValidJsonString';
2
3
  import { extractAllListItemsFromMarkdown } from '../utils/markdown/extractAllListItemsFromMarkdown';
3
4
  import { extractBlocksFromMarkdown } from '../utils/markdown/extractBlocksFromMarkdown';
4
5
  import { extractOneBlockFromMarkdown } from '../utils/markdown/extractOneBlockFromMarkdown';
@@ -9,4 +10,4 @@ import { removeQuotes } from '../utils/removeQuotes';
9
10
  import { replaceParameters } from '../utils/replaceParameters';
10
11
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
11
12
  import { unwrapResult } from '../utils/unwrapResult';
12
- export { EMOJIS, EMOJIS_IN_CATEGORIES, extractAllListItemsFromMarkdown, extractBlocksFromMarkdown, extractOneBlockFromMarkdown, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimEndOfCodeBlock, unwrapResult, };
13
+ export { EMOJIS, EMOJIS_IN_CATEGORIES, extractAllListItemsFromMarkdown, extractBlocksFromMarkdown, extractOneBlockFromMarkdown, isValidJsonString, removeContentComments, removeEmojis, removeMarkdownFormatting, removeQuotes, replaceParameters, trimEndOfCodeBlock, unwrapResult, };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Function isValidJsonString will tell you if the string is valid JSON or not
3
+ */
4
+ export declare function isValidJsonString(value: string): boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -8,7 +8,3 @@ import { Parameters } from '../types/Parameters';
8
8
  * @returns the template with replaced parameters
9
9
  */
10
10
  export declare function replaceParameters(template: string_template, parameters: Parameters): string;
11
- /**
12
- * TODO: [🧠] More advanced templating
13
- * TODO: [🧠] Maybe use some template engine / library not own simple implementation
14
- */