@promptbook/node 0.101.0-8 β†’ 0.101.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 (88) hide show
  1. package/README.md +0 -4
  2. package/esm/index.es.js +59 -112
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/components.index.d.ts +14 -0
  5. package/esm/typings/src/_packages/core.index.d.ts +12 -0
  6. package/esm/typings/src/_packages/types.index.d.ts +8 -0
  7. package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +11 -4
  8. package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +3 -0
  9. package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +4 -22
  10. package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.d.ts +1 -26
  11. package/esm/typings/src/book-2.0/commitments/ACTION/ACTION.d.ts +2 -8
  12. package/esm/typings/src/book-2.0/commitments/DELETE/DELETE.d.ts +0 -24
  13. package/esm/typings/src/book-2.0/commitments/FORMAT/FORMAT.d.ts +2 -8
  14. package/esm/typings/src/book-2.0/commitments/GOAL/GOAL.d.ts +2 -8
  15. package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -6
  16. package/esm/typings/src/book-2.0/commitments/MEMORY/MEMORY.d.ts +2 -8
  17. package/esm/typings/src/book-2.0/commitments/MESSAGE/MESSAGE.d.ts +2 -8
  18. package/esm/typings/src/book-2.0/commitments/META/META.d.ts +0 -6
  19. package/esm/typings/src/book-2.0/commitments/META_IMAGE/META_IMAGE.d.ts +0 -6
  20. package/esm/typings/src/book-2.0/commitments/META_LINK/META_LINK.d.ts +0 -6
  21. package/esm/typings/src/book-2.0/commitments/MODEL/MODEL.d.ts +25 -10
  22. package/esm/typings/src/book-2.0/commitments/NOTE/NOTE.d.ts +2 -8
  23. package/esm/typings/src/book-2.0/commitments/PERSONA/PERSONA.d.ts +2 -8
  24. package/esm/typings/src/book-2.0/commitments/RULE/RULE.d.ts +0 -12
  25. package/esm/typings/src/book-2.0/commitments/SAMPLE/SAMPLE.d.ts +0 -12
  26. package/esm/typings/src/book-2.0/commitments/SCENARIO/SCENARIO.d.ts +2 -8
  27. package/esm/typings/src/book-2.0/commitments/STYLE/STYLE.d.ts +2 -8
  28. package/esm/typings/src/book-2.0/commitments/_base/createEmptyAgentModelRequirements.d.ts +1 -1
  29. package/esm/typings/src/book-2.0/commitments/index.d.ts +1 -1
  30. package/esm/typings/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +3 -0
  31. package/esm/typings/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +5 -2
  32. package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +3 -0
  33. package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/MockedChat.d.ts +18 -1
  34. package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +8 -0
  35. package/esm/typings/src/book-components/BookEditor/BookEditorInner.d.ts +2 -15
  36. package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +9 -0
  37. package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +13 -0
  38. package/esm/typings/src/book-components/Chat/hooks/index.d.ts +2 -0
  39. package/esm/typings/src/book-components/Chat/hooks/useChatAutoScroll.d.ts +41 -0
  40. package/esm/typings/src/book-components/Chat/hooks/useSendMessageToLlmChat.d.ts +44 -0
  41. package/esm/typings/src/book-components/Chat/utils/parseMessageButtons.d.ts +22 -0
  42. package/esm/typings/src/book-components/icons/PauseIcon.d.ts +8 -0
  43. package/esm/typings/src/book-components/icons/PlayIcon.d.ts +8 -0
  44. package/esm/typings/src/execution/PromptResult.d.ts +2 -4
  45. package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -2
  46. package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +1 -3
  47. package/esm/typings/src/formats/csv/CsvFormatError.d.ts +1 -1
  48. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  49. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +1 -1
  50. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +1 -2
  51. package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +8 -2
  52. package/esm/typings/src/llm-providers/_common/utils/removeUnsupportedModelRequirements.d.ts +25 -0
  53. package/esm/typings/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +7 -18
  54. package/esm/typings/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +11 -0
  55. package/esm/typings/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +2 -1
  56. package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +58 -0
  57. package/esm/typings/src/llm-providers/agent/createAgentLlmExecutionTools.d.ts +29 -0
  58. package/esm/typings/src/llm-providers/agent/playground/playground.d.ts +8 -0
  59. package/esm/typings/src/llm-providers/agent/register-configuration.d.ts +11 -0
  60. package/esm/typings/src/llm-providers/agent/register-constructor.d.ts +13 -0
  61. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +3 -8
  62. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -5
  63. package/esm/typings/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -0
  64. package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +4 -10
  65. package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +4 -6
  66. package/esm/typings/src/llm-providers/ollama/OllamaExecutionTools.d.ts +3 -3
  67. package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +16 -8
  68. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +3 -8
  69. package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +5 -14
  70. package/esm/typings/src/personas/preparePersona.d.ts +1 -0
  71. package/esm/typings/src/remote-server/openapi-types.d.ts +31 -31
  72. package/esm/typings/src/scrapers/markdown/MarkdownScraper.d.ts +1 -2
  73. package/esm/typings/src/types/ModelRequirements.d.ts +2 -4
  74. package/esm/typings/src/utils/color/utils/colorSaturation.d.ts +1 -1
  75. package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +1 -1
  76. package/esm/typings/src/utils/markdown/humanizeAiText.d.ts +0 -1
  77. package/esm/typings/src/utils/markdown/promptbookifyAiText.d.ts +2 -2
  78. package/esm/typings/src/version.d.ts +1 -1
  79. package/package.json +2 -2
  80. package/umd/index.umd.js +59 -112
  81. package/umd/index.umd.js.map +1 -1
  82. package/esm/typings/src/book-2.0/utils/extractAgentMetadata.d.ts +0 -17
  83. package/esm/typings/src/book-2.0/utils/extractProfileImageFromSystemMessage.d.ts +0 -12
  84. package/esm/typings/src/book-components/Chat/examples/ChatMarkdownDemo.d.ts +0 -16
  85. package/esm/typings/src/expectations/drafts/isDomainNameFree.d.ts +0 -10
  86. package/esm/typings/src/expectations/drafts/isGithubNameFree.d.ts +0 -10
  87. package/esm/typings/src/llm-providers/_common/profiles/llmProviderProfiles.d.ts +0 -81
  88. /package/esm/typings/src/llm-providers/_common/{profiles/test/llmProviderProfiles.test.d.ts β†’ utils/removeUnsupportedModelRequirements.test.d.ts} +0 -0
@@ -1,11 +1,10 @@
1
1
  import Anthropic from '@anthropic-ai/sdk';
2
+ import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
2
3
  import type { AvailableModel } from '../../execution/AvailableModel';
3
4
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
4
5
  import type { ChatPromptResult } from '../../execution/PromptResult';
5
6
  import type { Prompt } from '../../types/Prompt';
6
- import type { string_markdown } from '../../types/typeAliases';
7
- import type { string_markdown_text } from '../../types/typeAliases';
8
- import type { string_title } from '../../types/typeAliases';
7
+ import type { string_markdown, string_markdown_text, string_title } from '../../types/typeAliases';
9
8
  import type { AnthropicClaudeExecutionToolsNonProxiedOptions } from './AnthropicClaudeExecutionToolsOptions';
10
9
  /**
11
10
  * Execution Tools for calling Anthropic Claude API.
@@ -28,11 +27,7 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools
28
27
  constructor(options?: AnthropicClaudeExecutionToolsNonProxiedOptions);
29
28
  get title(): string_title & string_markdown_text;
30
29
  get description(): string_markdown;
31
- get profile(): {
32
- name: string;
33
- fullname: string;
34
- color: string;
35
- };
30
+ get profile(): ChatParticipant;
36
31
  getClient(): Promise<Anthropic>;
37
32
  /**
38
33
  * Check the `options` passed to `constructor`
@@ -1,12 +1,10 @@
1
1
  import { OpenAIClient } from '@azure/openai';
2
+ import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
2
3
  import type { AvailableModel } from '../../execution/AvailableModel';
3
4
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
4
- import type { ChatPromptResult } from '../../execution/PromptResult';
5
- import type { CompletionPromptResult } from '../../execution/PromptResult';
5
+ import type { ChatPromptResult, CompletionPromptResult } from '../../execution/PromptResult';
6
6
  import type { Prompt } from '../../types/Prompt';
7
- import type { string_markdown } from '../../types/typeAliases';
8
- import type { string_markdown_text } from '../../types/typeAliases';
9
- import type { string_title } from '../../types/typeAliases';
7
+ import type { string_markdown, string_markdown_text, string_title } from '../../types/typeAliases';
10
8
  import type { AzureOpenAiExecutionToolsOptions } from './AzureOpenAiExecutionToolsOptions';
11
9
  /**
12
10
  * Execution Tools for calling Azure OpenAI API.
@@ -31,6 +29,7 @@ export declare class AzureOpenAiExecutionTools implements LlmExecutionTools {
31
29
  constructor(options: AzureOpenAiExecutionToolsOptions);
32
30
  get title(): string_title & string_markdown_text;
33
31
  get description(): string_markdown;
32
+ get profile(): ChatParticipant;
34
33
  getClient(): Promise<OpenAIClient>;
35
34
  /**
36
35
  * Check the `options` passed to `constructor`
@@ -11,5 +11,6 @@ import type { string_postprocessing_function_name } from '../../types/typeAliase
11
11
  */
12
12
  export declare function $fakeTextToExpectations(expectations: Expectations, postprocessingFunctionNames?: ReadonlyArray<string_postprocessing_function_name>): Promise<string>;
13
13
  /**
14
+ * TODO: Do not use LoremIpsum, but use some faked text that looks more human-promptbook-like
14
15
  * TODO: [πŸ’] Unite object for expecting amount and format - use here also a format
15
16
  */
@@ -1,12 +1,10 @@
1
+ import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
1
2
  import type { AvailableModel } from '../../execution/AvailableModel';
2
3
  import type { CommonToolsOptions } from '../../execution/CommonToolsOptions';
3
4
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
4
- import type { ChatPromptResult } from '../../execution/PromptResult';
5
- import type { CompletionPromptResult } from '../../execution/PromptResult';
5
+ import type { ChatPromptResult, CompletionPromptResult } from '../../execution/PromptResult';
6
6
  import type { Prompt } from '../../types/Prompt';
7
- import type { string_markdown } from '../../types/typeAliases';
8
- import type { string_markdown_text } from '../../types/typeAliases';
9
- import type { string_title } from '../../types/typeAliases';
7
+ import type { string_markdown, string_markdown_text, string_title } from '../../types/typeAliases';
10
8
  /**
11
9
  * Mocked execution Tools for just echoing the requests for testing purposes.
12
10
  *
@@ -17,11 +15,7 @@ export declare class MockedEchoLlmExecutionTools implements LlmExecutionTools {
17
15
  constructor(options?: CommonToolsOptions);
18
16
  get title(): string_title & string_markdown_text;
19
17
  get description(): string_markdown;
20
- get profile(): {
21
- name: string;
22
- fullname: string;
23
- color: string;
24
- };
18
+ get profile(): ChatParticipant;
25
19
  /**
26
20
  * Does nothing, just to implement the interface
27
21
  */
@@ -1,13 +1,10 @@
1
+ import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
1
2
  import type { AvailableModel } from '../../execution/AvailableModel';
2
3
  import type { CommonToolsOptions } from '../../execution/CommonToolsOptions';
3
4
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
4
- import type { ChatPromptResult } from '../../execution/PromptResult';
5
- import type { CompletionPromptResult } from '../../execution/PromptResult';
6
- import type { EmbeddingPromptResult } from '../../execution/PromptResult';
5
+ import type { ChatPromptResult, CompletionPromptResult, EmbeddingPromptResult } from '../../execution/PromptResult';
7
6
  import type { Prompt } from '../../types/Prompt';
8
- import type { string_markdown } from '../../types/typeAliases';
9
- import type { string_markdown_text } from '../../types/typeAliases';
10
- import type { string_title } from '../../types/typeAliases';
7
+ import type { string_markdown, string_markdown_text, string_title } from '../../types/typeAliases';
11
8
  /**
12
9
  * Mocked execution Tools for just faking expected responses for testing purposes
13
10
  *
@@ -18,6 +15,7 @@ export declare class MockedFackedLlmExecutionTools implements LlmExecutionTools
18
15
  constructor(options?: CommonToolsOptions);
19
16
  get title(): string_title & string_markdown_text;
20
17
  get description(): string_markdown;
18
+ get profile(): ChatParticipant;
21
19
  /**
22
20
  * Does nothing, just to implement the interface
23
21
  */
@@ -1,9 +1,8 @@
1
+ import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
1
2
  import type { AvailableModel } from '../../execution/AvailableModel';
2
3
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
3
4
  import type { Usage } from '../../execution/Usage';
4
- import type { string_markdown } from '../../types/typeAliases';
5
- import type { string_markdown_text } from '../../types/typeAliases';
6
- import type { string_title } from '../../types/typeAliases';
5
+ import type { string_markdown, string_markdown_text, string_title } from '../../types/typeAliases';
7
6
  import { computeOpenAiUsage } from '../openai/computeOpenAiUsage';
8
7
  import { OpenAiCompatibleExecutionTools } from '../openai/OpenAiCompatibleExecutionTools';
9
8
  import type { OllamaExecutionToolsOptions } from './OllamaExecutionToolsOptions';
@@ -16,6 +15,7 @@ export declare class OllamaExecutionTools extends OpenAiCompatibleExecutionTools
16
15
  constructor(ollamaOptions: OllamaExecutionToolsOptions);
17
16
  get title(): string_title & string_markdown_text;
18
17
  get description(): string_markdown;
18
+ get profile(): ChatParticipant;
19
19
  /**
20
20
  * List all available models (non dynamically)
21
21
  *
@@ -1,15 +1,10 @@
1
1
  import OpenAI from 'openai';
2
2
  import type { AvailableModel } from '../../execution/AvailableModel';
3
3
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
4
- import type { ChatPromptResult } from '../../execution/PromptResult';
5
- import type { CompletionPromptResult } from '../../execution/PromptResult';
6
- import type { EmbeddingPromptResult } from '../../execution/PromptResult';
4
+ import type { ChatPromptResult, CompletionPromptResult, EmbeddingPromptResult } from '../../execution/PromptResult';
7
5
  import type { Usage } from '../../execution/Usage';
8
6
  import type { Prompt } from '../../types/Prompt';
9
- import type { string_markdown } from '../../types/typeAliases';
10
- import type { string_markdown_text } from '../../types/typeAliases';
11
- import type { string_model_name } from '../../types/typeAliases';
12
- import type { string_title } from '../../types/typeAliases';
7
+ import type { string_markdown, string_markdown_text, string_model_name, string_title } from '../../types/typeAliases';
13
8
  import { computeOpenAiUsage } from './computeOpenAiUsage';
14
9
  import type { OpenAiCompatibleExecutionToolsNonProxiedOptions } from './OpenAiCompatibleExecutionToolsOptions';
15
10
  /**
@@ -27,6 +22,10 @@ export declare abstract class OpenAiCompatibleExecutionTools implements LlmExecu
27
22
  * Rate limiter instance
28
23
  */
29
24
  private limiter;
25
+ /**
26
+ * Tracks models and parameters that have already been retried to prevent infinite loops
27
+ */
28
+ private retriedUnsupportedParameters;
30
29
  /**
31
30
  * Creates OpenAI compatible Execution Tools.
32
31
  *
@@ -48,10 +47,18 @@ export declare abstract class OpenAiCompatibleExecutionTools implements LlmExecu
48
47
  * Calls OpenAI compatible API to use a chat model.
49
48
  */
50
49
  callChatModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements' | 'format'>): Promise<ChatPromptResult>;
50
+ /**
51
+ * Internal method that handles parameter retry for chat model calls
52
+ */
53
+ private callChatModelWithRetry;
51
54
  /**
52
55
  * Calls OpenAI API to use a complete model.
53
56
  */
54
57
  callCompletionModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<CompletionPromptResult>;
58
+ /**
59
+ * Internal method that handles parameter retry for completion model calls
60
+ */
61
+ private callCompletionModelWithRetry;
55
62
  /**
56
63
  * Calls OpenAI compatible API to use a embedding model
57
64
  */
@@ -85,7 +92,7 @@ export declare abstract class OpenAiCompatibleExecutionTools implements LlmExecu
85
92
  /**
86
93
  * Makes a request with retry logic for network errors like ECONNRESET
87
94
  */
88
- private makeRequestWithRetry;
95
+ private makeRequestWithNetworkRetry;
89
96
  /**
90
97
  * Determines if an error is retryable (network-related errors)
91
98
  */
@@ -96,4 +103,5 @@ export declare abstract class OpenAiCompatibleExecutionTools implements LlmExecu
96
103
  * TODO: [πŸ›„] Maybe make custom `OpenAiCompatibleError`
97
104
  * TODO: [🧠][🈁] Maybe use `isDeterministic` from options
98
105
  * TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
106
+ * TODO: [🧠][🦒] Make reverse adapter from LlmExecutionTools to OpenAI-compatible:
99
107
  */
@@ -1,8 +1,7 @@
1
+ import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
1
2
  import type { AvailableModel } from '../../execution/AvailableModel';
2
3
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
3
- import type { string_markdown } from '../../types/typeAliases';
4
- import type { string_markdown_text } from '../../types/typeAliases';
5
- import type { string_title } from '../../types/typeAliases';
4
+ import type { string_markdown, string_markdown_text, string_title } from '../../types/typeAliases';
6
5
  import { computeOpenAiUsage } from './computeOpenAiUsage';
7
6
  import { OpenAiCompatibleExecutionTools } from './OpenAiCompatibleExecutionTools';
8
7
  /**
@@ -13,11 +12,7 @@ import { OpenAiCompatibleExecutionTools } from './OpenAiCompatibleExecutionTools
13
12
  export declare class OpenAiExecutionTools extends OpenAiCompatibleExecutionTools implements LlmExecutionTools {
14
13
  get title(): string_title & string_markdown_text;
15
14
  get description(): string_markdown;
16
- get profile(): {
17
- name: string;
18
- fullname: string;
19
- color: string;
20
- };
15
+ get profile(): ChatParticipant;
21
16
  /**
22
17
  * List all available models (non dynamically)
23
18
  *
@@ -1,15 +1,10 @@
1
+ import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
1
2
  import type { AvailableModel } from '../../execution/AvailableModel';
2
3
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
3
- import type { ChatPromptResult } from '../../execution/PromptResult';
4
- import type { CompletionPromptResult } from '../../execution/PromptResult';
5
- import type { EmbeddingPromptResult } from '../../execution/PromptResult';
4
+ import type { ChatPromptResult, CompletionPromptResult, EmbeddingPromptResult } from '../../execution/PromptResult';
6
5
  import type { RemoteClientOptions } from '../../remote-server/types/RemoteClientOptions';
7
- import type { ChatPrompt } from '../../types/Prompt';
8
- import type { CompletionPrompt } from '../../types/Prompt';
9
- import type { EmbeddingPrompt } from '../../types/Prompt';
10
- import type { string_markdown } from '../../types/typeAliases';
11
- import type { string_markdown_text } from '../../types/typeAliases';
12
- import type { string_title } from '../../types/typeAliases';
6
+ import type { ChatPrompt, CompletionPrompt, EmbeddingPrompt } from '../../types/Prompt';
7
+ import type { string_markdown, string_markdown_text, string_title } from '../../types/typeAliases';
13
8
  /**
14
9
  * Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
15
10
  *
@@ -24,11 +19,7 @@ export declare class RemoteLlmExecutionTools<TCustomOptions = undefined> impleme
24
19
  constructor(options: RemoteClientOptions<TCustomOptions>);
25
20
  get title(): string_title & string_markdown_text;
26
21
  get description(): string_markdown;
27
- get profile(): {
28
- name: string;
29
- fullname: string;
30
- color: string;
31
- };
22
+ get profile(): ChatParticipant;
32
23
  /**
33
24
  * Check the configuration of all execution tools
34
25
  */
@@ -10,6 +10,7 @@ import type { string_persona_description } from '../types/typeAliases';
10
10
  */
11
11
  export declare function preparePersona(personaDescription: string_persona_description, tools: Pick<ExecutionTools, 'llm'>, options: PrepareAndScrapeOptions): Promise<Pick<PersonaPreparedJson, 'modelsRequirements'>>;
12
12
  /**
13
+ * TODO: [😩] DRY `preparePersona` and `selectBestModelFromAvailable`
13
14
  * TODO: [πŸ”ƒ][main] If the persona was prepared with different version or different set of models, prepare it once again
14
15
  * TODO: [🏒] Check validity of `modelName` in pipeline
15
16
  * TODO: [🏒] Check validity of `systemMessage` in pipeline
@@ -3,7 +3,7 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  export type paths = {
6
- readonly "/": {
6
+ readonly '/': {
7
7
  readonly parameters: {
8
8
  readonly query?: never;
9
9
  readonly header?: never;
@@ -29,7 +29,7 @@ export type paths = {
29
29
  readonly [name: string]: unknown;
30
30
  };
31
31
  content: {
32
- readonly "text/markdown": string;
32
+ readonly 'text/markdown': string;
33
33
  };
34
34
  };
35
35
  };
@@ -42,7 +42,7 @@ export type paths = {
42
42
  readonly patch?: never;
43
43
  readonly trace?: never;
44
44
  };
45
- readonly "/login": {
45
+ readonly '/login': {
46
46
  readonly parameters: {
47
47
  readonly query?: never;
48
48
  readonly header?: never;
@@ -64,7 +64,7 @@ export type paths = {
64
64
  };
65
65
  readonly requestBody: {
66
66
  readonly content: {
67
- readonly "application/json": {
67
+ readonly 'application/json': {
68
68
  readonly username?: string;
69
69
  readonly password?: string;
70
70
  readonly appId?: string;
@@ -78,7 +78,7 @@ export type paths = {
78
78
  readonly [name: string]: unknown;
79
79
  };
80
80
  content: {
81
- readonly "application/json": {
81
+ readonly 'application/json': {
82
82
  readonly isSuccess?: boolean;
83
83
  readonly message?: string;
84
84
  readonly error?: Record<string, never>;
@@ -92,7 +92,7 @@ export type paths = {
92
92
  readonly [name: string]: unknown;
93
93
  };
94
94
  content: {
95
- readonly "application/json": {
95
+ readonly 'application/json': {
96
96
  readonly error?: Record<string, never>;
97
97
  };
98
98
  };
@@ -103,7 +103,7 @@ export type paths = {
103
103
  readonly [name: string]: unknown;
104
104
  };
105
105
  content: {
106
- readonly "application/json": {
106
+ readonly 'application/json': {
107
107
  /** @enum {boolean} */
108
108
  readonly isSuccess?: false;
109
109
  readonly message?: string;
@@ -119,7 +119,7 @@ export type paths = {
119
119
  readonly patch?: never;
120
120
  readonly trace?: never;
121
121
  };
122
- readonly "/books": {
122
+ readonly '/books': {
123
123
  readonly parameters: {
124
124
  readonly query?: never;
125
125
  readonly header?: never;
@@ -145,7 +145,7 @@ export type paths = {
145
145
  readonly [name: string]: unknown;
146
146
  };
147
147
  content: {
148
- readonly "application/json": readonly string[];
148
+ readonly 'application/json': readonly string[];
149
149
  };
150
150
  };
151
151
  /** @description No collection available */
@@ -154,7 +154,7 @@ export type paths = {
154
154
  readonly [name: string]: unknown;
155
155
  };
156
156
  content: {
157
- readonly "text/plain": string;
157
+ readonly 'text/plain': string;
158
158
  };
159
159
  };
160
160
  };
@@ -167,7 +167,7 @@ export type paths = {
167
167
  readonly patch?: never;
168
168
  readonly trace?: never;
169
169
  };
170
- readonly "/books/{bookId}": {
170
+ readonly '/books/{bookId}': {
171
171
  readonly parameters: {
172
172
  readonly query?: never;
173
173
  readonly header?: never;
@@ -196,7 +196,7 @@ export type paths = {
196
196
  readonly [name: string]: unknown;
197
197
  };
198
198
  content: {
199
- readonly "text/markdown": string;
199
+ readonly 'text/markdown': string;
200
200
  };
201
201
  };
202
202
  /** @description Book not found. */
@@ -205,7 +205,7 @@ export type paths = {
205
205
  readonly [name: string]: unknown;
206
206
  };
207
207
  content: {
208
- readonly "application/json": {
208
+ readonly 'application/json': {
209
209
  readonly error?: Record<string, never>;
210
210
  };
211
211
  };
@@ -216,7 +216,7 @@ export type paths = {
216
216
  readonly [name: string]: unknown;
217
217
  };
218
218
  content: {
219
- readonly "text/plain": string;
219
+ readonly 'text/plain': string;
220
220
  };
221
221
  };
222
222
  };
@@ -229,7 +229,7 @@ export type paths = {
229
229
  readonly patch?: never;
230
230
  readonly trace?: never;
231
231
  };
232
- readonly "/executions": {
232
+ readonly '/executions': {
233
233
  readonly parameters: {
234
234
  readonly query?: never;
235
235
  readonly header?: never;
@@ -255,7 +255,7 @@ export type paths = {
255
255
  readonly [name: string]: unknown;
256
256
  };
257
257
  content: {
258
- readonly "application/json": readonly {
258
+ readonly 'application/json': readonly {
259
259
  readonly nonce?: string;
260
260
  readonly taskId?: string;
261
261
  readonly taskType?: string;
@@ -277,7 +277,7 @@ export type paths = {
277
277
  readonly patch?: never;
278
278
  readonly trace?: never;
279
279
  };
280
- readonly "/executions/last": {
280
+ readonly '/executions/last': {
281
281
  readonly parameters: {
282
282
  readonly query?: never;
283
283
  readonly header?: never;
@@ -303,7 +303,7 @@ export type paths = {
303
303
  readonly [name: string]: unknown;
304
304
  };
305
305
  content: {
306
- readonly "application/json": {
306
+ readonly 'application/json': {
307
307
  readonly nonce?: string;
308
308
  readonly taskId?: string;
309
309
  readonly taskType?: string;
@@ -324,7 +324,7 @@ export type paths = {
324
324
  readonly [name: string]: unknown;
325
325
  };
326
326
  content: {
327
- readonly "text/plain": string;
327
+ readonly 'text/plain': string;
328
328
  };
329
329
  };
330
330
  };
@@ -337,7 +337,7 @@ export type paths = {
337
337
  readonly patch?: never;
338
338
  readonly trace?: never;
339
339
  };
340
- readonly "/executions/{taskId}": {
340
+ readonly '/executions/{taskId}': {
341
341
  readonly parameters: {
342
342
  readonly query?: never;
343
343
  readonly header?: never;
@@ -366,7 +366,7 @@ export type paths = {
366
366
  readonly [name: string]: unknown;
367
367
  };
368
368
  content: {
369
- readonly "application/json": {
369
+ readonly 'application/json': {
370
370
  readonly nonce?: string;
371
371
  readonly taskId?: string;
372
372
  readonly taskType?: string;
@@ -387,7 +387,7 @@ export type paths = {
387
387
  readonly [name: string]: unknown;
388
388
  };
389
389
  content: {
390
- readonly "text/plain": string;
390
+ readonly 'text/plain': string;
391
391
  };
392
392
  };
393
393
  };
@@ -400,7 +400,7 @@ export type paths = {
400
400
  readonly patch?: never;
401
401
  readonly trace?: never;
402
402
  };
403
- readonly "/executions/new": {
403
+ readonly '/executions/new': {
404
404
  readonly parameters: {
405
405
  readonly query?: never;
406
406
  readonly header?: never;
@@ -422,7 +422,7 @@ export type paths = {
422
422
  };
423
423
  readonly requestBody: {
424
424
  readonly content: {
425
- readonly "application/json": {
425
+ readonly 'application/json': {
426
426
  /** @description URL of the pipeline to execute */
427
427
  readonly pipelineUrl?: string;
428
428
  /** @description Alternative field for pipelineUrl */
@@ -441,7 +441,7 @@ export type paths = {
441
441
  readonly [name: string]: unknown;
442
442
  };
443
443
  content: {
444
- readonly "application/json": Record<string, never>;
444
+ readonly 'application/json': Record<string, never>;
445
445
  };
446
446
  };
447
447
  /** @description Invalid input. */
@@ -450,7 +450,7 @@ export type paths = {
450
450
  readonly [name: string]: unknown;
451
451
  };
452
452
  content: {
453
- readonly "application/json": {
453
+ readonly 'application/json': {
454
454
  readonly error?: Record<string, never>;
455
455
  };
456
456
  };
@@ -461,7 +461,7 @@ export type paths = {
461
461
  readonly [name: string]: unknown;
462
462
  };
463
463
  content: {
464
- readonly "text/plain": string;
464
+ readonly 'text/plain': string;
465
465
  };
466
466
  };
467
467
  };
@@ -472,7 +472,7 @@ export type paths = {
472
472
  readonly patch?: never;
473
473
  readonly trace?: never;
474
474
  };
475
- readonly "/api-docs": {
475
+ readonly '/api-docs': {
476
476
  readonly parameters: {
477
477
  readonly query?: never;
478
478
  readonly header?: never;
@@ -509,7 +509,7 @@ export type paths = {
509
509
  readonly patch?: never;
510
510
  readonly trace?: never;
511
511
  };
512
- readonly "/swagger": {
512
+ readonly '/swagger': {
513
513
  readonly parameters: {
514
514
  readonly query?: never;
515
515
  readonly header?: never;
@@ -546,7 +546,7 @@ export type paths = {
546
546
  readonly patch?: never;
547
547
  readonly trace?: never;
548
548
  };
549
- readonly "/openapi": {
549
+ readonly '/openapi': {
550
550
  readonly parameters: {
551
551
  readonly query?: never;
552
552
  readonly header?: never;
@@ -572,7 +572,7 @@ export type paths = {
572
572
  readonly [name: string]: unknown;
573
573
  };
574
574
  content: {
575
- readonly "application/json": Record<string, never>;
575
+ readonly 'application/json': Record<string, never>;
576
576
  };
577
577
  };
578
578
  };
@@ -1,6 +1,5 @@
1
1
  import type { KnowledgePiecePreparedJson } from '../../pipeline/PipelineJson/KnowledgePieceJson';
2
- import type { Scraper } from '../_common/Scraper';
3
- import type { ScraperSourceHandler } from '../_common/Scraper';
2
+ import type { Scraper, ScraperSourceHandler } from '../_common/Scraper';
4
3
  import type { ExecutionTools } from '../../execution/ExecutionTools';
5
4
  import type { PrepareAndScrapeOptions } from '../../prepare/PrepareAndScrapeOptions';
6
5
  import type { ScraperAndConverterMetadata } from '../_common/register/ScraperAndConverterMetadata';
@@ -1,8 +1,5 @@
1
1
  import type { ModelVariant } from './ModelVariant';
2
- import type { number_model_temperature } from './typeAliases';
3
- import type { number_seed } from './typeAliases';
4
- import type { string_model_name } from './typeAliases';
5
- import type { string_system_message } from './typeAliases';
2
+ import type { number_model_temperature, number_seed, string_model_name, string_system_message } from './typeAliases';
6
3
  /**
7
4
  * Abstract way to specify the LLM.
8
5
  * It does not specify the LLM with concrete version itself, only the requirements for the LLM.
@@ -99,4 +96,5 @@ export type CommonModelRequirements = {
99
96
  * TODO: Add here more requirement options like max context size, max tokens, etc.
100
97
  * TODO: [πŸ’•][🧠] Just selecting gpt3 or gpt4 level of model
101
98
  * TODO: [πŸ§„] Replace all "github.com/webgptorg/promptbook#xxx" with "ptbk.io/xxx"
99
+ * TODO: [🐀] DRY `AgentModelRequirements` and `ModelRequirements`
102
100
  */
@@ -1,4 +1,4 @@
1
- import { Color } from "../Color";
1
+ import { Color } from '../Color';
2
2
  /**
3
3
  * Calculates saturation of the color
4
4
  *
@@ -14,4 +14,4 @@ export {};
14
14
  /**
15
15
  * TODO: [🧠] What is the better solution - `- xxx`, - `- xxx` or preserve (see also next TODO)
16
16
  * TODO: When existing commands 1) as 2) number 3) list, add 4) new command as next number
17
- */
17
+ */
@@ -10,5 +10,4 @@ import { string_markdown } from '../../types/typeAliases';
10
10
  export declare function humanizeAiText(aiText: string_markdown): string_markdown;
11
11
  /**
12
12
  * TODO: [🧠] Maybe this should be exported from `@promptbook/utils` not `@promptbook/markdown-utils`
13
- * TODO: [πŸ…ΎοΈ] !!! Use this across the project where AI text is involved
14
13
  */
@@ -2,11 +2,11 @@ import { string_markdown } from '../../types/typeAliases';
2
2
  /**
3
3
  * Function `promptbookifyAiText` will slightly modify the text so we know it was processed by Promptbook
4
4
  *
5
+ * Note: [πŸ”‚] This function is idempotent.
6
+ *
5
7
  * @public exported from `@promptbook/markdown-utils`
6
8
  */
7
9
  export declare function promptbookifyAiText(text: string_markdown): string_markdown;
8
10
  /**
9
- * TODO: !!!!! Make the function idempotent and add "Note: [πŸ”‚] This function is idempotent."
10
- * TODO: [πŸ…ΎοΈ]!!! Use this across the project where AI text is involved
11
11
  * TODO: [🧠][✌️] Make some Promptbook-native token system
12
12
  */
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.101.0-7`).
18
+ * It follows semantic versioning (e.g., `0.101.0-21`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.101.0-8",
3
+ "version": "0.101.0",
4
4
  "description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -93,7 +93,7 @@
93
93
  "module": "./esm/index.es.js",
94
94
  "typings": "./esm/typings/src/_packages/node.index.d.ts",
95
95
  "peerDependencies": {
96
- "@promptbook/core": "0.101.0-8"
96
+ "@promptbook/core": "0.101.0"
97
97
  },
98
98
  "dependencies": {
99
99
  "colors": "1.4.0",