@promptbook/node 0.57.1 → 0.58.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 (151) hide show
  1. package/esm/index.es.js +1 -1
  2. package/esm/typings/_packages/anthropic-claude.index.d.ts +2 -2
  3. package/esm/typings/_packages/azure-openai.index.d.ts +3 -4
  4. package/esm/typings/_packages/core.index.d.ts +8 -6
  5. package/esm/typings/_packages/execute-javascript.index.d.ts +2 -2
  6. package/esm/typings/_packages/fake-llm.index.d.ts +2 -2
  7. package/esm/typings/_packages/langtail.index.d.ts +3 -4
  8. package/esm/typings/_packages/openai.index.d.ts +4 -5
  9. package/esm/typings/_packages/remote-client.index.d.ts +4 -5
  10. package/esm/typings/_packages/remote-server.index.d.ts +3 -4
  11. package/esm/typings/_packages/types.index.d.ts +69 -8
  12. package/esm/typings/_packages/utils.index.d.ts +6 -4
  13. package/esm/typings/execution/ScriptExecutionTools.d.ts +1 -1
  14. package/esm/typings/formats/_common/FormatDefinition.d.ts +53 -0
  15. package/esm/typings/formats/index.d.ts +4 -0
  16. package/esm/typings/formats/json/JsonFormatDefinition.d.ts +11 -0
  17. package/esm/typings/formats/xml/XmlFormatDefinition.d.ts +11 -0
  18. package/{umd/typings/execution/plugins/user-interface-execution-tools → esm/typings/knowledgebase/dialogs}/callback/CallbackInterfaceTools.d.ts +2 -2
  19. package/esm/typings/{execution/plugins/user-interface-execution-tools → knowledgebase/dialogs}/callback/CallbackInterfaceToolsOptions.d.ts +2 -2
  20. package/esm/typings/{execution/plugins/user-interface-execution-tools → knowledgebase/dialogs}/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -3
  21. package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +5 -5
  22. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +1 -1
  23. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/anthropic-claude/anthropic-claude-models.d.ts +2 -2
  24. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/azure-openai/AzureOpenAiExecutionTools.d.ts +5 -5
  25. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +3 -3
  26. package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/LangtailExecutionTools.d.ts +1 -1
  27. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/mocked/MockedEchoLlmExecutionTools.d.ts +6 -6
  28. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/mocked/MockedFackedLlmExecutionTools.d.ts +6 -6
  29. package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/fakeTextToExpectations.d.ts +2 -2
  30. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/multiple/MultipleLlmExecutionTools.d.ts +5 -5
  31. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/multiple/MultipleLlmExecutionToolsOptions.d.ts +3 -3
  32. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/openai/OpenAiExecutionTools.d.ts +5 -5
  33. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/openai/OpenAiExecutionToolsOptions.d.ts +2 -2
  34. package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/computeOpenaiUsage.d.ts +3 -3
  35. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/openai/openai-models.d.ts +2 -2
  36. package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/RemoteLlmExecutionTools.d.ts +5 -5
  37. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/remote/RemoteLlmExecutionToolsOptions.d.ts +3 -3
  38. package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Progress.d.ts +1 -1
  39. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/remote/interfaces/Promptbook_Server_Request.d.ts +2 -2
  40. package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Response.d.ts +1 -1
  41. package/{umd/typings/execution/plugins/llm-execution-tools → esm/typings/llm-providers}/remote/interfaces/RemoteServerOptions.d.ts +5 -5
  42. package/esm/typings/scripting/_test/script-execution-errors.test.d.ts +1 -0
  43. package/esm/typings/scripting/_test/script-execution-tools.test.d.ts +1 -0
  44. package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptEvalExecutionTools.d.ts +2 -2
  45. package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptExecutionToolsOptions.d.ts +2 -2
  46. package/{umd/typings/execution/plugins/script-execution-tools → esm/typings/scripting}/python/PythonExecutionTools.d.ts +3 -3
  47. package/esm/typings/{execution/plugins/script-execution-tools → scripting}/typescript/TypescriptExecutionTools.d.ts +3 -3
  48. package/esm/typings/types/Prompt.d.ts +1 -1
  49. package/package.json +2 -2
  50. package/umd/index.umd.js +1 -1
  51. package/umd/typings/_packages/anthropic-claude.index.d.ts +2 -2
  52. package/umd/typings/_packages/azure-openai.index.d.ts +3 -4
  53. package/umd/typings/_packages/core.index.d.ts +8 -6
  54. package/umd/typings/_packages/execute-javascript.index.d.ts +2 -2
  55. package/umd/typings/_packages/fake-llm.index.d.ts +2 -2
  56. package/umd/typings/_packages/langtail.index.d.ts +3 -4
  57. package/umd/typings/_packages/openai.index.d.ts +4 -5
  58. package/umd/typings/_packages/remote-client.index.d.ts +4 -5
  59. package/umd/typings/_packages/remote-server.index.d.ts +3 -4
  60. package/umd/typings/_packages/types.index.d.ts +69 -8
  61. package/umd/typings/_packages/utils.index.d.ts +6 -4
  62. package/umd/typings/execution/ScriptExecutionTools.d.ts +1 -1
  63. package/umd/typings/formats/_common/FormatDefinition.d.ts +53 -0
  64. package/umd/typings/formats/index.d.ts +4 -0
  65. package/umd/typings/formats/json/JsonFormatDefinition.d.ts +11 -0
  66. package/umd/typings/formats/json/utils/isValidJsonString.test.d.ts +1 -0
  67. package/umd/typings/formats/xml/XmlFormatDefinition.d.ts +11 -0
  68. package/{esm/typings/execution/plugins/user-interface-execution-tools → umd/typings/knowledgebase/dialogs}/callback/CallbackInterfaceTools.d.ts +2 -2
  69. package/umd/typings/{execution/plugins/user-interface-execution-tools → knowledgebase/dialogs}/callback/CallbackInterfaceToolsOptions.d.ts +2 -2
  70. package/umd/typings/{execution/plugins/user-interface-execution-tools → knowledgebase/dialogs}/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -3
  71. package/umd/typings/knowledgebase/dialogs/user-interface-execution-tools.test.d.ts +1 -0
  72. package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +5 -5
  73. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +1 -1
  74. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/anthropic-claude/anthropic-claude-models.d.ts +2 -2
  75. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/azure-openai/AzureOpenAiExecutionTools.d.ts +5 -5
  76. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +3 -3
  77. package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/LangtailExecutionTools.d.ts +1 -1
  78. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/mocked/MockedEchoLlmExecutionTools.d.ts +6 -6
  79. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/mocked/MockedFackedLlmExecutionTools.d.ts +6 -6
  80. package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/fakeTextToExpectations.d.ts +2 -2
  81. package/umd/typings/llm-providers/mocked/fakeTextToExpectations.test.d.ts +1 -0
  82. package/umd/typings/llm-providers/mocked/faked-completion.test.d.ts +1 -0
  83. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/multiple/MultipleLlmExecutionTools.d.ts +5 -5
  84. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/multiple/MultipleLlmExecutionToolsOptions.d.ts +3 -3
  85. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/openai/OpenAiExecutionTools.d.ts +5 -5
  86. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/openai/OpenAiExecutionToolsOptions.d.ts +2 -2
  87. package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/computeOpenaiUsage.d.ts +3 -3
  88. package/umd/typings/llm-providers/openai/computeUsage.test.d.ts +1 -0
  89. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/openai/openai-models.d.ts +2 -2
  90. package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/RemoteLlmExecutionTools.d.ts +5 -5
  91. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/remote/RemoteLlmExecutionToolsOptions.d.ts +3 -3
  92. package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Progress.d.ts +1 -1
  93. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/remote/interfaces/Promptbook_Server_Request.d.ts +2 -2
  94. package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Response.d.ts +1 -1
  95. package/{esm/typings/execution/plugins/llm-execution-tools → umd/typings/llm-providers}/remote/interfaces/RemoteServerOptions.d.ts +5 -5
  96. package/umd/typings/scripting/_test/custom-function-async.test.ts.test.d.ts +1 -0
  97. package/umd/typings/scripting/_test/custom-function-missing.test.d.ts +1 -0
  98. package/umd/typings/scripting/_test/custom-function-with-dependencies.test.d.ts +1 -0
  99. package/umd/typings/scripting/_test/custom-function.test.d.ts +1 -0
  100. package/umd/typings/scripting/_test/postprocessing.test.d.ts +1 -0
  101. package/umd/typings/scripting/_test/script-execution-errors.test.d.ts +1 -0
  102. package/umd/typings/scripting/_test/script-execution-tools.test.d.ts +1 -0
  103. package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptEvalExecutionTools.d.ts +2 -2
  104. package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptExecutionToolsOptions.d.ts +2 -2
  105. package/{esm/typings/execution/plugins/script-execution-tools → umd/typings/scripting}/python/PythonExecutionTools.d.ts +3 -3
  106. package/umd/typings/{execution/plugins/script-execution-tools → scripting}/typescript/TypescriptExecutionTools.d.ts +3 -3
  107. package/umd/typings/types/Prompt.d.ts +1 -1
  108. /package/esm/typings/{utils → formats/json/utils}/isValidJsonString.d.ts +0 -0
  109. /package/esm/typings/{utils → formats/json/utils}/isValidJsonString.test.d.ts +0 -0
  110. /package/esm/typings/{execution/plugins/user-interface-execution-tools → knowledgebase/dialogs}/user-interface-execution-tools.test.d.ts +0 -0
  111. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/anthropic-claude/playground/playground.d.ts +0 -0
  112. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/azure-openai/playground/playground.d.ts +0 -0
  113. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/LangtailExecutionToolsOptions.d.ts +0 -0
  114. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/playground/playground.d.ts +0 -0
  115. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/fakeTextToExpectations.test.d.ts +0 -0
  116. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/faked-completion.test.d.ts +0 -0
  117. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/joker.test.d.ts +0 -0
  118. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/mocked-chat.test.d.ts +0 -0
  119. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/mocked-completion.test.d.ts +0 -0
  120. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/multiple/playground/playground.d.ts +0 -0
  121. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/computeUsage.d.ts +0 -0
  122. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/computeUsage.test.d.ts +0 -0
  123. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/playground/playground.d.ts +0 -0
  124. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Error.d.ts +0 -0
  125. /package/esm/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/startRemoteServer.d.ts +0 -0
  126. /package/{umd/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.test.d.ts → esm/typings/scripting/_test/custom-function-async.test.ts.test.d.ts} +0 -0
  127. /package/{umd/typings/execution/plugins/llm-execution-tools/mocked/faked-completion.test.d.ts → esm/typings/scripting/_test/custom-function-missing.test.d.ts} +0 -0
  128. /package/{umd/typings/execution/plugins/llm-execution-tools/openai/computeUsage.test.d.ts → esm/typings/scripting/_test/custom-function-with-dependencies.test.d.ts} +0 -0
  129. /package/{umd/typings/execution/plugins/user-interface-execution-tools/user-interface-execution-tools.test.d.ts → esm/typings/scripting/_test/custom-function.test.d.ts} +0 -0
  130. /package/{umd/typings/utils/isValidJsonString.test.d.ts → esm/typings/scripting/_test/postprocessing.test.d.ts} +0 -0
  131. /package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -0
  132. /package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptExecutionTools.d.ts +0 -0
  133. /package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/utils/preserve.d.ts +0 -0
  134. /package/esm/typings/{execution/plugins/script-execution-tools → scripting}/javascript/utils/unknownToString.d.ts +0 -0
  135. /package/umd/typings/{utils → formats/json/utils}/isValidJsonString.d.ts +0 -0
  136. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/anthropic-claude/playground/playground.d.ts +0 -0
  137. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/azure-openai/playground/playground.d.ts +0 -0
  138. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/LangtailExecutionToolsOptions.d.ts +0 -0
  139. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/langtail/playground/playground.d.ts +0 -0
  140. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/joker.test.d.ts +0 -0
  141. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/mocked-chat.test.d.ts +0 -0
  142. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/mocked/mocked-completion.test.d.ts +0 -0
  143. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/multiple/playground/playground.d.ts +0 -0
  144. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/computeUsage.d.ts +0 -0
  145. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/openai/playground/playground.d.ts +0 -0
  146. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/interfaces/Promptbook_Server_Error.d.ts +0 -0
  147. /package/umd/typings/{execution/plugins/llm-execution-tools → llm-providers}/remote/startRemoteServer.d.ts +0 -0
  148. /package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -0
  149. /package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/JavascriptExecutionTools.d.ts +0 -0
  150. /package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/utils/preserve.d.ts +0 -0
  151. /package/umd/typings/{execution/plugins/script-execution-tools → scripting}/javascript/utils/unknownToString.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import type { TaskProgress } from '../../../../../types/TaskProgress';
1
+ import type { TaskProgress } from '../../../types/TaskProgress';
2
2
  /**
3
3
  * Socket.io progress for remote text generation
4
4
  *
@@ -1,5 +1,5 @@
1
- import type { client_id } from '../../../../../types/typeAliases';
2
- import type { Prompt } from '../../../../../types/Prompt';
1
+ import type { Prompt } from '../../../types/Prompt';
2
+ import type { client_id } from '../../../types/typeAliases';
3
3
  /**
4
4
  * Socket.io progress for remote text generation
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { PromptResult } from '../../../../PromptResult';
1
+ import type { PromptResult } from '../../../execution/PromptResult';
2
2
  /**
3
3
  * Socket.io error for remote text generation
4
4
  *
@@ -1,8 +1,8 @@
1
- import type { PromptbookLibrary } from '../../../../../library/PromptbookLibrary';
2
- import type { client_id } from '../../../../../types/typeAliases';
3
- import type { string_uri } from '../../../../../types/typeAliases';
4
- import type { CommonExecutionToolsOptions } from '../../../../CommonExecutionToolsOptions';
5
- import type { LlmExecutionTools } from '../../../../LlmExecutionTools';
1
+ import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
2
+ import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
3
+ import type { PromptbookLibrary } from '../../../library/PromptbookLibrary';
4
+ import type { client_id } from '../../../types/typeAliases';
5
+ import type { string_uri } from '../../../types/typeAliases';
6
6
  export type RemoteServerOptions = CommonExecutionToolsOptions & {
7
7
  /**
8
8
  * Port on which the server will listen
@@ -1,5 +1,5 @@
1
- import { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../../../ScriptExecutionTools';
2
- import { JavascriptExecutionToolsOptions } from './JavascriptExecutionToolsOptions';
1
+ import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../../execution/ScriptExecutionTools';
2
+ import type { JavascriptExecutionToolsOptions } from './JavascriptExecutionToolsOptions';
3
3
  /**
4
4
  * ScriptExecutionTools for JavaScript implemented via eval
5
5
  *
@@ -1,6 +1,6 @@
1
1
  import type { Promisable } from 'type-fest';
2
- import type { string_javascript_name } from '../../../../types/typeAliases';
3
- import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
2
+ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
3
+ import type { string_javascript_name } from '../../types/typeAliases';
4
4
  /**
5
5
  * Options for javascript execution
6
6
  */
@@ -1,6 +1,6 @@
1
- import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
2
- import type { ScriptExecutionTools } from '../../../ScriptExecutionTools';
3
- import type { ScriptExecutionToolsExecuteOptions } from '../../../ScriptExecutionTools';
1
+ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
2
+ import type { ScriptExecutionTools } from '../../execution/ScriptExecutionTools';
3
+ import type { ScriptExecutionToolsExecuteOptions } from '../../execution/ScriptExecutionTools';
4
4
  /**
5
5
  * ScriptExecutionTools for Python
6
6
  *
@@ -1,6 +1,6 @@
1
- import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
2
- import type { ScriptExecutionTools } from '../../../ScriptExecutionTools';
3
- import type { ScriptExecutionToolsExecuteOptions } from '../../../ScriptExecutionTools';
1
+ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
2
+ import type { ScriptExecutionTools } from '../../execution/ScriptExecutionTools';
3
+ import type { ScriptExecutionToolsExecuteOptions } from '../../execution/ScriptExecutionTools';
4
4
  /**
5
5
  * ScriptExecutionTools for TypeScript
6
6
  *
@@ -1,4 +1,4 @@
1
- import type { PostprocessingFunction } from '../execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions';
1
+ import type { PostprocessingFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions';
2
2
  import type { ExpectFormatCommand } from './Command';
3
3
  import type { ModelRequirements } from './ModelRequirements';
4
4
  import type { Expectations } from './PromptbookJson/PromptTemplateJson';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.57.1",
3
+ "version": "0.58.0",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -48,7 +48,7 @@
48
48
  }
49
49
  ],
50
50
  "peerDependencies": {
51
- "@promptbook/core": "0.57.1"
51
+ "@promptbook/core": "0.58.0"
52
52
  },
53
53
  "main": "./umd/index.umd.js",
54
54
  "module": "./esm/index.es.js",
package/umd/index.umd.js CHANGED
@@ -453,7 +453,7 @@
453
453
  /**
454
454
  * The version of the Promptbook library
455
455
  */
456
- var PROMPTBOOK_VERSION = '0.57.0';
456
+ var PROMPTBOOK_VERSION = '0.57.2';
457
457
 
458
458
  /**
459
459
  * Parses the template and returns the list of all parameter names
@@ -1,5 +1,5 @@
1
- import { AnthropicClaudeExecutionTools } from '../execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools';
2
- import { AnthropicClaudeExecutionToolsOptions } from '../execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
1
+ import { AnthropicClaudeExecutionTools } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionTools';
2
+ import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
3
3
  import { PROMPTBOOK_VERSION } from '../version';
4
4
  export { PROMPTBOOK_VERSION };
5
5
  export { AnthropicClaudeExecutionTools, AnthropicClaudeExecutionToolsOptions };
@@ -1,5 +1,4 @@
1
- import { AzureOpenAiExecutionTools } from '../execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools';
2
- import { AzureOpenAiExecutionToolsOptions } from '../execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionToolsOptions';
1
+ import { AzureOpenAiExecutionTools } from '../llm-providers/azure-openai/AzureOpenAiExecutionTools';
2
+ import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions';
3
3
  import { PROMPTBOOK_VERSION } from '../version';
4
- export { PROMPTBOOK_VERSION };
5
- export { AzureOpenAiExecutionTools, AzureOpenAiExecutionToolsOptions };
4
+ export { AzureOpenAiExecutionTools, AzureOpenAiExecutionToolsOptions, PROMPTBOOK_VERSION };
@@ -13,20 +13,22 @@ import { TemplateError } from '../errors/TemplateError';
13
13
  import { UnexpectedError } from '../errors/UnexpectedError';
14
14
  import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
15
15
  import { createPromptbookExecutor } from '../execution/createPromptbookExecutor';
16
- import { MultipleLlmExecutionTools } from '../execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionTools';
17
- import { CallbackInterfaceTools } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools';
18
- import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions';
19
- import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
16
+ import { CallbackInterfaceTools } from '../knowledgebase/dialogs/callback/CallbackInterfaceTools';
17
+ import type { CallbackInterfaceToolsOptions } from '../knowledgebase/dialogs/callback/CallbackInterfaceToolsOptions';
18
+ import { SimplePromptInterfaceTools } from '../knowledgebase/dialogs/simple-prompt/SimplePromptInterfaceTools';
20
19
  import { addUsage } from '../execution/utils/addUsage';
21
- import { checkExpectations, isPassingExpectations } from '../execution/utils/checkExpectations';
20
+ import { checkExpectations } from '../execution/utils/checkExpectations';
21
+ import { isPassingExpectations } from '../execution/utils/checkExpectations';
22
22
  import { usageToWorktime } from '../execution/utils/usageToWorktime';
23
23
  import { createPromptbookLibraryFromPromise } from '../library/constructors/createPromptbookLibraryFromPromise';
24
24
  import { createPromptbookLibraryFromSources } from '../library/constructors/createPromptbookLibraryFromSources';
25
25
  import { createPromptbookLibraryFromUrl } from '../library/constructors/createPromptbookLibraryFromUrl';
26
26
  import { createPromptbookSublibrary } from '../library/constructors/createPromptbookSublibrary';
27
27
  import { SimplePromptbookLibrary } from '../library/SimplePromptbookLibrary';
28
+ import { MultipleLlmExecutionTools } from '../llm-providers/multiple/MultipleLlmExecutionTools';
28
29
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
29
- import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
30
+ import type { ExecutionReportStringOptions } from '../types/execution-report/ExecutionReportStringOptions';
31
+ import { ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
30
32
  import { ExecutionTypes } from '../types/ExecutionTypes';
31
33
  import { PROMPTBOOK_VERSION } from '../version';
32
34
  export { PROMPTBOOK_VERSION };
@@ -1,6 +1,6 @@
1
1
  import spaceTrim from 'spacetrim';
2
- import { JavascriptEvalExecutionTools } from '../execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools';
3
- import { JavascriptExecutionTools } from '../execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools';
2
+ import { JavascriptEvalExecutionTools } from '../scripting/javascript/JavascriptEvalExecutionTools';
3
+ import { JavascriptExecutionTools } from '../scripting/javascript/JavascriptExecutionTools';
4
4
  import { prettifyMarkdown } from '../utils/markdown/prettifyMarkdown';
5
5
  import { capitalize } from '../utils/normalization/capitalize';
6
6
  import { decapitalize } from '../utils/normalization/decapitalize';
@@ -1,5 +1,5 @@
1
- import { MockedEchoLlmExecutionTools } from '../execution/plugins/llm-execution-tools/mocked/MockedEchoLlmExecutionTools';
2
- import { MockedFackedLlmExecutionTools } from '../execution/plugins/llm-execution-tools/mocked/MockedFackedLlmExecutionTools';
1
+ import { MockedEchoLlmExecutionTools } from '../llm-providers/mocked/MockedEchoLlmExecutionTools';
2
+ import { MockedFackedLlmExecutionTools } from '../llm-providers/mocked/MockedFackedLlmExecutionTools';
3
3
  import { PROMPTBOOK_VERSION } from '../version';
4
4
  export { MockedEchoLlmExecutionTools, MockedFackedLlmExecutionTools, PROMPTBOOK_VERSION };
5
5
  /**
@@ -1,5 +1,4 @@
1
- import { LangtailExecutionTools } from '../execution/plugins/llm-execution-tools/langtail/LangtailExecutionTools';
2
- import { LangtailExecutionToolsOptions } from '../execution/plugins/llm-execution-tools/langtail/LangtailExecutionToolsOptions';
1
+ import { LangtailExecutionTools } from '../llm-providers/langtail/LangtailExecutionTools';
2
+ import type { LangtailExecutionToolsOptions } from '../llm-providers/langtail/LangtailExecutionToolsOptions';
3
3
  import { PROMPTBOOK_VERSION } from '../version';
4
- export { PROMPTBOOK_VERSION };
5
- export { LangtailExecutionTools, LangtailExecutionToolsOptions };
4
+ export { LangtailExecutionTools, LangtailExecutionToolsOptions, PROMPTBOOK_VERSION };
@@ -1,6 +1,5 @@
1
- import { OPENAI_MODELS } from '../execution/plugins/llm-execution-tools/openai/openai-models';
2
- import { OpenAiExecutionTools } from '../execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools';
3
- import { OpenAiExecutionToolsOptions } from '../execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions';
1
+ import { OPENAI_MODELS } from '../llm-providers/openai/openai-models';
2
+ import { OpenAiExecutionTools } from '../llm-providers/openai/OpenAiExecutionTools';
3
+ import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions';
4
4
  import { PROMPTBOOK_VERSION } from '../version';
5
- export { PROMPTBOOK_VERSION };
6
- export { OPENAI_MODELS, OpenAiExecutionTools, OpenAiExecutionToolsOptions };
5
+ export { OPENAI_MODELS, OpenAiExecutionTools, OpenAiExecutionToolsOptions, PROMPTBOOK_VERSION };
@@ -1,6 +1,5 @@
1
- import { RemoteServerOptions } from '../execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions';
2
- import { RemoteLlmExecutionTools } from '../execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools';
3
- import { RemoteLlmExecutionToolsOptions } from '../execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionToolsOptions';
1
+ import type { RemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions';
2
+ import { RemoteLlmExecutionTools } from '../llm-providers/remote/RemoteLlmExecutionTools';
3
+ import type { RemoteLlmExecutionToolsOptions } from '../llm-providers/remote/RemoteLlmExecutionToolsOptions';
4
4
  import { PROMPTBOOK_VERSION } from '../version';
5
- export { PROMPTBOOK_VERSION };
6
- export { RemoteLlmExecutionTools, RemoteLlmExecutionToolsOptions, RemoteServerOptions };
5
+ export { PROMPTBOOK_VERSION, RemoteLlmExecutionTools, RemoteLlmExecutionToolsOptions, RemoteServerOptions };
@@ -1,5 +1,4 @@
1
- import { RemoteServerOptions } from '../execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions';
2
- import { startRemoteServer } from '../execution/plugins/llm-execution-tools/remote/startRemoteServer';
1
+ import type { RemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions';
2
+ import { startRemoteServer } from '../llm-providers/remote/startRemoteServer';
3
3
  import { PROMPTBOOK_VERSION } from '../version';
4
- export { PROMPTBOOK_VERSION };
5
- export { RemoteServerOptions, startRemoteServer };
4
+ export { PROMPTBOOK_VERSION, RemoteServerOptions, startRemoteServer };
@@ -1,16 +1,33 @@
1
1
  import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions';
2
2
  import type { ExecutionTools } from '../execution/ExecutionTools';
3
- import type { AvailableModel, LlmExecutionTools } from '../execution/LlmExecutionTools';
4
- import type { PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, UncertainNumber } from '../execution/PromptResult';
3
+ import type { AvailableModel } from '../execution/LlmExecutionTools';
4
+ import type { LlmExecutionTools } from '../execution/LlmExecutionTools';
5
+ import type { PromptChatResult } from '../execution/PromptResult';
6
+ import type { PromptCommonResult } from '../execution/PromptResult';
7
+ import type { PromptCompletionResult } from '../execution/PromptResult';
8
+ import type { PromptResult } from '../execution/PromptResult';
9
+ import type { PromptResultUsage } from '../execution/PromptResult';
10
+ import type { PromptResultUsageCounts } from '../execution/PromptResult';
11
+ import type { UncertainNumber } from '../execution/PromptResult';
5
12
  import type { PromptbookExecutor } from '../execution/PromptbookExecutor';
6
- import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools';
7
- import type { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools';
8
- import { PromptbookLibrary } from '../library/PromptbookLibrary';
13
+ import type { ScriptExecutionTools } from '../execution/ScriptExecutionTools';
14
+ import type { ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools';
15
+ import type { UserInterfaceTools } from '../execution/UserInterfaceTools';
16
+ import type { UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools';
17
+ import type { PromptbookLibrary } from '../library/PromptbookLibrary';
9
18
  import type { ExecutionType } from '../types/ExecutionTypes';
10
- import type { ModelRequirements, ModelVariant } from '../types/ModelRequirements';
19
+ import type { ModelRequirements } from '../types/ModelRequirements';
20
+ import type { ModelVariant } from '../types/ModelRequirements';
11
21
  import type { Parameters } from '../types/Parameters';
12
22
  import type { Prompt } from '../types/Prompt';
13
- import type { ExpectationAmount, Expectations, ExpectationUnit, LlmTemplateJson, PromptDialogJson, PromptTemplateJson, ScriptJson, SimpleTemplateJson } from '../types/PromptbookJson/PromptTemplateJson';
23
+ import type { ExpectationAmount } from '../types/PromptbookJson/PromptTemplateJson';
24
+ import type { Expectations } from '../types/PromptbookJson/PromptTemplateJson';
25
+ import type { ExpectationUnit } from '../types/PromptbookJson/PromptTemplateJson';
26
+ import type { LlmTemplateJson } from '../types/PromptbookJson/PromptTemplateJson';
27
+ import type { PromptDialogJson } from '../types/PromptbookJson/PromptTemplateJson';
28
+ import type { PromptTemplateJson } from '../types/PromptbookJson/PromptTemplateJson';
29
+ import type { ScriptJson } from '../types/PromptbookJson/PromptTemplateJson';
30
+ import type { SimpleTemplateJson } from '../types/PromptbookJson/PromptTemplateJson';
14
31
  import { EXPECTATION_UNITS } from '../types/PromptbookJson/PromptTemplateJson';
15
32
  import type { PromptTemplateParameterJson } from '../types/PromptbookJson/PromptTemplateParameterJson';
16
33
  import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
@@ -19,7 +36,51 @@ import type { ScriptLanguage } from '../types/ScriptLanguage';
19
36
  import type { TaskProgress } from '../types/TaskProgress';
20
37
  import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
21
38
  import type { string_char_emoji } from '../types/typeAliasEmoji';
22
- import type { client_id, string_char, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_person_fullname, string_prompt, string_promptbook_url, string_promptbook_url_with_hashtemplate, string_script, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_version } from '../types/typeAliases';
39
+ import type { client_id } from '../types/typeAliases';
40
+ import type { string_char } from '../types/typeAliases';
41
+ import type { string_chat_prompt } from '../types/typeAliases';
42
+ import type { string_completion_prompt } from '../types/typeAliases';
43
+ import type { string_data_url } from '../types/typeAliases';
44
+ import type { string_domain } from '../types/typeAliases';
45
+ import type { string_email } from '../types/typeAliases';
46
+ import type { string_file_absolute_path } from '../types/typeAliases';
47
+ import type { string_file_extension } from '../types/typeAliases';
48
+ import type { string_file_path } from '../types/typeAliases';
49
+ import type { string_file_relative_path } from '../types/typeAliases';
50
+ import type { string_filename } from '../types/typeAliases';
51
+ import type { string_folder_absolute_path } from '../types/typeAliases';
52
+ import type { string_folder_path } from '../types/typeAliases';
53
+ import type { string_folder_relative_path } from '../types/typeAliases';
54
+ import type { string_host } from '../types/typeAliases';
55
+ import type { string_hostname } from '../types/typeAliases';
56
+ import type { string_href } from '../types/typeAliases';
57
+ import type { string_html } from '../types/typeAliases';
58
+ import type { string_javascript } from '../types/typeAliases';
59
+ import type { string_javascript_name } from '../types/typeAliases';
60
+ import type { string_license } from '../types/typeAliases';
61
+ import type { string_markdown } from '../types/typeAliases';
62
+ import type { string_markdown_text } from '../types/typeAliases';
63
+ import type { string_mime_type } from '../types/typeAliases';
64
+ import type { string_mime_type_with_wildcard } from '../types/typeAliases';
65
+ import type { string_model_name } from '../types/typeAliases';
66
+ import type { string_name } from '../types/typeAliases';
67
+ import type { string_person_fullname } from '../types/typeAliases';
68
+ import type { string_prompt } from '../types/typeAliases';
69
+ import type { string_promptbook_url } from '../types/typeAliases';
70
+ import type { string_promptbook_url_with_hashtemplate } from '../types/typeAliases';
71
+ import type { string_script } from '../types/typeAliases';
72
+ import type { string_sha256 } from '../types/typeAliases';
73
+ import type { string_tdl } from '../types/typeAliases';
74
+ import type { string_template } from '../types/typeAliases';
75
+ import type { string_text_prompt } from '../types/typeAliases';
76
+ import type { string_title } from '../types/typeAliases';
77
+ import type { string_token } from '../types/typeAliases';
78
+ import type { string_translate_language } from '../types/typeAliases';
79
+ import type { string_uri } from '../types/typeAliases';
80
+ import type { string_uri_part } from '../types/typeAliases';
81
+ import type { string_url } from '../types/typeAliases';
82
+ import type { string_url_image } from '../types/typeAliases';
83
+ import type { string_version } from '../types/typeAliases';
23
84
  import type { FromtoItems } from '../utils/FromtoItems';
24
85
  import { PROMPTBOOK_VERSION } from '../version';
25
86
  export { PROMPTBOOK_VERSION };
@@ -7,15 +7,16 @@ import { renameParameter } from '../conversion/utils/renameParameter';
7
7
  import { titleToName } from '../conversion/utils/titleToName';
8
8
  import { forEachAsync } from '../execution/utils/forEachAsync';
9
9
  import { replaceParameters } from '../execution/utils/replaceParameters';
10
- import { CountUtils } from '../utils/expectation-counters';
10
+ import { isValidJsonString } from '../formats/json/utils/isValidJsonString';
11
+ import { CountUtils } from '../utils/expectation-counters/index';
11
12
  import { countCharacters } from '../utils/expectation-counters/countCharacters';
12
13
  import { countLines } from '../utils/expectation-counters/countLines';
13
14
  import { countPages } from '../utils/expectation-counters/countPages';
14
15
  import { countParagraphs } from '../utils/expectation-counters/countParagraphs';
15
- import { countSentences, splitIntoSentences } from '../utils/expectation-counters/countSentences';
16
+ import { countSentences } from '../utils/expectation-counters/countSentences';
17
+ import { splitIntoSentences } from '../utils/expectation-counters/countSentences';
16
18
  import { countWords } from '../utils/expectation-counters/countWords';
17
19
  import { extractParameters } from '../utils/extractParameters';
18
- import { isValidJsonString } from '../utils/isValidJsonString';
19
20
  import { extractAllBlocksFromMarkdown } from '../utils/markdown/extractAllBlocksFromMarkdown';
20
21
  import { extractAllListItemsFromMarkdown } from '../utils/markdown/extractAllListItemsFromMarkdown';
21
22
  import { extractOneBlockFromMarkdown } from '../utils/markdown/extractOneBlockFromMarkdown';
@@ -24,7 +25,8 @@ import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormat
24
25
  import { capitalize } from '../utils/normalization/capitalize';
25
26
  import { decapitalize } from '../utils/normalization/decapitalize';
26
27
  import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS';
27
- import { IKeywords, string_keyword } from '../utils/normalization/IKeywords';
28
+ import type { IKeywords } from '../utils/normalization/IKeywords';
29
+ import type { string_keyword } from '../utils/normalization/IKeywords';
28
30
  import { isValidKeyword } from '../utils/normalization/isValidKeyword';
29
31
  import { nameToUriPart } from '../utils/normalization/nameToUriPart';
30
32
  import { nameToUriParts } from '../utils/normalization/nameToUriParts';
@@ -1,6 +1,6 @@
1
+ import type { ScriptLanguage } from '../types/ScriptLanguage';
1
2
  import type { string_name } from '../types/typeAliases';
2
3
  import type { string_script } from '../types/typeAliases';
3
- import type { ScriptLanguage } from '../types/ScriptLanguage';
4
4
  /**
5
5
  * Represents all the tools needed to EXECUTE SCRIPTs
6
6
  *
@@ -0,0 +1,53 @@
1
+ import type { string_mime_type } from '../../types/typeAliases';
2
+ import type { string_name } from '../../types/typeAliases';
3
+ /**
4
+ * A format definition is a set of functions that define how to validate, heal and convert response from LLM
5
+ *
6
+ * @see https://github.com/webgptorg/promptbook/discussions/36
7
+ */
8
+ export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends string, TSchema extends object> = {
9
+ /**
10
+ * The name of the format used in .ptbk.md files
11
+ *
12
+ * @sample "JSON"
13
+ */
14
+ readonly name: string_name;
15
+ /**
16
+ * The mime type of the format (if any)
17
+ *
18
+ * @sample "application/json"
19
+ */
20
+ readonly mimeType?: string_mime_type;
21
+ /**
22
+ * Check if a value is fully valid
23
+ *
24
+ * @param value The value to check, for example "{\"foo\": true}"
25
+ * @param schema Optional schema to do extra validation
26
+ */
27
+ isValid(value: string, schema?: TSchema): value is TValue;
28
+ /**
29
+ * Check if a first part of a value is valid
30
+ *
31
+ * @see https://github.com/webgptorg/promptbook/discussions/37
32
+ *
33
+ * @param partialValue Partial value to check, for example "{\"foo\": t"
34
+ * @param schema Optional schema to do extra validation
35
+ */
36
+ canBeValid(partialValue: string, schema?: TSchema): partialValue is TPartialValue;
37
+ /**
38
+ * Heal a value to make it valid if possible
39
+ *
40
+ * Note: This make sense in context of LLMs that often returns slightly invalid values
41
+ * @see https://github.com/webgptorg/promptbook/discussions/31
42
+ *
43
+ * @param value The value to heal, for example "{foo: true}"
44
+ * @param scheme
45
+ * @throws {Error} If the value cannot be healed
46
+ */
47
+ heal(value: string, scheme?: TSchema): TValue;
48
+ };
49
+ /**
50
+ * TODO: [👨‍⚖️] Compute TPartialValue dynamically - PartialString<TValue>
51
+ * TODO: [🧠] Should execution tools be aviable to heal, canBeValid and isValid?
52
+ * TODO: [🧠] llm Provider Bindings
53
+ */
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Definitions for all formats supported by Promptbook
3
+ */
4
+ export declare const FORMAT_DEFINITIONS: import("./_common/FormatDefinition").FormatDefinition<string, string, object>[];
@@ -0,0 +1,11 @@
1
+ import type { FormatDefinition } from '../_common/FormatDefinition';
2
+ /**
3
+ * Definition for JSON format
4
+ */
5
+ export declare const JsonFormatDefinition: FormatDefinition<string, string, object>;
6
+ /**
7
+ * TODO: [🧠] Maybe propper instance of object
8
+ * TODO: [0] Make string_serialized_json
9
+ * TODO: [1] Make type for JSON Schema
10
+ * TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
11
+ */
@@ -0,0 +1,11 @@
1
+ import type { FormatDefinition } from '../_common/FormatDefinition';
2
+ /**
3
+ * Definition for XML format
4
+ */
5
+ export declare const XmlFormatDefinition: FormatDefinition<string, string, object>;
6
+ /**
7
+ * TODO: [🧠] Maybe propper instance of object
8
+ * TODO: [0] Make string_serialized_xml
9
+ * TODO: [1] Make type for XML Schema
10
+ * TODO: [🧠] What to use for validating XMLs - XSD,...
11
+ */
@@ -1,5 +1,5 @@
1
- import type { UserInterfaceTools } from '../../../UserInterfaceTools';
2
- import type { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
1
+ import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools';
2
+ import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
3
3
  import type { CallbackInterfaceToolsOptions } from './CallbackInterfaceToolsOptions';
4
4
  /**
5
5
  * Delagates the user interaction to a async callback function
@@ -1,6 +1,6 @@
1
1
  import type { Promisable } from 'type-fest';
2
- import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
3
- import type { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
2
+ import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
3
+ import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
4
4
  /**
5
5
  * Options for CallbackInterfaceTools
6
6
  */
@@ -1,6 +1,6 @@
1
- import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
2
- import type { UserInterfaceTools } from '../../../UserInterfaceTools';
3
- import type { UserInterfaceToolsPromptDialogOptions } from '../../../UserInterfaceTools';
1
+ import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
2
+ import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools';
3
+ import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
4
4
  /**
5
5
  * Wrapper around `window.prompt` synchronous function that interacts with the user via browser prompt
6
6
  *
@@ -1,8 +1,8 @@
1
- import type { Prompt } from '../../../../types/Prompt';
2
- import type { AvailableModel } from '../../../LlmExecutionTools';
3
- import type { LlmExecutionTools } from '../../../LlmExecutionTools';
4
- import type { PromptChatResult } from '../../../PromptResult';
5
- import type { PromptCompletionResult } from '../../../PromptResult';
1
+ import type { AvailableModel } from '../../execution/LlmExecutionTools';
2
+ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
3
+ import type { PromptChatResult } from '../../execution/PromptResult';
4
+ import type { PromptCompletionResult } from '../../execution/PromptResult';
5
+ import type { Prompt } from '../../types/Prompt';
6
6
  import type { AnthropicClaudeExecutionToolsOptions } from './AnthropicClaudeExecutionToolsOptions';
7
7
  /**
8
8
  * Execution Tools for calling Anthropic Claude API.
@@ -1,5 +1,5 @@
1
1
  import type { ClientOptions } from '@anthropic-ai/sdk';
2
- import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
2
+ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
3
3
  /**
4
4
  * Options for AnthropicClaudeExecutionTools
5
5
  *
@@ -1,5 +1,5 @@
1
- import type { number_usd } from '../../../../types/typeAliases';
2
- import type { AvailableModel } from '../../../LlmExecutionTools';
1
+ import type { AvailableModel } from '../../execution/LlmExecutionTools';
2
+ import type { number_usd } from '../../types/typeAliases';
3
3
  /**
4
4
  * List of available Anthropic Claude models with pricing
5
5
  *
@@ -1,8 +1,8 @@
1
- import type { Prompt } from '../../../../types/Prompt';
2
- import type { AvailableModel } from '../../../LlmExecutionTools';
3
- import type { LlmExecutionTools } from '../../../LlmExecutionTools';
4
- import type { PromptChatResult } from '../../../PromptResult';
5
- import type { PromptCompletionResult } from '../../../PromptResult';
1
+ import type { AvailableModel } from '../../execution/LlmExecutionTools';
2
+ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
3
+ import type { PromptChatResult } from '../../execution/PromptResult';
4
+ import type { PromptCompletionResult } from '../../execution/PromptResult';
5
+ import type { Prompt } from '../../types/Prompt';
6
6
  import type { AzureOpenAiExecutionToolsOptions } from './AzureOpenAiExecutionToolsOptions';
7
7
  /**
8
8
  * Execution Tools for calling Azure OpenAI API.
@@ -1,6 +1,6 @@
1
- import type { string_name } from '../../../../types/typeAliases';
2
- import type { string_token } from '../../../../types/typeAliases';
3
- import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
1
+ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
2
+ import type { string_name } from '../../types/typeAliases';
3
+ import type { string_token } from '../../types/typeAliases';
4
4
  /**
5
5
  * Options for AzureOpenAiExecutionTools
6
6
  *
@@ -1,4 +1,4 @@
1
- import type { LlmExecutionTools } from '../../../LlmExecutionTools';
1
+ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
2
2
  import { OpenAiExecutionTools } from '../openai/OpenAiExecutionTools';
3
3
  /**
4
4
  * Execution Tools for calling OpenAI API.
@@ -1,9 +1,9 @@
1
- import type { Prompt } from '../../../../types/Prompt';
2
- import type { CommonExecutionToolsOptions } from '../../../CommonExecutionToolsOptions';
3
- import type { AvailableModel } from '../../../LlmExecutionTools';
4
- import type { LlmExecutionTools } from '../../../LlmExecutionTools';
5
- import type { PromptChatResult } from '../../../PromptResult';
6
- import type { PromptCompletionResult } from '../../../PromptResult';
1
+ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions';
2
+ import type { AvailableModel } from '../../execution/LlmExecutionTools';
3
+ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
4
+ import type { PromptChatResult } from '../../execution/PromptResult';
5
+ import type { PromptCompletionResult } from '../../execution/PromptResult';
6
+ import type { Prompt } from '../../types/Prompt';
7
7
  /**
8
8
  * Mocked execution Tools for just echoing the requests for testing purposes.
9
9
  */