@promptbook/utils 0.48.1-0 → 0.49.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.
- package/README.md +1 -5
- package/esm/index.es.js +1 -1
- package/esm/typings/conversion/promptbookJsonToString.d.ts +6 -3
- package/esm/typings/types/PromptbookJson/PromptTemplateJson.d.ts +2 -2
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/typings/conversion/promptbookJsonToString.d.ts +6 -3
- package/umd/typings/types/PromptbookJson/PromptTemplateJson.d.ts +2 -2
package/README.md
CHANGED
|
@@ -5,12 +5,11 @@ Library to supercharge your use of large language models
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
9
8
|
[ Promptbook](https://badge.fury.io/js/promptbook.svg)](https://www.npmjs.com/package/promptbook)
|
|
10
9
|
[ Promptbook](https://packagequality.com/shield/promptbook.svg)](https://packagequality.com/#?package=promptbook)
|
|
11
10
|
[](https://snyk.io/test/github/webgptorg/promptbook)
|
|
12
11
|
[](https://github.com/webgptorg/promptbook/issues)
|
|
13
|
-
|
|
12
|
+
|
|
14
13
|
|
|
15
14
|
[](https://socket.dev/npm/package/@promptbook/utils)
|
|
16
15
|
|
|
@@ -781,9 +780,6 @@ GPTs are chat assistants that can be assigned to specific tasks and materials. B
|
|
|
781
780
|
|
|
782
781
|
|
|
783
782
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
783
|
### Where should I store my promptbooks?
|
|
788
784
|
|
|
789
785
|
If you use raw SDKs, you just put prompts in the sourcecode, mixed in with typescript, javascript, python or whatever programming language you use.
|
package/esm/index.es.js
CHANGED
|
@@ -403,7 +403,7 @@ function removeContentComments(content) {
|
|
|
403
403
|
/**
|
|
404
404
|
* The version of the Promptbook library
|
|
405
405
|
*/
|
|
406
|
-
var PROMPTBOOK_VERSION = '0.
|
|
406
|
+
var PROMPTBOOK_VERSION = '0.49.0';
|
|
407
407
|
|
|
408
408
|
/**
|
|
409
409
|
* Parses the given script and returns the list of all used variables that are not defined in the script
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
2
2
|
import type { PromptbookString } from '../types/PromptbookString';
|
|
3
|
+
/**
|
|
4
|
+
* Converts promptbook in JSON format to string format
|
|
5
|
+
*
|
|
6
|
+
* @param promptbookJson Promptbook in JSON format (.ptbk.json)
|
|
7
|
+
* @returns Promptbook in string format (.ptbk.md)
|
|
8
|
+
*/
|
|
3
9
|
export declare function promptbookJsonToString(promptbookJson: PromptbookJson): PromptbookString;
|
|
4
10
|
/**
|
|
5
|
-
* TODO: !!!!! Implement
|
|
6
|
-
* TODO: !!!!! Annotate and warn
|
|
7
|
-
* TODO: !!!!! Test + test together with promptbookStringToJson
|
|
8
11
|
* TODO: Escape all
|
|
9
12
|
*/
|
|
@@ -6,7 +6,7 @@ import type { number_integer, number_positive_or_zero, string_javascript, string
|
|
|
6
6
|
/**
|
|
7
7
|
* Describes one prompt template in the promptbook
|
|
8
8
|
*/
|
|
9
|
-
export type PromptTemplateJson = LlmTemplateJson | SimpleTemplateJson |
|
|
9
|
+
export type PromptTemplateJson = LlmTemplateJson | SimpleTemplateJson | ScriptJson | PromptDialogJson;
|
|
10
10
|
/**
|
|
11
11
|
* Template for prompt to LLM
|
|
12
12
|
*/
|
|
@@ -50,7 +50,7 @@ interface SimpleTemplateJson extends PromptTemplateJsonCommon {
|
|
|
50
50
|
/**
|
|
51
51
|
* Template for script execution
|
|
52
52
|
*/
|
|
53
|
-
interface
|
|
53
|
+
interface ScriptJson extends PromptTemplateJsonCommon {
|
|
54
54
|
readonly executionType: 'SCRIPT';
|
|
55
55
|
/**
|
|
56
56
|
* Language of the script
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.1",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"moment": "2.30.1",
|
|
38
38
|
"prettier": "2.8.1",
|
|
39
|
-
"spacetrim": "0.11.
|
|
39
|
+
"spacetrim": "0.11.25"
|
|
40
40
|
},
|
|
41
41
|
"funding": [
|
|
42
42
|
{
|
package/umd/index.umd.js
CHANGED
|
@@ -408,7 +408,7 @@
|
|
|
408
408
|
/**
|
|
409
409
|
* The version of the Promptbook library
|
|
410
410
|
*/
|
|
411
|
-
var PROMPTBOOK_VERSION = '0.
|
|
411
|
+
var PROMPTBOOK_VERSION = '0.49.0';
|
|
412
412
|
|
|
413
413
|
/**
|
|
414
414
|
* Parses the given script and returns the list of all used variables that are not defined in the script
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
2
2
|
import type { PromptbookString } from '../types/PromptbookString';
|
|
3
|
+
/**
|
|
4
|
+
* Converts promptbook in JSON format to string format
|
|
5
|
+
*
|
|
6
|
+
* @param promptbookJson Promptbook in JSON format (.ptbk.json)
|
|
7
|
+
* @returns Promptbook in string format (.ptbk.md)
|
|
8
|
+
*/
|
|
3
9
|
export declare function promptbookJsonToString(promptbookJson: PromptbookJson): PromptbookString;
|
|
4
10
|
/**
|
|
5
|
-
* TODO: !!!!! Implement
|
|
6
|
-
* TODO: !!!!! Annotate and warn
|
|
7
|
-
* TODO: !!!!! Test + test together with promptbookStringToJson
|
|
8
11
|
* TODO: Escape all
|
|
9
12
|
*/
|
|
@@ -6,7 +6,7 @@ import type { number_integer, number_positive_or_zero, string_javascript, string
|
|
|
6
6
|
/**
|
|
7
7
|
* Describes one prompt template in the promptbook
|
|
8
8
|
*/
|
|
9
|
-
export type PromptTemplateJson = LlmTemplateJson | SimpleTemplateJson |
|
|
9
|
+
export type PromptTemplateJson = LlmTemplateJson | SimpleTemplateJson | ScriptJson | PromptDialogJson;
|
|
10
10
|
/**
|
|
11
11
|
* Template for prompt to LLM
|
|
12
12
|
*/
|
|
@@ -50,7 +50,7 @@ interface SimpleTemplateJson extends PromptTemplateJsonCommon {
|
|
|
50
50
|
/**
|
|
51
51
|
* Template for script execution
|
|
52
52
|
*/
|
|
53
|
-
interface
|
|
53
|
+
interface ScriptJson extends PromptTemplateJsonCommon {
|
|
54
54
|
readonly executionType: 'SCRIPT';
|
|
55
55
|
/**
|
|
56
56
|
* Language of the script
|