@promptbook/wizard 0.102.0-0 → 0.102.0-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.es.js +314 -231
- package/esm/index.es.js.map +1 -1
- package/esm/typings/books/index.d.ts +81 -0
- package/esm/typings/src/_packages/components.index.d.ts +42 -22
- package/esm/typings/src/_packages/markdown-utils.index.d.ts +4 -0
- package/esm/typings/src/_packages/types.index.d.ts +18 -14
- package/esm/typings/src/_packages/utils.index.d.ts +12 -14
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +1 -1
- package/esm/typings/src/book-2.0/utils/generateGravatarUrl.d.ts +1 -1
- package/esm/typings/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +1 -1
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +1 -1
- package/esm/typings/src/book-components/BookEditor/BookEditorInner.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/Chat/Chat.d.ts +1 -5
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +35 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +29 -7
- package/esm/typings/src/book-components/Chat/Chat/constants.d.ts +7 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +19 -1
- package/esm/typings/src/book-components/{AvatarProfile/AvatarProfile → Chat/MockedChat}/MockedChat.d.ts +26 -9
- package/esm/typings/src/book-components/Chat/MockedChat/constants.d.ts +42 -0
- package/esm/typings/src/book-components/Chat/save/_common/ChatSaveFormatDefinition.d.ts +13 -0
- package/esm/typings/src/book-components/Chat/save/_common/getChatSaveFormatDefinitions.d.ts +8 -0
- package/esm/typings/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +6 -0
- package/esm/typings/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/save/index.d.ts +39 -0
- package/esm/typings/src/book-components/Chat/save/json/jsonSaveFormatDefinition.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/save/text/txtSaveFormatDefinition.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +31 -5
- package/esm/typings/src/book-components/Chat/types/ChatParticipant.d.ts +3 -3
- package/esm/typings/src/book-components/Chat/utils/exportChatHistory.d.ts +3 -0
- package/esm/typings/src/book-components/icons/AttachmentIcon.d.ts +11 -0
- package/esm/typings/src/book-components/icons/CloseIcon.d.ts +11 -0
- package/esm/typings/src/execution/LlmExecutionToolsConstructor.d.ts +1 -1
- package/esm/typings/src/execution/execution-report/countWorkingDuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +1 -2
- package/esm/typings/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +1 -1
- package/esm/typings/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/agent/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/agent/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/deepseek/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/deepseek/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/ollama/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/ollama/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -3
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +5 -5
- package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +1 -1
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +6 -0
- package/esm/typings/src/remote-server/ui/ServerApp.d.ts +13 -0
- package/esm/typings/src/remote-server/ui/renderServerIndexHtml.d.ts +7 -0
- package/esm/typings/src/remote-server/ui/types.d.ts +16 -0
- package/esm/typings/src/scrapers/_boilerplate/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +2 -4
- package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +1 -1
- package/esm/typings/src/scrapers/document/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/document/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/markdown/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/markdown/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/markitdown/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/markitdown/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/website/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/website/register-metadata.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +6 -6
- package/esm/typings/src/types/Prompt.d.ts +5 -0
- package/esm/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiText.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiTextEllipsis.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiTextEmdashed.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiTextQuotes.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiTextWhitespace.d.ts +1 -1
- package/esm/typings/src/utils/markdown/prettifyMarkdown.d.ts +2 -0
- package/esm/typings/src/utils/markdown/promptbookifyAiText.d.ts +1 -1
- package/esm/typings/src/utils/{trimCodeBlock.d.ts → markdown/trimCodeBlock.d.ts} +1 -1
- package/esm/typings/src/utils/{trimEndOfCodeBlock.d.ts → markdown/trimEndOfCodeBlock.d.ts} +1 -1
- package/esm/typings/src/utils/{$Register.d.ts → misc/$Register.d.ts} +2 -2
- package/esm/typings/src/utils/{$getCurrentDate.d.ts → misc/$getCurrentDate.d.ts} +1 -1
- package/esm/typings/src/utils/{arrayableToArray.d.ts → misc/arrayableToArray.d.ts} +1 -1
- package/esm/typings/src/utils/misc/debounce.d.ts +5 -0
- package/esm/typings/src/utils/{emojis.d.ts → misc/emojis.d.ts} +1 -1
- package/esm/typings/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +20 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +314 -231
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/index.d.ts +0 -3
- package/esm/typings/src/book-components/BookEditor/injectCssModuleIntoShadowRoot.d.ts +0 -11
- package/esm/typings/src/book-components/Chat/utils/savePlugins.d.ts +0 -55
- /package/esm/typings/src/{utils/arrayableToArray.test.d.ts → book-2.0/agent-source/createAgentModelRequirementsWithCommitments.delete.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{trimCodeBlock.test.d.ts → markdown/trimCodeBlock.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{trimEndOfCodeBlock.test.d.ts → markdown/trimEndOfCodeBlock.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{FromtoItems.d.ts → misc/FromtoItems.d.ts} +0 -0
- /package/esm/typings/src/utils/{markdown/prettifyMarkdown.test.d.ts → misc/arrayableToArray.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{parseNumber.d.ts → misc/parseNumber.d.ts} +0 -0
- /package/esm/typings/src/utils/{parseNumber.test.d.ts → misc/parseNumber.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{removeEmojis.d.ts → normalization/removeEmojis.d.ts} +0 -0
- /package/esm/typings/src/utils/{removeEmojis.test.d.ts → normalization/removeEmojis.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{removeQuotes.d.ts → normalization/removeQuotes.d.ts} +0 -0
- /package/esm/typings/src/utils/{removeQuotes.test.d.ts → normalization/removeQuotes.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{unwrapResult.d.ts → normalization/unwrapResult.d.ts} +0 -0
- /package/esm/typings/src/utils/{unwrapResult.test.d.ts → normalization/unwrapResult.test.d.ts} +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ChatProps } from '
|
1
|
+
import type { ChatProps } from '../Chat/ChatProps';
|
2
2
|
/**
|
3
3
|
* Delay configuration for the MockedChat component
|
4
4
|
*
|
@@ -6,25 +6,42 @@ import type { ChatProps } from '../../Chat/Chat/ChatProps';
|
|
6
6
|
*/
|
7
7
|
export type MockedChatDelayConfig = {
|
8
8
|
/**
|
9
|
-
* Delay before showing the first message (
|
9
|
+
* Delay before showing the first message (ms)
|
10
10
|
* @default 1000
|
11
11
|
*/
|
12
|
-
beforeFirstMessage?: number;
|
12
|
+
beforeFirstMessage?: number | [number, number];
|
13
13
|
/**
|
14
|
-
* Emulated thinking time between messages (
|
14
|
+
* Emulated thinking time between messages (ms)
|
15
|
+
* Can be a fixed number or [min, max] for random range.
|
15
16
|
* @default 2000
|
16
17
|
*/
|
17
|
-
thinkingBetweenMessages?: number;
|
18
|
+
thinkingBetweenMessages?: number | [number, number];
|
18
19
|
/**
|
19
|
-
* Wait time after each written word (
|
20
|
+
* Wait time after each written word (ms)
|
21
|
+
* Can be a fixed number or [min, max] for random range.
|
20
22
|
* @default 100
|
21
23
|
*/
|
22
|
-
waitAfterWord?: number;
|
24
|
+
waitAfterWord?: number | [number, number];
|
23
25
|
/**
|
24
|
-
* Extra delay on top of the word waiting (
|
26
|
+
* Extra delay on top of the word waiting (ms)
|
27
|
+
* Can be a fixed number or [min, max] for random range.
|
25
28
|
* @default 50
|
26
29
|
*/
|
27
|
-
extraWordDelay?: number;
|
30
|
+
extraWordDelay?: number | [number, number];
|
31
|
+
/**
|
32
|
+
* Chance (0-1) that a longer pause occurs before a message (e.g. agent switch)
|
33
|
+
* @default 0.2
|
34
|
+
*/
|
35
|
+
longPauseChance?: number;
|
36
|
+
/**
|
37
|
+
* Range for long pause duration (ms), [min, max]
|
38
|
+
* @default [1200, 3500]
|
39
|
+
*/
|
40
|
+
longPauseDuration?: [number, number];
|
41
|
+
/**
|
42
|
+
* If true, disables typing effect and shows full message at once (BLOCKY_FLOW)
|
43
|
+
*/
|
44
|
+
blocky?: boolean;
|
28
45
|
};
|
29
46
|
/**
|
30
47
|
* Props for MockedChat component
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import type { MockedChatDelayConfig } from './MockedChat';
|
2
|
+
/**
|
3
|
+
* Normal flow of messages in the `MockedChat` component
|
4
|
+
*
|
5
|
+
* @public exported from `@promptbook/components`
|
6
|
+
*/
|
7
|
+
export declare const NORMAL_FLOW: MockedChatDelayConfig;
|
8
|
+
/**
|
9
|
+
* Fast flow of messages in the `MockedChat` component
|
10
|
+
*
|
11
|
+
* @public exported from `@promptbook/components`
|
12
|
+
*/
|
13
|
+
export declare const FAST_FLOW: MockedChatDelayConfig;
|
14
|
+
/**
|
15
|
+
* Slow flow of messages in the `MockedChat` component
|
16
|
+
*
|
17
|
+
* @public exported from `@promptbook/components`
|
18
|
+
*/
|
19
|
+
export declare const SLOW_FLOW: MockedChatDelayConfig;
|
20
|
+
/**
|
21
|
+
* Blocky flow of messages in the `MockedChat` component
|
22
|
+
*
|
23
|
+
* Messages appear in blocks rather than word-by-word
|
24
|
+
*
|
25
|
+
* @public exported from `@promptbook/components`
|
26
|
+
*/
|
27
|
+
export declare const BLOCKY_FLOW: MockedChatDelayConfig;
|
28
|
+
/**
|
29
|
+
* Random flow of messages in the `MockedChat` component
|
30
|
+
*
|
31
|
+
* @public exported from `@promptbook/components`
|
32
|
+
*/
|
33
|
+
export declare const RANDOM_FLOW: MockedChatDelayConfig;
|
34
|
+
/**
|
35
|
+
* All predefined delay configurations for the `MockedChat` component
|
36
|
+
*
|
37
|
+
* @public exported from `@promptbook/components`
|
38
|
+
*/
|
39
|
+
export declare const MOCKED_CHAT_DELAY_CONFIGS: Record<string, MockedChatDelayConfig>;
|
40
|
+
/**
|
41
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
42
|
+
*/
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { string_file_extension, string_mime_type } from '../../../../types/typeAliases';
|
2
|
+
import type { ChatMessage } from '../../types/ChatMessage';
|
3
|
+
/**
|
4
|
+
* Plugin contract for chat export formatNames
|
5
|
+
* @public exported from `@promptbook/components`
|
6
|
+
*/
|
7
|
+
export type ChatSaveFormatDefinition = {
|
8
|
+
formatName: string_file_extension | string_mime_type | string;
|
9
|
+
label: string;
|
10
|
+
getContent: (messages: ChatMessage[]) => string;
|
11
|
+
mimeType: string;
|
12
|
+
fileExtension: string;
|
13
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { ChatSaveFormatDefinition } from './ChatSaveFormatDefinition';
|
2
|
+
import type { string_chat_format_name } from './string_chat_format_name';
|
3
|
+
/**
|
4
|
+
* Returns enabled chat save plugins filtered by formatNames (or all when omitted)
|
5
|
+
*
|
6
|
+
* @public exported from `@promptbook/components`
|
7
|
+
*/
|
8
|
+
export declare function getChatSaveFormatDefinitions(formatNames?: ReadonlyArray<string_chat_format_name>): ReadonlyArray<ChatSaveFormatDefinition>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* HTML export plugin
|
3
|
+
*
|
4
|
+
* @public exported from `@promptbook/components`
|
5
|
+
*/
|
6
|
+
export declare const htmlSaveFormatDefinition: {
|
7
|
+
readonly formatName: "html";
|
8
|
+
readonly label: "HTML";
|
9
|
+
readonly getContent: (messages: import("../../types/ChatMessage").ChatMessage[]) => string;
|
10
|
+
readonly mimeType: "text/html";
|
11
|
+
readonly fileExtension: "html";
|
12
|
+
};
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/**
|
2
|
+
* Registry of all built-in chat save plugins
|
3
|
+
*
|
4
|
+
* @public exported from `@promptbook/components`
|
5
|
+
*/
|
6
|
+
export declare const CHAT_SAVE_FORMATS: readonly [{
|
7
|
+
readonly formatName: "json";
|
8
|
+
readonly label: "JSON (full)";
|
9
|
+
readonly getContent: (messages: import("../types/ChatMessage").ChatMessage[]) => string;
|
10
|
+
readonly mimeType: "application/json";
|
11
|
+
readonly fileExtension: "json";
|
12
|
+
}, {
|
13
|
+
readonly formatName: "txt";
|
14
|
+
readonly label: "Plain Text";
|
15
|
+
readonly getContent: (messages: import("../types/ChatMessage").ChatMessage[]) => string;
|
16
|
+
readonly mimeType: "text/plain";
|
17
|
+
readonly fileExtension: "txt";
|
18
|
+
}, {
|
19
|
+
readonly formatName: "md";
|
20
|
+
readonly label: "Markdown";
|
21
|
+
readonly getContent: (messages: import("../types/ChatMessage").ChatMessage[]) => string;
|
22
|
+
readonly mimeType: "text/markdown";
|
23
|
+
readonly fileExtension: "md";
|
24
|
+
}, {
|
25
|
+
readonly formatName: "html";
|
26
|
+
readonly label: "HTML";
|
27
|
+
readonly getContent: (messages: import("../types/ChatMessage").ChatMessage[]) => string;
|
28
|
+
readonly mimeType: "text/html";
|
29
|
+
readonly fileExtension: "html";
|
30
|
+
}, {
|
31
|
+
readonly formatName: "pdf";
|
32
|
+
readonly label: "PDF";
|
33
|
+
readonly getContent: (messages: import("../types/ChatMessage").ChatMessage[]) => string;
|
34
|
+
readonly mimeType: "application/pdf";
|
35
|
+
readonly fileExtension: "pdf";
|
36
|
+
}];
|
37
|
+
/**
|
38
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
39
|
+
*/
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* JSON export plugin (full metadata)
|
3
|
+
*
|
4
|
+
* @public exported from `@promptbook/components`
|
5
|
+
*/
|
6
|
+
export declare const jsonSaveFormatDefinition: {
|
7
|
+
readonly formatName: "json";
|
8
|
+
readonly label: "JSON (full)";
|
9
|
+
readonly getContent: (messages: import("../../types/ChatMessage").ChatMessage[]) => string;
|
10
|
+
readonly mimeType: "application/json";
|
11
|
+
readonly fileExtension: "json";
|
12
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* Markdown export plugin
|
3
|
+
*
|
4
|
+
* @public exported from `@promptbook/components`
|
5
|
+
*/
|
6
|
+
export declare const mdSaveFormatDefinition: {
|
7
|
+
readonly formatName: "md";
|
8
|
+
readonly label: "Markdown";
|
9
|
+
readonly getContent: (messages: import("../../types/ChatMessage").ChatMessage[]) => string;
|
10
|
+
readonly mimeType: "text/markdown";
|
11
|
+
readonly fileExtension: "md";
|
12
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* PDF export plugin
|
3
|
+
*
|
4
|
+
* @public exported from `@promptbook/components`
|
5
|
+
*/
|
6
|
+
export declare const pdfSaveFormatDefinition: {
|
7
|
+
readonly formatName: "pdf";
|
8
|
+
readonly label: "PDF";
|
9
|
+
readonly getContent: (messages: import("../../types/ChatMessage").ChatMessage[]) => string;
|
10
|
+
readonly mimeType: "application/pdf";
|
11
|
+
readonly fileExtension: "pdf";
|
12
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* Plain text export plugin (messages only)
|
3
|
+
*
|
4
|
+
* @public exported from `@promptbook/components`
|
5
|
+
*/
|
6
|
+
export declare const txtSaveFormatDefinition: {
|
7
|
+
readonly formatName: "txt";
|
8
|
+
readonly label: "Plain Text";
|
9
|
+
readonly getContent: (messages: import("../../types/ChatMessage").ChatMessage[]) => string;
|
10
|
+
readonly mimeType: "text/plain";
|
11
|
+
readonly fileExtension: "txt";
|
12
|
+
};
|
@@ -1,16 +1,42 @@
|
|
1
|
-
import type { string_markdown } from '../../../types/typeAliases';
|
2
|
-
import type { string_name } from '../../../types/typeAliases';
|
1
|
+
import type { id, string_markdown } from '../../../types/typeAliases';
|
3
2
|
/**
|
4
3
|
* A message in the chat
|
5
4
|
*
|
6
5
|
* @public exported from `@promptbook/components`
|
7
6
|
*/
|
8
7
|
export type ChatMessage = {
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
/**
|
9
|
+
* Unique identifier of the message
|
10
|
+
*/
|
11
|
+
id: id;
|
12
|
+
/**
|
13
|
+
* Date when the message was created
|
14
|
+
*/
|
15
|
+
date?: Date;
|
16
|
+
/**
|
17
|
+
* The name of the participant who sent the message
|
18
|
+
*/
|
19
|
+
from: id;
|
20
|
+
/**
|
21
|
+
* The content of the message with optional markdown formatting
|
22
|
+
*/
|
12
23
|
content: string_markdown;
|
24
|
+
/**
|
25
|
+
* Whether the message is complete (for example, if it's still being generated by an AI)
|
26
|
+
*
|
27
|
+
* @default true
|
28
|
+
*/
|
13
29
|
isComplete?: boolean;
|
30
|
+
/**
|
31
|
+
* @@@
|
32
|
+
*/
|
14
33
|
expectedAnswer?: string;
|
34
|
+
/**
|
35
|
+
* @@@
|
36
|
+
*/
|
15
37
|
isVoiceCall?: boolean;
|
16
38
|
};
|
39
|
+
/**
|
40
|
+
* TODO: Delete `expectedAnswer` from ChatMessage
|
41
|
+
* TODO: Rename `date` into `created`+`modified`
|
42
|
+
*/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { id, string_color, string_person_fullname, string_url_image } from '../../../types/typeAliases';
|
2
2
|
import { Color } from '../../../utils/color/Color';
|
3
3
|
/**
|
4
4
|
* A participant in the chat
|
@@ -9,11 +9,11 @@ export type ChatParticipant = {
|
|
9
9
|
/**
|
10
10
|
* Identifies the participant by their name, same as `message.from`
|
11
11
|
*/
|
12
|
-
name:
|
12
|
+
name: id;
|
13
13
|
/**
|
14
14
|
* Full name of the participant
|
15
15
|
*/
|
16
|
-
fullname
|
16
|
+
fullname?: string_person_fullname;
|
17
17
|
/**
|
18
18
|
* Am I the participant? (i.e. is this the user)
|
19
19
|
*/
|
@@ -7,3 +7,6 @@ import type { ExportFormat } from './ExportFormat';
|
|
7
7
|
* @private utility of `<Chat/>` component
|
8
8
|
*/
|
9
9
|
export declare function exportChatHistory(messages: ChatMessage[], format: ExportFormat, headerMarkdown?: string, participants?: ReadonlyArray<ChatParticipant>): Promise<void>;
|
10
|
+
/**
|
11
|
+
* TODO: !!!! Delete this parallel chat history export
|
12
|
+
*/
|
@@ -0,0 +1,11 @@
|
|
1
|
+
type AttachmentIconProps = {
|
2
|
+
size?: number;
|
3
|
+
color?: string;
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* @@@
|
7
|
+
*
|
8
|
+
* @public exported from `@promptbook/components`
|
9
|
+
*/
|
10
|
+
export declare function AttachmentIcon({ size, color }: AttachmentIconProps): import("react/jsx-runtime").JSX.Element;
|
11
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
type CloseIconProps = {
|
2
|
+
size?: number;
|
3
|
+
color?: string;
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* @@@
|
7
|
+
*
|
8
|
+
* @public exported from `@promptbook/components`
|
9
|
+
*/
|
10
|
+
export declare function CloseIcon({ size, color }: CloseIconProps): import("react/jsx-runtime").JSX.Element;
|
11
|
+
export {};
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import type { string_filename } from '../../../types/typeAliases';
|
2
|
-
import type { string_markdown } from '../../../types/typeAliases';
|
1
|
+
import type { string_filename, string_markdown } from '../../../types/typeAliases';
|
3
2
|
/**
|
4
3
|
* Pass the `.env` file which was used to configure LLM tools
|
5
4
|
*
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { string_title } from '../../../types/typeAliases';
|
2
|
-
import type { Registered } from '../../../utils/$Register';
|
2
|
+
import type { Registered } from '../../../utils/misc/$Register';
|
3
3
|
import type { LlmToolsOptions } from './LlmToolsOptions';
|
4
4
|
/**
|
5
5
|
* Configuration definition for LLM execution tools, containing provider-specific settings
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MODEL_ORDERS, MODEL_TRUST_LEVELS } from '../../../constants';
|
2
2
|
import type { string_name, string_title } from '../../../types/typeAliases';
|
3
|
-
import type { Registered } from '../../../utils/$Register';
|
3
|
+
import type { Registered } from '../../../utils/misc/$Register';
|
4
4
|
import type { string_SCREAMING_CASE } from '../../../utils/normalization/normalizeTo_SCREAMING_CASE';
|
5
5
|
import type { LlmToolsConfiguration } from './LlmToolsConfiguration';
|
6
6
|
/**
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
2
|
-
import { string_markdown_text, string_title } from '../../types/typeAliases';
|
2
|
+
import type { string_markdown_text, string_title } from '../../types/typeAliases';
|
3
3
|
import { MultipleLlmExecutionTools } from './MultipleLlmExecutionTools';
|
4
4
|
/**
|
5
5
|
* Joins multiple LLM Execution Tools into one
|
@@ -3,7 +3,7 @@
|
|
3
3
|
*
|
4
4
|
* @public exported from `@promptbook/core`
|
5
5
|
*/
|
6
|
-
export declare const _AgentMetadata: import("../../
|
6
|
+
export declare const _AgentMetadata: import("../../_packages/types.index").Registration;
|
7
7
|
/**
|
8
8
|
* TODO: [🧠] Consider adding a special trust level for AgentLlmExecutionTools
|
9
9
|
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
@@ -1,9 +1,7 @@
|
|
1
1
|
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
2
2
|
import type { ChatPromptResult } from '../../execution/PromptResult';
|
3
3
|
import type { Prompt } from '../../types/Prompt';
|
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';
|
4
|
+
import type { string_markdown, string_markdown_text, string_title } from '../../types/typeAliases';
|
7
5
|
import type { OpenAiAssistantExecutionToolsOptions } from './OpenAiAssistantExecutionToolsOptions';
|
8
6
|
import { OpenAiExecutionTools } from './OpenAiExecutionTools';
|
9
7
|
/**
|
@@ -22,10 +22,6 @@ export declare abstract class OpenAiCompatibleExecutionTools implements LlmExecu
|
|
22
22
|
* Rate limiter instance
|
23
23
|
*/
|
24
24
|
private limiter;
|
25
|
-
/**
|
26
|
-
* Tracks models and parameters that have already been retried to prevent infinite loops
|
27
|
-
*/
|
28
|
-
private retriedUnsupportedParameters;
|
29
25
|
/**
|
30
26
|
* Creates OpenAI compatible Execution Tools.
|
31
27
|
*
|
@@ -46,7 +42,7 @@ export declare abstract class OpenAiCompatibleExecutionTools implements LlmExecu
|
|
46
42
|
/**
|
47
43
|
* Calls OpenAI compatible API to use a chat model.
|
48
44
|
*/
|
49
|
-
callChatModel(prompt:
|
45
|
+
callChatModel(prompt: Prompt): Promise<ChatPromptResult>;
|
50
46
|
/**
|
51
47
|
* Internal method that handles parameter retry for chat model calls
|
52
48
|
*/
|
@@ -63,6 +59,10 @@ export declare abstract class OpenAiCompatibleExecutionTools implements LlmExecu
|
|
63
59
|
* Calls OpenAI compatible API to use a embedding model
|
64
60
|
*/
|
65
61
|
callEmbeddingModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<EmbeddingPromptResult>;
|
62
|
+
/**
|
63
|
+
* Internal method that handles parameter retry for embedding model calls
|
64
|
+
*/
|
65
|
+
private callEmbeddingModelWithRetry;
|
66
66
|
/**
|
67
67
|
* Get the model that should be used as default
|
68
68
|
*/
|
@@ -31,6 +31,12 @@ export type RemoteServerOptions<TCustomOptions> = CommonToolsOptions & {
|
|
31
31
|
* @property {number} port The port number the server will listen on.
|
32
32
|
*/
|
33
33
|
readonly port: number;
|
34
|
+
/**
|
35
|
+
* Enable rich UI (React + Tailwind) at `/` path.
|
36
|
+
* Default: true
|
37
|
+
* If false, server will respond with markdown as before.
|
38
|
+
*/
|
39
|
+
readonly isRichUi?: boolean;
|
34
40
|
/**
|
35
41
|
* Creates execution tools the client
|
36
42
|
*
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { ServerInfo } from './types';
|
2
|
+
/**
|
3
|
+
* @@@
|
4
|
+
*
|
5
|
+
* @private internal utility of Remote Server
|
6
|
+
*/
|
7
|
+
export declare function HtmlDoc({ info }: {
|
8
|
+
info: ServerInfo;
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
10
|
+
/**
|
11
|
+
* Add Note: [💞] Ignore a discrepancy between file name and entity name
|
12
|
+
* <- TODO: !!! Maybe split into multiple files
|
13
|
+
*/
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { ServerInfo } from './types';
|
2
|
+
/**
|
3
|
+
* Render full HTML for the server index using React SSR without requiring TSX/JSX compiler flags.
|
4
|
+
*
|
5
|
+
* @private internal utility of Remote Server
|
6
|
+
*/
|
7
|
+
export declare function renderServerIndexHtml(info: ServerInfo): string;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export type ServerInfo = {
|
2
|
+
bookLanguageVersion: string;
|
3
|
+
promptbookEngineVersion: string;
|
4
|
+
nodeVersion: string;
|
5
|
+
port: number | string | undefined;
|
6
|
+
startupDate: string;
|
7
|
+
isAnonymousModeAllowed: boolean;
|
8
|
+
isApplicationModeAllowed: boolean;
|
9
|
+
pipelines: ReadonlyArray<string>;
|
10
|
+
runningExecutions: number;
|
11
|
+
paths: ReadonlyArray<string>;
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
* Add Note: [💞] Ignore a discrepancy between file name and entity name
|
15
|
+
* <- TODO: !!! Maybe split into multiple files
|
16
|
+
*/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { $Register } from '../../../utils/$Register';
|
1
|
+
import { $Register } from '../../../utils/misc/$Register';
|
2
2
|
import type { ScraperAndConverterMetadata } from './ScraperAndConverterMetadata';
|
3
3
|
/**
|
4
4
|
* Global registry for storing metadata about all available scrapers and converters.
|