@promptbook/openai 0.52.0-9 → 0.53.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.
Files changed (168) hide show
  1. package/README.md +67 -28
  2. package/esm/index.es.js +1 -1
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/_packages/core.index.d.ts +4 -2
  5. package/esm/typings/_packages/utils.index.d.ts +2 -0
  6. package/esm/typings/conversion/prettify/prettifyPromptbookString.d.ts +1 -1
  7. package/esm/typings/conversion/prettify/renderPromptbookMermaid.d.ts +2 -1
  8. package/esm/typings/conversion/utils/extractParametersFromPromptTemplate.d.ts +3 -3
  9. package/esm/typings/conversion/utils/extractVariables.d.ts +2 -1
  10. package/esm/typings/conversion/validation/_importPromptbook.d.ts +2 -2
  11. package/esm/typings/errors/PromptbookLibraryError.d.ts +7 -0
  12. package/esm/typings/execution/ExecutionTools.d.ts +5 -3
  13. package/esm/typings/execution/LlmExecutionTools.d.ts +4 -2
  14. package/esm/typings/execution/PromptResult.d.ts +5 -1
  15. package/esm/typings/execution/ScriptExecutionTools.d.ts +2 -1
  16. package/esm/typings/execution/UserInterfaceTools.d.ts +2 -1
  17. package/esm/typings/execution/createPromptbookExecutor.d.ts +3 -3
  18. package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +4 -3
  19. package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  20. package/esm/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -3
  21. package/esm/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +2 -1
  22. package/esm/typings/execution/plugins/llm-execution-tools/langtail/LangtailExecutionTools.d.ts +0 -3
  23. package/esm/typings/execution/plugins/llm-execution-tools/mocked/MockedEchoLlmExecutionTools.d.ts +4 -2
  24. package/esm/typings/execution/plugins/llm-execution-tools/mocked/MockedFackedLlmExecutionTools.d.ts +4 -2
  25. package/esm/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.d.ts +1 -1
  26. package/esm/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionTools.d.ts +4 -2
  27. package/esm/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionToolsOptions.d.ts +2 -1
  28. package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +5 -3
  29. package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +1 -1
  30. package/esm/typings/execution/plugins/llm-execution-tools/openai/openai-models.d.ts +1 -1
  31. package/esm/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts +5 -3
  32. package/esm/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -1
  33. package/esm/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Progress.d.ts +1 -1
  34. package/esm/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Response.d.ts +1 -1
  35. package/esm/typings/execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +2 -1
  36. package/esm/typings/execution/plugins/llm-execution-tools/remote/startRemoteServer.d.ts +2 -1
  37. package/esm/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +3 -2
  38. package/esm/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +3 -2
  39. package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +3 -2
  40. package/esm/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -2
  41. package/esm/typings/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +1 -1
  42. package/esm/typings/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +1 -1
  43. package/esm/typings/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +2 -2
  44. package/esm/typings/execution/translation/automatic-translate/translateMessages.d.ts +2 -2
  45. package/esm/typings/execution/utils/forEachAsync.d.ts +18 -0
  46. package/esm/typings/execution/utils/replaceParameters.d.ts +2 -2
  47. package/esm/typings/library/SimplePromptbookLibrary.d.ts +1 -1
  48. package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +30 -6
  49. package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.test.d.ts +1 -0
  50. package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +4 -4
  51. package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.test.d.ts +1 -0
  52. package/esm/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +2 -1
  53. package/esm/typings/library/constructors/createPromptbookLibraryFromSources.test.d.ts +1 -0
  54. package/esm/typings/library/constructors/createPromptbookLibraryFromUrl.d.ts +23 -6
  55. package/esm/typings/library/constructors/createPromptbookSublibrary.d.ts +1 -1
  56. package/esm/typings/library/constructors/justTestFsImport.d.ts +7 -0
  57. package/esm/typings/types/Command.d.ts +5 -2
  58. package/esm/typings/types/Prompt.d.ts +5 -2
  59. package/esm/typings/types/PromptbookJson/PromptTemplateJson.d.ts +8 -1
  60. package/esm/typings/types/PromptbookJson/PromptbookJson.d.ts +2 -1
  61. package/esm/typings/types/TaskProgress.d.ts +2 -1
  62. package/esm/typings/types/execution-report/ExecutionReportJson.d.ts +2 -1
  63. package/esm/typings/types/execution-report/countWorkingDuration.d.ts +1 -1
  64. package/esm/typings/types/typeAliases.d.ts +2 -2
  65. package/esm/typings/utils/emojis.d.ts +1 -1
  66. package/esm/typings/utils/expectation-counters/index.d.ts +2 -1
  67. package/esm/typings/utils/extractParameters.d.ts +2 -1
  68. package/esm/typings/utils/markdown/addAutoGeneratedSection.d.ts +2 -1
  69. package/esm/typings/utils/markdown/createMarkdownChart.d.ts +2 -2
  70. package/esm/typings/utils/markdown/createMarkdownTable.d.ts +2 -1
  71. package/esm/typings/utils/markdown/escapeMarkdownBlock.d.ts +1 -1
  72. package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
  73. package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
  74. package/esm/typings/utils/markdown/removeContentComments.d.ts +2 -1
  75. package/esm/typings/utils/markdown/removeMarkdownFormatting.d.ts +1 -1
  76. package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +1 -1
  77. package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +1 -1
  78. package/esm/typings/utils/normalization/isValidKeyword.d.ts +1 -1
  79. package/esm/typings/utils/normalization/parseKeywords.d.ts +1 -1
  80. package/esm/typings/utils/normalization/parseKeywordsFromString.d.ts +1 -1
  81. package/esm/typings/utils/normalization/searchKeywords.d.ts +1 -1
  82. package/esm/typings/utils/postprocessing/extractBlock.d.ts +1 -1
  83. package/package.json +2 -2
  84. package/umd/index.umd.js +1 -1
  85. package/umd/index.umd.js.map +1 -1
  86. package/umd/typings/_packages/core.index.d.ts +4 -2
  87. package/umd/typings/_packages/utils.index.d.ts +2 -0
  88. package/umd/typings/conversion/prettify/prettifyPromptbookString.d.ts +1 -1
  89. package/umd/typings/conversion/prettify/renderPromptbookMermaid.d.ts +2 -1
  90. package/umd/typings/conversion/utils/extractParametersFromPromptTemplate.d.ts +3 -3
  91. package/umd/typings/conversion/utils/extractVariables.d.ts +2 -1
  92. package/umd/typings/conversion/validation/_importPromptbook.d.ts +2 -2
  93. package/umd/typings/errors/PromptbookLibraryError.d.ts +7 -0
  94. package/umd/typings/execution/ExecutionTools.d.ts +5 -3
  95. package/umd/typings/execution/LlmExecutionTools.d.ts +4 -2
  96. package/umd/typings/execution/PromptResult.d.ts +5 -1
  97. package/umd/typings/execution/ScriptExecutionTools.d.ts +2 -1
  98. package/umd/typings/execution/UserInterfaceTools.d.ts +2 -1
  99. package/umd/typings/execution/createPromptbookExecutor.d.ts +3 -3
  100. package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +4 -3
  101. package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  102. package/umd/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -3
  103. package/umd/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +2 -1
  104. package/umd/typings/execution/plugins/llm-execution-tools/langtail/LangtailExecutionTools.d.ts +0 -3
  105. package/umd/typings/execution/plugins/llm-execution-tools/mocked/MockedEchoLlmExecutionTools.d.ts +4 -2
  106. package/umd/typings/execution/plugins/llm-execution-tools/mocked/MockedFackedLlmExecutionTools.d.ts +4 -2
  107. package/umd/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.d.ts +1 -1
  108. package/umd/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionTools.d.ts +4 -2
  109. package/umd/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionToolsOptions.d.ts +2 -1
  110. package/umd/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +5 -3
  111. package/umd/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +1 -1
  112. package/umd/typings/execution/plugins/llm-execution-tools/openai/openai-models.d.ts +1 -1
  113. package/umd/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts +5 -3
  114. package/umd/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -1
  115. package/umd/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Progress.d.ts +1 -1
  116. package/umd/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Response.d.ts +1 -1
  117. package/umd/typings/execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +2 -1
  118. package/umd/typings/execution/plugins/llm-execution-tools/remote/startRemoteServer.d.ts +2 -1
  119. package/umd/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +3 -2
  120. package/umd/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +3 -2
  121. package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +3 -2
  122. package/umd/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -2
  123. package/umd/typings/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +1 -1
  124. package/umd/typings/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +1 -1
  125. package/umd/typings/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +2 -2
  126. package/umd/typings/execution/translation/automatic-translate/translateMessages.d.ts +2 -2
  127. package/umd/typings/execution/utils/forEachAsync.d.ts +18 -0
  128. package/umd/typings/execution/utils/replaceParameters.d.ts +2 -2
  129. package/umd/typings/library/SimplePromptbookLibrary.d.ts +1 -1
  130. package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +30 -6
  131. package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.test.d.ts +1 -0
  132. package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +4 -4
  133. package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.test.d.ts +1 -0
  134. package/umd/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +2 -1
  135. package/umd/typings/library/constructors/createPromptbookLibraryFromSources.test.d.ts +1 -0
  136. package/umd/typings/library/constructors/createPromptbookLibraryFromUrl.d.ts +23 -6
  137. package/umd/typings/library/constructors/createPromptbookSublibrary.d.ts +1 -1
  138. package/umd/typings/library/constructors/justTestFsImport.d.ts +7 -0
  139. package/umd/typings/types/Command.d.ts +5 -2
  140. package/umd/typings/types/Prompt.d.ts +5 -2
  141. package/umd/typings/types/PromptbookJson/PromptTemplateJson.d.ts +8 -1
  142. package/umd/typings/types/PromptbookJson/PromptbookJson.d.ts +2 -1
  143. package/umd/typings/types/TaskProgress.d.ts +2 -1
  144. package/umd/typings/types/execution-report/ExecutionReportJson.d.ts +2 -1
  145. package/umd/typings/types/execution-report/countWorkingDuration.d.ts +1 -1
  146. package/umd/typings/types/typeAliases.d.ts +2 -2
  147. package/umd/typings/utils/emojis.d.ts +1 -1
  148. package/umd/typings/utils/expectation-counters/index.d.ts +2 -1
  149. package/umd/typings/utils/extractParameters.d.ts +2 -1
  150. package/umd/typings/utils/markdown/addAutoGeneratedSection.d.ts +2 -1
  151. package/umd/typings/utils/markdown/createMarkdownChart.d.ts +2 -2
  152. package/umd/typings/utils/markdown/createMarkdownTable.d.ts +2 -1
  153. package/umd/typings/utils/markdown/escapeMarkdownBlock.d.ts +1 -1
  154. package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
  155. package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
  156. package/umd/typings/utils/markdown/removeContentComments.d.ts +2 -1
  157. package/umd/typings/utils/markdown/removeMarkdownFormatting.d.ts +1 -1
  158. package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +1 -1
  159. package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +1 -1
  160. package/umd/typings/utils/normalization/isValidKeyword.d.ts +1 -1
  161. package/umd/typings/utils/normalization/parseKeywords.d.ts +1 -1
  162. package/umd/typings/utils/normalization/parseKeywordsFromString.d.ts +1 -1
  163. package/umd/typings/utils/normalization/searchKeywords.d.ts +1 -1
  164. package/umd/typings/utils/postprocessing/extractBlock.d.ts +1 -1
  165. package/esm/typings/wizzard/Wizzard.d.ts +0 -4
  166. package/esm/typings/wizzard/sample.d.ts +0 -6
  167. package/umd/typings/wizzard/Wizzard.d.ts +0 -4
  168. package/umd/typings/wizzard/sample.d.ts +0 -6
package/README.md CHANGED
@@ -11,7 +11,6 @@ Library to supercharge your use of large language models
11
11
  [![Issues](https://img.shields.io/github/issues/webgptorg/promptbook.svg?style=flat)](https://github.com/webgptorg/promptbook/issues)
12
12
 
13
13
 
14
- [![Socket Badge](https://socket.dev/api/badge/npm/package/@promptbook/openai)](https://socket.dev/npm/package/@promptbook/openai)
15
14
 
16
15
 
17
16
 
@@ -30,11 +29,9 @@ npm i ptbk
30
29
  npm i @promptbook/openai
31
30
  ```
32
31
 
33
- Wrapper around [OpenAI's SDK](https://www.npmjs.com/package/openai) to make it easier to use inside Promptbooks.
32
+ `@promptbook/openai` integrates [OpenAI's API](https://openai.com/) with [Promptbook](https://github.com/webgptorg/promptbook). It allows to execute Promptbooks with OpenAI GPT models.
34
33
 
35
-
36
-
37
- ## Usage
34
+ ## 🧡 Usage
38
35
 
39
36
  ```typescript
40
37
  import {
@@ -45,40 +42,91 @@ import {
45
42
  import { JavascriptExecutionTools } from '@promptbook/execute-javascript';
46
43
  import { OpenAiExecutionTools } from '@promptbook/openai';
47
44
 
48
- // Create whole Promptbook library
49
- const library = createPromptbookLibraryFromDirectory('./promptbook');
45
+ // Create whole Promptbook library
46
+ const library = await createPromptbookLibraryFromDirectory('./promptbook-library');
50
47
 
51
- // Get one Promptbook
52
- const promptbook = library.getPromptbookByUrl(`https://promptbook.studio/my-library/write-article.ptbk.md`);
48
+ // Get one Promptbook
49
+ const promptbook = await library.getPromptbookByUrl(`https://promptbook.studio/my-library/write-article.ptbk.md`);
53
50
 
54
- // Prepare tools
51
+ // Prepare tools
55
52
  const tools = {
56
53
  llm: new OpenAiExecutionTools({
54
+ isVerbose: true,
57
55
  apiKey: process.env.OPENAI_API_KEY,
58
56
  }),
59
57
  script: [new JavascriptExecutionTools()],
60
58
  };
61
59
 
62
- // Create executor - the function that will execute the Promptbook
60
+ // Create executor - the function that will execute the Promptbook
63
61
  const promptbookExecutor = createPromptbookExecutor({ promptbook, tools });
64
62
 
65
- // Prepare input parameters
63
+ // Prepare input parameters
66
64
  const inputParameters = { word: 'cat' };
67
65
 
68
- // 🚀 Execute the Promptbook
66
+ // 🚀▶ Execute the Promptbook
69
67
  const result = await promptbookExecutor(inputParameters);
70
68
 
71
- // Fail if the execution was not successful
69
+ // Fail if the execution was not successful
72
70
  assertsExecutionSuccessful(result);
73
71
 
74
- // Handle the result
72
+ // Handle the result
75
73
  const { isSuccessful, errors, outputParameters, executionReport } = result;
76
74
  console.info(outputParameters);
77
75
  ```
78
76
 
77
+ ## 💕 Usage of multiple LLM providers
78
+
79
+ You can use multiple LLM providers in one Promptbook execution. The best model will be chosen automatically according to the prompt and the model's capabilities.
80
+
81
+ ```typescript
82
+ import {
83
+ createPromptbookExecutor,
84
+ createPromptbookLibraryFromDirectory,
85
+ assertsExecutionSuccessful,
86
+ } from '@promptbook/core';
87
+ import { JavascriptExecutionTools } from '@promptbook/execute-javascript';
88
+ import { OpenAiExecutionTools } from '@promptbook/openai';
89
+
90
+ // ▶ Create whole Promptbook library
91
+ const library = await createPromptbookLibraryFromDirectory('./promptbook-library');
79
92
 
93
+ // ▶ Get one Promptbook
94
+ const promptbook = await library.getPromptbookByUrl(`https://promptbook.studio/my-library/write-article.ptbk.md`);
80
95
 
81
- ## Other models
96
+ // Prepare tools
97
+ const tools = new MultipleLlmExecutionTools(
98
+ // Note: You can use multiple LLM providers in one Promptbook execution. The best model will be chosen automatically according to the prompt and the model's capabilities.
99
+ new OpenAiExecutionTools({
100
+ apiKey: process.env.OPENAI_API_KEY,
101
+ }),
102
+ new AnthropicClaudeExecutionTools({
103
+ apiKey: process.env.ANTHROPIC_CLAUDE_API_KEY,
104
+ }),
105
+ new AzureOpenAiExecutionTools({
106
+ resourceName: process.env.AZUREOPENAI_RESOURCE_NAME,
107
+ deploymentName: process.env.AZUREOPENAI_DEPLOYMENT_NAME,
108
+ apiKey: process.env.AZUREOPENAI_API_KEY,
109
+ }),
110
+ );
111
+
112
+ // ▶ Create executor - the function that will execute the Promptbook
113
+ const promptbookExecutor = createPromptbookExecutor({ promptbook, tools });
114
+
115
+ // ▶ Prepare input parameters
116
+ const inputParameters = { word: 'dog' };
117
+
118
+ // 🚀▶ Execute the Promptbook
119
+ const result = await promptbookExecutor(inputParameters);
120
+
121
+ // ▶ Fail if the execution was not successful
122
+ assertsExecutionSuccessful(result);
123
+
124
+ // ▶ Handle the result
125
+ const { isSuccessful, errors, outputParameters, executionReport } = result;
126
+ console.info(outputParameters);
127
+ ```
128
+
129
+ ## 💙 Integration with other models
82
130
 
83
131
  See the other models available in the Promptbook package:
84
132
 
@@ -86,6 +134,8 @@ See the other models available in the Promptbook package:
86
134
  - [Anthropic Claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)
87
135
 
88
136
 
137
+
138
+
89
139
  ---
90
140
 
91
141
  Rest of the documentation is common for **entire promptbook ecosystem**:
@@ -124,15 +174,6 @@ In any of these situations, but especially in (3), the Promptbook library can ma
124
174
  - _(Not ready yet)_ Leverage the **streaming** to make super cool UI/UX.
125
175
  - _(Not ready yet)_ **A/B testing** to determine which prompt works best for the job.
126
176
 
127
- ![WebGPT](./other/screencasts/screencast-fiabciakcmgepblmdkmemdbbkilneeeh-2023.10.26-21_46_17.gif)
128
-
129
- ## 🧔 Promptbook _(for prompt-engeneers)_
130
-
131
- **P**romp**t** **b**oo**k** markdown file (**PTBK** for short, or `.ptbk.md`) is document that describes a series of prompts that are chained together to form somewhat reciepe for transforming natural language input. Inside a PTBK you can use chat prompts, completion prompts, scripting or trigger interaction with user to ask for additional information.
132
-
133
- - Multiple promptbooks forms a library which will become a **part of your application codebase**.
134
- - Theese promptbooks are designed such as they **can be written by non-programmers**.
135
-
136
177
 
137
178
 
138
179
  ### Sample:
@@ -145,7 +186,7 @@ File `write-website-content.ptbk.md`:
145
186
  >
146
187
  > Instructions for creating web page content.
147
188
  >
148
- > - PROMPTBOOK URL https://promptbook.webgpt.com/en/write-website-content.ptbk.md@v0.1.0
189
+ > - PROMPTBOOK URL https://promptbook.webgpt.com/en/write-website-content.ptbk.md
149
190
  > - PROMPTBOOK VERSION 0.0.1
150
191
  > - INPUT  PARAM `{rawTitle}` Automatically suggested a site name or empty text
151
192
  > - INPUT  PARAM `{rawAssigment}` Automatically generated site entry from image recognition
@@ -604,8 +645,6 @@ _Note: LLMs work with tokens, not characters, but in Promptbooks we want to use
604
645
  ```markdown
605
646
  # ✨ Sample: Expectations
606
647
 
607
- - PROMPTBOOK URL https://promptbook.example.com/samples/postprocessing-2.ptbk.md@v1
608
- - PROMPTBOOK VERSION 1.0.0
609
648
  - INPUT  PARAMETER {yourName} Name of the hero
610
649
 
611
650
  ## 💬 Question
package/esm/index.es.js CHANGED
@@ -675,7 +675,7 @@ var OpenAiExecutionTools = /** @class */ (function () {
675
675
  return OpenAiExecutionTools;
676
676
  }());
677
677
  /**
678
- * TODO: [🍓][] Allow to list compatible models with each variant
678
+ * TODO: [🧠][🧙‍♂️] Maybe there can be some wizzard for thoose who want to use just OpenAI
679
679
  * TODO: Maybe Create some common util for gptChat and gptComplete
680
680
  * TODO: Maybe make custom OpenaiError
681
681
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/execution/plugins/llm-execution-tools/openai/computeUsage.ts","../../../src/execution/plugins/llm-execution-tools/openai/openai-models.ts","../../../src/errors/PromptbookExecutionError.ts","../../../src/utils/getCurrentIsoDate.ts","../../../src/execution/plugins/llm-execution-tools/openai/computeOpenaiUsage.ts","../../../src/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null,null,null],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;AACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;AACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;AACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1G,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AACF;AACO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;AAChC,IAAI,IAAI,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,IAAI;AAC7C,QAAQ,MAAM,IAAI,SAAS,CAAC,sBAAsB,GAAG,MAAM,CAAC,CAAC,CAAC,G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,OAAA,SAAS,KAAK,QAAQ;SAAA,CAAE,CAAC;KACzE;;;;IAKO,wDAAyB,GAAjC;QACI,OAAO,aAAa,CAAC,IAAI,CAAC,UAAC,EAAa;gBAAX,SAAS,eAAA;YAAO,OAAA,SAAS,KAAK,wBAAwB;SAAA,CAAE,CAAC;KACzF;;;;IAKM,yCAAU,GAAjB;;;;;;;;QASI,OAAO,aAAa,CAAC;KACxB;IACL,2BAAC;AAAD,CAAC,IAAA;AAED;;;;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/execution/plugins/llm-execution-tools/openai/computeUsage.ts","../../../src/execution/plugins/llm-execution-tools/openai/openai-models.ts","../../../src/errors/PromptbookExecutionError.ts","../../../src/utils/getCurrentIsoDate.ts","../../../src/execution/plugins/llm-execution-tools/openai/computeOpenaiUsage.ts","../../../src/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null,null,null,null],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;AACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;AACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;AACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1G,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AACF;AACO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;AAChC,IAAI,IAAI,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,IAAI;AAC7C,QAAQ,MAAM,IAAI,SAAS,CAAC,sBAAsB,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,+BAA+B,CAAC,CAAC;AAClG,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxB,IAAI,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;AAC3C,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC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;;;;;;"}
@@ -10,17 +10,19 @@ import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interfa
10
10
  import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
11
11
  import { checkExpectations, isPassingExpectations } from '../execution/utils/checkExpectations';
12
12
  import { createPromptbookLibraryFromDirectory } from '../library/constructors/createPromptbookLibraryFromDirectory';
13
- import { createPromptbookLibraryFromPromise } from '../library/constructors/createPromptbookLibraryFromPromise';
14
13
  import { createPromptbookLibraryFromSources } from '../library/constructors/createPromptbookLibraryFromSources';
14
+ import { createPromptbookLibraryFromUrl } from '../library/constructors/createPromptbookLibraryFromUrl';
15
15
  import { createPromptbookSublibrary } from '../library/constructors/createPromptbookSublibrary';
16
+ import { justTestFsImport } from '../library/constructors/justTestFsImport';
16
17
  import { SimplePromptbookLibrary } from '../library/SimplePromptbookLibrary';
17
18
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
18
19
  import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
19
20
  import { ExecutionTypes } from '../types/ExecutionTypes';
20
21
  import { PROMPTBOOK_VERSION } from '../version';
22
+ export { justTestFsImport };
21
23
  export { ExecutionTypes, PROMPTBOOK_VERSION };
22
24
  export { assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prettifyPromptbookString, };
23
- export { createPromptbookLibraryFromDirectory, createPromptbookLibraryFromPromise, createPromptbookLibraryFromSources, createPromptbookSublibrary, SimplePromptbookLibrary, };
25
+ export { createPromptbookLibraryFromDirectory, createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, SimplePromptbookLibrary, };
24
26
  export { SimplePromptInterfaceTools };
25
27
  export { promptbookJsonToString, promptbookStringToJson, validatePromptbookJson };
26
28
  export { createPromptbookExecutor, MultipleLlmExecutionTools };
@@ -5,6 +5,7 @@ import { extractVariables } from '../conversion/utils/extractVariables';
5
5
  import { parseNumber } from '../conversion/utils/parseNumber';
6
6
  import { renameParameter } from '../conversion/utils/renameParameter';
7
7
  import { titleToName } from '../conversion/utils/titleToName';
8
+ import { forEachAsync } from '../execution/utils/forEachAsync';
8
9
  import { replaceParameters } from '../execution/utils/replaceParameters';
9
10
  import { CountUtils } from '../utils/expectation-counters';
10
11
  import { countCharacters } from '../utils/expectation-counters/countCharacters';
@@ -46,6 +47,7 @@ import { union } from '../utils/sets/union';
46
47
  import { trimCodeBlock } from '../utils/trimCodeBlock';
47
48
  import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
48
49
  import { unwrapResult } from '../utils/unwrapResult';
50
+ export { forEachAsync };
49
51
  export { extractAllBlocksFromMarkdown, // <- [🌻]
50
52
  extractAllListItemsFromMarkdown, extractBlock, // <- [🌻]
51
53
  extractOneBlockFromMarkdown, extractParameters, extractVariables, isValidJsonString, parseNumber, // <- [🌻]
@@ -1,4 +1,4 @@
1
- import { PromptbookString } from '../../types/PromptbookString';
1
+ import type { PromptbookString } from '../../types/PromptbookString';
2
2
  import type { PrettifyOptions } from './PrettifyOptions';
3
3
  /**
4
4
  * Prettyfies Promptbook string and adds Mermaid graph
@@ -1,4 +1,5 @@
1
- import type { PromptbookJson, PromptTemplateJson } from '../../_packages/types.index';
1
+ import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
+ import type { PromptTemplateJson } from '../../types/PromptbookJson/PromptTemplateJson';
2
3
  import type { string_href } from '../../types/typeAliases';
3
4
  /**
4
5
  * Addtional options for rendering Mermaid graph
@@ -1,5 +1,5 @@
1
- import { PromptTemplateJson } from '../../types/PromptbookJson/PromptTemplateJson';
2
- import { string_name } from '../../types/typeAliases';
1
+ import type { PromptTemplateJson } from '../../types/PromptbookJson/PromptTemplateJson';
2
+ import type { string_name } from '../../types/typeAliases';
3
3
  /**
4
4
  * Parses the prompt template and returns the set of all used parameters
5
5
  *
@@ -10,4 +10,4 @@ import { string_name } from '../../types/typeAliases';
10
10
  export declare function extractParametersFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'executionType' | 'content'>): Set<string_name>;
11
11
  /**
12
12
  * TODO: [🔣] If script require contentLanguage
13
- */
13
+ */
@@ -1,4 +1,5 @@
1
- import { string_javascript, string_javascript_name } from '../../types/typeAliases';
1
+ import type { string_javascript } from '../../types/typeAliases';
2
+ import type { string_javascript_name } from '../../types/typeAliases';
2
3
  /**
3
4
  * Parses the given script and returns the list of all used variables that are not defined in the script
4
5
  *
@@ -1,5 +1,5 @@
1
- import { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
- import { PromptbookString } from '../../types/PromptbookString';
1
+ import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
+ import type { PromptbookString } from '../../types/PromptbookString';
3
3
  /**
4
4
  * Import the text file
5
5
  *
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This error indicates that the promptbook library cannot be propperly loaded
3
+ */
4
+ export declare class PromptbookLibraryError extends Error {
5
+ readonly name = "PromptbookLibraryError";
6
+ constructor(message: string);
7
+ }
@@ -9,6 +9,9 @@ import type { UserInterfaceTools } from './UserInterfaceTools';
9
9
  export type ExecutionTools = {
10
10
  /**
11
11
  * Tools for executing prompts to large language models like GPT-4
12
+ *
13
+ * Tip: Combine multiple LLM execution tools with `MultipleLlmExecutionTools`
14
+ * @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#llm-execution-tools
12
15
  */
13
16
  llm: LlmExecutionTools;
14
17
  /**
@@ -16,15 +19,14 @@ export type ExecutionTools = {
16
19
  *
17
20
  * Note: You can pass multiple ScriptExecutionTools, they will be tried one by one until one of them supports the script
18
21
  * If none of them supports the script, an error is thrown
22
+ * @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#script-execution-tools
19
23
  */
20
24
  script: Array<ScriptExecutionTools>;
21
25
  /**
22
26
  * Tools for interacting with the user
23
27
  *
24
28
  * Note: When undefined, the user interface is disabled and promptbook which requires user interaction will fail
29
+ * @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#user-interface-tools
25
30
  */
26
31
  userInterface?: UserInterfaceTools;
27
32
  };
28
- /**
29
- * TODO: [🍓] !!!! Allow to have more LlmExecutionTools
30
- */
@@ -1,8 +1,10 @@
1
1
  import type { Promisable } from 'type-fest';
2
2
  import type { ModelVariant } from '../types/ModelRequirements';
3
3
  import type { Prompt } from '../types/Prompt';
4
- import type { string_model_name, string_title } from '../types/typeAliases';
5
- import type { PromptChatResult, PromptCompletionResult } from './PromptResult';
4
+ import type { string_model_name } from '../types/typeAliases';
5
+ import type { string_title } from '../types/typeAliases';
6
+ import type { PromptChatResult } from './PromptResult';
7
+ import type { PromptCompletionResult } from './PromptResult';
6
8
  /**
7
9
  * Container for all the tools needed to execute prompts to large language models like GPT-4
8
10
  * On its interface it exposes common methods for prompt execution.
@@ -1,4 +1,8 @@
1
- import type { number_positive_or_zero, number_tokens, number_usd, string_date_iso8601, string_model_name } from '.././types/typeAliases';
1
+ import type { number_positive_or_zero } from '../types/typeAliases';
2
+ import type { number_tokens } from '../types/typeAliases';
3
+ import type { number_usd } from '../types/typeAliases';
4
+ import type { string_date_iso8601 } from '../types/typeAliases';
5
+ import type { string_model_name } from '../types/typeAliases';
2
6
  /**
3
7
  * Prompt result is the simplest concept of execution.
4
8
  * It is the result of executing one prompt _(NOT a template)_.
@@ -1,4 +1,5 @@
1
- import type { string_name, string_script } from '.././types/typeAliases';
1
+ import type { string_name } from '../types/typeAliases';
2
+ import type { string_script } from '../types/typeAliases';
2
3
  import type { ScriptLanguage } from '../types/ScriptLanguage';
3
4
  /**
4
5
  * Represents all the tools needed to EXECUTE SCRIPTs
@@ -1,4 +1,5 @@
1
- import type { number_integer, number_positive } from '../types/typeAliases';
1
+ import type { number_integer } from '../types/typeAliases';
2
+ import type { number_positive } from '../types/typeAliases';
2
3
  /**
3
4
  * Represents all the tools needed to interact with the user.
4
5
  *
@@ -1,6 +1,6 @@
1
- import { PromptbookJson } from '../_packages/types.index';
2
- import { ExecutionTools } from './ExecutionTools';
3
- import { PromptbookExecutor } from './PromptbookExecutor';
1
+ import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
2
+ import type { ExecutionTools } from './ExecutionTools';
3
+ import type { PromptbookExecutor } from './PromptbookExecutor';
4
4
  type CreatePromptbookExecutorSettings = {
5
5
  /**
6
6
  * When executor does not satisfy expectations it will be retried this amount of times
@@ -1,6 +1,8 @@
1
1
  import type { Prompt } from '../../../../types/Prompt';
2
- import type { AvailableModel, LlmExecutionTools } from '../../../LlmExecutionTools';
3
- import type { PromptChatResult, PromptCompletionResult } from '../../../PromptResult';
2
+ import type { AvailableModel } from '../../../LlmExecutionTools';
3
+ import type { LlmExecutionTools } from '../../../LlmExecutionTools';
4
+ import type { PromptChatResult } from '../../../PromptResult';
5
+ import type { PromptCompletionResult } from '../../../PromptResult';
4
6
  import type { AnthropicClaudeExecutionToolsOptions } from './AnthropicClaudeExecutionToolsOptions';
5
7
  /**
6
8
  * Execution Tools for calling Anthropic Claude API.
@@ -36,7 +38,6 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools
36
38
  }
37
39
  /**
38
40
  * TODO: [🧠] Maybe handle errors via transformAnthropicError (like transformAzureError)
39
- * TODO: [🍓][♐] Allow to list compatible models with each variant
40
41
  * TODO: Maybe Create some common util for gptChat and gptComplete
41
42
  * TODO: Maybe make custom OpenaiError
42
43
  */
@@ -1,4 +1,4 @@
1
- import { number_usd } from '../../../../types/typeAliases';
1
+ import type { number_usd } from '../../../../types/typeAliases';
2
2
  import type { AvailableModel } from '../../../LlmExecutionTools';
3
3
  /**
4
4
  * List of available Anthropic Claude models with pricing
@@ -1,6 +1,8 @@
1
1
  import type { Prompt } from '../../../../types/Prompt';
2
- import type { AvailableModel, LlmExecutionTools } from '../../../LlmExecutionTools';
3
- import type { PromptChatResult, PromptCompletionResult } from '../../../PromptResult';
2
+ import type { AvailableModel } from '../../../LlmExecutionTools';
3
+ import type { LlmExecutionTools } from '../../../LlmExecutionTools';
4
+ import type { PromptChatResult } from '../../../PromptResult';
5
+ import type { PromptCompletionResult } from '../../../PromptResult';
4
6
  import type { AzureOpenAiExecutionToolsOptions } from './AzureOpenAiExecutionToolsOptions';
5
7
  /**
6
8
  * Execution Tools for calling Azure OpenAI API.
@@ -35,7 +37,6 @@ export declare class AzureOpenAiExecutionTools implements LlmExecutionTools {
35
37
  listModels(): Promise<Array<AvailableModel>>;
36
38
  }
37
39
  /**
38
- * TODO: [🍓][♐] Allow to list compatible models with each variant
39
40
  * TODO: Maybe Create some common util for gptChat and gptComplete
40
41
  * TODO: Maybe make custom AzureOpenaiError
41
42
  */
@@ -1,4 +1,5 @@
1
- import { string_name, string_token } from '../../../../types/typeAliases';
1
+ import type { string_name } from '../../../../types/typeAliases';
2
+ import type { string_token } from '../../../../types/typeAliases';
2
3
  import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
3
4
  /**
4
5
  * Options for AzureOpenAiExecutionTools
@@ -5,6 +5,3 @@ import { OpenAiExecutionTools } from '../openai/OpenAiExecutionTools';
5
5
  */
6
6
  export declare class LangtailExecutionTools extends OpenAiExecutionTools implements LlmExecutionTools {
7
7
  }
8
- /**
9
- * TODO: [🍓][♐] Allow to list the available prompts in Langtail
10
- */
@@ -1,7 +1,9 @@
1
1
  import type { Prompt } from '../../../../types/Prompt';
2
2
  import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
3
- import type { AvailableModel, LlmExecutionTools } from '../../../LlmExecutionTools';
4
- import type { PromptChatResult, PromptCompletionResult } from '../../../PromptResult';
3
+ import type { AvailableModel } from '../../../LlmExecutionTools';
4
+ import type { LlmExecutionTools } from '../../../LlmExecutionTools';
5
+ import type { PromptChatResult } from '../../../PromptResult';
6
+ import type { PromptCompletionResult } from '../../../PromptResult';
5
7
  /**
6
8
  * Mocked execution Tools for just echoing the requests for testing purposes.
7
9
  */
@@ -1,7 +1,9 @@
1
1
  import type { Prompt } from '../../../../types/Prompt';
2
2
  import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
3
- import type { AvailableModel, LlmExecutionTools } from '../../../LlmExecutionTools';
4
- import type { PromptChatResult, PromptCompletionResult } from '../../../PromptResult';
3
+ import type { AvailableModel } from '../../../LlmExecutionTools';
4
+ import type { LlmExecutionTools } from '../../../LlmExecutionTools';
5
+ import type { PromptChatResult } from '../../../PromptResult';
6
+ import type { PromptCompletionResult } from '../../../PromptResult';
5
7
  /**
6
8
  * Mocked execution Tools for just faking expected responses for testing purposes
7
9
  */
@@ -1,5 +1,5 @@
1
1
  import type { Expectations } from '../../../../types/PromptbookJson/PromptTemplateJson';
2
- import { PostprocessingFunction } from '../../script-execution-tools/javascript/JavascriptExecutionToolsOptions';
2
+ import type { PostprocessingFunction } from '../../script-execution-tools/javascript/JavascriptExecutionToolsOptions';
3
3
  /**
4
4
  * Gets the expectations and creates a fake text that meets the expectations
5
5
  *
@@ -1,6 +1,8 @@
1
1
  import type { Prompt } from '../../../../types/Prompt';
2
- import type { AvailableModel, LlmExecutionTools } from '../../../LlmExecutionTools';
3
- import type { PromptChatResult, PromptCompletionResult } from '../../../PromptResult';
2
+ import type { AvailableModel } from '../../../LlmExecutionTools';
3
+ import type { LlmExecutionTools } from '../../../LlmExecutionTools';
4
+ import type { PromptChatResult } from '../../../PromptResult';
5
+ import type { PromptCompletionResult } from '../../../PromptResult';
4
6
  /**
5
7
  * Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
6
8
  *
@@ -1,4 +1,5 @@
1
- import type { client_id, string_uri } from '../../../../types/typeAliases';
1
+ import type { client_id } from '../../../../types/typeAliases';
2
+ import type { string_uri } from '../../../../types/typeAliases';
2
3
  import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
3
4
  /**
4
5
  * Options for MultipleLlmExecutionTools