@promptbook/templates 0.100.0-45 → 0.100.0-47
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 +20 -12
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/components.index.d.ts +4 -0
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +2 -6
- package/esm/typings/src/book-2.0/commitments/_misc/AgentModelRequirements.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/Chat/Chat.d.ts +4 -10
- package/esm/typings/src/book-components/Chat/interfaces/ChatMessage.d.ts +12 -26
- package/esm/typings/src/book-components/Chat/interfaces/ChatParticipant.d.ts +30 -0
- package/esm/typings/src/book-components/Chat/utils/exportChatHistory.d.ts +2 -4
- package/esm/typings/src/book-components/Chat/utils/generatePdfContent.d.ts +2 -4
- package/esm/typings/src/book-components/Chat/utils/messagesToHtml.d.ts +2 -4
- package/esm/typings/src/book-components/Chat/utils/messagesToMarkdown.d.ts +2 -4
- package/esm/typings/src/book-components/Chat/utils/messagesToText.d.ts +2 -4
- package/esm/typings/src/config.d.ts +7 -0
- package/esm/typings/src/execution/ExecutionTask.d.ts +8 -0
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +8 -0
- package/esm/typings/src/playground/permanent/error-handling-playground.d.ts +5 -0
- package/esm/typings/src/utils/organization/preserve.d.ts +21 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -3
- package/umd/index.umd.js +24 -16
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +0 -14
|
@@ -11,6 +11,8 @@ import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
|
|
11
11
|
import { BookEditor } from '../book-components/BookEditor/BookEditor';
|
|
12
12
|
import { DEFAULT_BOOK_FONT_CLASS } from '../book-components/BookEditor/config';
|
|
13
13
|
import { Chat } from '../book-components/Chat/Chat/Chat';
|
|
14
|
+
import type { ChatMessage } from '../book-components/Chat/interfaces/ChatMessage';
|
|
15
|
+
import type { ChatParticipant } from '../book-components/Chat/interfaces/ChatParticipant';
|
|
14
16
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
15
17
|
export type { AvatarChipProps };
|
|
16
18
|
export { AvatarChip };
|
|
@@ -24,3 +26,5 @@ export type { BookEditorProps };
|
|
|
24
26
|
export { BookEditor };
|
|
25
27
|
export { DEFAULT_BOOK_FONT_CLASS };
|
|
26
28
|
export { Chat };
|
|
29
|
+
export type { ChatMessage };
|
|
30
|
+
export type { ChatParticipant };
|
|
@@ -49,6 +49,7 @@ import { DEFAULT_IS_AUTO_INSTALLED } from '../config';
|
|
|
49
49
|
import { DEFAULT_TASK_SIMULATED_DURATION_MS } from '../config';
|
|
50
50
|
import { DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME } from '../config';
|
|
51
51
|
import { DEFAULT_MAX_REQUESTS_PER_MINUTE } from '../config';
|
|
52
|
+
import { API_REQUEST_TIMEOUT } from '../config';
|
|
52
53
|
import { PROMPTBOOK_LOGO_URL } from '../config';
|
|
53
54
|
import { MODEL_TRUST_LEVELS } from '../constants';
|
|
54
55
|
import { MODEL_ORDERS } from '../constants';
|
|
@@ -212,6 +213,7 @@ export { DEFAULT_IS_AUTO_INSTALLED };
|
|
|
212
213
|
export { DEFAULT_TASK_SIMULATED_DURATION_MS };
|
|
213
214
|
export { DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME };
|
|
214
215
|
export { DEFAULT_MAX_REQUESTS_PER_MINUTE };
|
|
216
|
+
export { API_REQUEST_TIMEOUT };
|
|
215
217
|
export { PROMPTBOOK_LOGO_URL };
|
|
216
218
|
export { MODEL_TRUST_LEVELS };
|
|
217
219
|
export { MODEL_ORDERS };
|
|
@@ -17,9 +17,7 @@ import type { AvatarProfileProps } from '../book-components/AvatarProfile/Avatar
|
|
|
17
17
|
import type { AvatarProfileFromSourceProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
|
|
18
18
|
import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
|
19
19
|
import type { ChatMessage } from '../book-components/Chat/interfaces/ChatMessage';
|
|
20
|
-
import type {
|
|
21
|
-
import type { PromptbookPersonaChatMessage } from '../book-components/Chat/interfaces/ChatMessage';
|
|
22
|
-
import type { CompleteChatMessage } from '../book-components/Chat/interfaces/ChatMessage';
|
|
20
|
+
import type { ChatParticipant } from '../book-components/Chat/interfaces/ChatParticipant';
|
|
23
21
|
import type { PipelineCollection } from '../collection/PipelineCollection';
|
|
24
22
|
import type { Command } from '../commands/_common/types/Command';
|
|
25
23
|
import type { CommandParser } from '../commands/_common/types/CommandParser';
|
|
@@ -344,9 +342,7 @@ export type { AvatarProfileProps };
|
|
|
344
342
|
export type { AvatarProfileFromSourceProps };
|
|
345
343
|
export type { BookEditorProps };
|
|
346
344
|
export type { ChatMessage };
|
|
347
|
-
export type {
|
|
348
|
-
export type { PromptbookPersonaChatMessage };
|
|
349
|
-
export type { CompleteChatMessage };
|
|
345
|
+
export type { ChatParticipant };
|
|
350
346
|
export type { PipelineCollection };
|
|
351
347
|
export type { Command };
|
|
352
348
|
export type { CommandParser };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import type { Promisable } from 'type-fest';
|
|
3
3
|
import type { ChatMessage } from '../interfaces/ChatMessage';
|
|
4
|
+
import type { ChatParticipant } from '../interfaces/ChatParticipant';
|
|
4
5
|
/**
|
|
5
6
|
* @deprecated use `isComplete` instead
|
|
6
7
|
* @private util of `<Chat />`
|
|
@@ -11,11 +12,11 @@ interface ChatProps {
|
|
|
11
12
|
* Optional callback to create a new agent from the template.
|
|
12
13
|
* If provided, renders the [Use this template] button.
|
|
13
14
|
*/
|
|
14
|
-
onUseTemplate
|
|
15
|
+
onUseTemplate?(): void;
|
|
15
16
|
/**
|
|
16
17
|
* Messages to render - they are rendered as they are
|
|
17
18
|
*/
|
|
18
|
-
readonly messages:
|
|
19
|
+
readonly messages: ReadonlyArray<ChatMessage>;
|
|
19
20
|
/**
|
|
20
21
|
* Called every time the user types or dictated a message
|
|
21
22
|
*/
|
|
@@ -38,10 +39,6 @@ interface ChatProps {
|
|
|
38
39
|
* The language code to use for voice recognition
|
|
39
40
|
*/
|
|
40
41
|
readonly voiceLanguage?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Avatars for each user
|
|
43
|
-
*/
|
|
44
|
-
readonly avatars?: Partial<Record<ChatMessage['from'], string>>;
|
|
45
42
|
/**
|
|
46
43
|
* Optional placeholder message for the textarea
|
|
47
44
|
*
|
|
@@ -105,10 +102,7 @@ interface ChatProps {
|
|
|
105
102
|
* Optional mapping of participant IDs (message.from) to display metadata for exports.
|
|
106
103
|
* Keys should match ChatMessage.from values (e.g., 'USER', 'AGENT_{id}', etc.)
|
|
107
104
|
*/
|
|
108
|
-
readonly participants?:
|
|
109
|
-
name: string;
|
|
110
|
-
avatarUrl?: string;
|
|
111
|
-
}>;
|
|
105
|
+
readonly participants?: ReadonlyArray<ChatParticipant>;
|
|
112
106
|
}
|
|
113
107
|
/**
|
|
114
108
|
* Renders a chat with messages and input for new messages
|
|
@@ -1,30 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
isVoiceCall?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface PromptbookPersonaChatMessage {
|
|
1
|
+
import type { string_markdown } from '../../../types/typeAliases';
|
|
2
|
+
import type { string_name } from '../../../types/typeAliases';
|
|
3
|
+
/**
|
|
4
|
+
* A message in the chat
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/components`
|
|
7
|
+
*/
|
|
8
|
+
export type ChatMessage = {
|
|
12
9
|
id: string;
|
|
13
10
|
date: Date;
|
|
14
|
-
from:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
width?: number;
|
|
18
|
-
height?: number;
|
|
19
|
-
};
|
|
20
|
-
content: string;
|
|
21
|
-
isComplete: boolean;
|
|
11
|
+
from: string_name;
|
|
12
|
+
content: string_markdown;
|
|
13
|
+
isComplete?: boolean;
|
|
22
14
|
expectedAnswer?: string;
|
|
23
15
|
isVoiceCall?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface CompleteChatMessage {
|
|
26
|
-
isComplete: true;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* TODO: [🧠] ACRY Rename PROMPTBOOK_PERSONA + USER, Teacher, teacher to sth else
|
|
30
|
-
*/
|
|
16
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { string_name } from '../../../types/typeAliases';
|
|
2
|
+
import type { string_person_fullname } from '../../../types/typeAliases';
|
|
3
|
+
import type { string_url_image } from '../../../types/typeAliases';
|
|
4
|
+
/**
|
|
5
|
+
* A participant in the chat
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/components`
|
|
8
|
+
*/
|
|
9
|
+
export type ChatParticipant = {
|
|
10
|
+
/**
|
|
11
|
+
* Identifies the participant by their name, same as `message.from`
|
|
12
|
+
*/
|
|
13
|
+
name: string_name;
|
|
14
|
+
/**
|
|
15
|
+
* Full name of the participant
|
|
16
|
+
*/
|
|
17
|
+
fullname: string_person_fullname;
|
|
18
|
+
/**
|
|
19
|
+
* Am I the participant? (i.e. is this the user)
|
|
20
|
+
*/
|
|
21
|
+
isMe?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Profile picture
|
|
24
|
+
*/
|
|
25
|
+
avatarSrc?: string_url_image;
|
|
26
|
+
/**
|
|
27
|
+
* Color associated with the participant
|
|
28
|
+
*/
|
|
29
|
+
color: string;
|
|
30
|
+
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { ChatMessage } from '../interfaces/ChatMessage';
|
|
2
|
+
import type { ChatParticipant } from '../interfaces/ChatParticipant';
|
|
2
3
|
import type { ExportFormat } from './ExportFormat';
|
|
3
4
|
/**
|
|
4
5
|
* Exports chat messages in the specified format
|
|
5
6
|
*
|
|
6
7
|
* @private utility of `<Chat/>` component
|
|
7
8
|
*/
|
|
8
|
-
export declare function exportChatHistory(messages: ChatMessage[], format: ExportFormat, headerMarkdown?: string, participants?:
|
|
9
|
-
name: string;
|
|
10
|
-
avatarUrl?: string;
|
|
11
|
-
}>): Promise<void>;
|
|
9
|
+
export declare function exportChatHistory(messages: ChatMessage[], format: ExportFormat, headerMarkdown?: string, participants?: ReadonlyArray<ChatParticipant>): Promise<void>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { ChatMessage } from '../interfaces/ChatMessage';
|
|
2
|
+
import type { ChatParticipant } from '../interfaces/ChatParticipant';
|
|
2
3
|
/**
|
|
3
4
|
* Generates PDF content using HTML and triggers print dialog
|
|
4
5
|
*
|
|
5
6
|
* @private utility of `<Chat/>` component
|
|
6
7
|
*/
|
|
7
|
-
export declare function generatePdfContent(messages: ChatMessage[], shareUrl: string, qrDataUrl?: string | null, headerMarkdown?: string, participants?:
|
|
8
|
-
name: string;
|
|
9
|
-
avatarUrl?: string;
|
|
10
|
-
}>): void;
|
|
8
|
+
export declare function generatePdfContent(messages: ChatMessage[], shareUrl: string, qrDataUrl?: string | null, headerMarkdown?: string, participants?: ReadonlyArray<ChatParticipant>): void;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { ChatMessage } from '../interfaces/ChatMessage';
|
|
2
|
+
import type { ChatParticipant } from '../interfaces/ChatParticipant';
|
|
2
3
|
/**
|
|
3
4
|
* Converts chat messages to HTML format
|
|
4
5
|
*
|
|
5
6
|
* @private utility of `<Chat/>` component
|
|
6
7
|
*/
|
|
7
|
-
export declare function messagesToHtml(messages: ChatMessage[], shareUrl: string, qrDataUrl?: string | null, headerMarkdown?: string, participants?:
|
|
8
|
-
name: string;
|
|
9
|
-
avatarUrl?: string;
|
|
10
|
-
}>): string;
|
|
8
|
+
export declare function messagesToHtml(messages: ChatMessage[], shareUrl: string, qrDataUrl?: string | null, headerMarkdown?: string, participants?: ReadonlyArray<ChatParticipant>): string;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { ChatMessage } from '../interfaces/ChatMessage';
|
|
2
|
+
import type { ChatParticipant } from '../interfaces/ChatParticipant';
|
|
2
3
|
/**
|
|
3
4
|
* Converts chat messages to Markdown format
|
|
4
5
|
*
|
|
5
6
|
* @private utility of `<Chat/>` component
|
|
6
7
|
*/
|
|
7
|
-
export declare function messagesToMarkdown(messages: ChatMessage[], shareUrl: string, qrDataUrl?: string | null, headerMarkdown?: string, participants?:
|
|
8
|
-
name: string;
|
|
9
|
-
avatarUrl?: string;
|
|
10
|
-
}>): string;
|
|
8
|
+
export declare function messagesToMarkdown(messages: ChatMessage[], shareUrl: string, qrDataUrl?: string | null, headerMarkdown?: string, participants?: ReadonlyArray<ChatParticipant>): string;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { ChatMessage } from '../interfaces/ChatMessage';
|
|
2
|
+
import type { ChatParticipant } from '../interfaces/ChatParticipant';
|
|
2
3
|
/**
|
|
3
4
|
* Converts chat messages to plain text format
|
|
4
5
|
*
|
|
5
6
|
* @private utility of `<Chat/>` component
|
|
6
7
|
*/
|
|
7
|
-
export declare function messagesToText(messages: ChatMessage[], shareUrl: string, headerMarkdown?: string, participants?:
|
|
8
|
-
name: string;
|
|
9
|
-
avatarUrl?: string;
|
|
10
|
-
}>): string;
|
|
8
|
+
export declare function messagesToText(messages: ChatMessage[], shareUrl: string, headerMarkdown?: string, participants?: ReadonlyArray<ChatParticipant>): string;
|
|
@@ -301,6 +301,13 @@ export declare const DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME = "getPipelin
|
|
|
301
301
|
* @public exported from `@promptbook/core`
|
|
302
302
|
*/
|
|
303
303
|
export declare const DEFAULT_MAX_REQUESTS_PER_MINUTE = 60;
|
|
304
|
+
/**
|
|
305
|
+
* API request timeout in milliseconds
|
|
306
|
+
* Can be overridden via API_REQUEST_TIMEOUT environment variable
|
|
307
|
+
*
|
|
308
|
+
* @public exported from `@promptbook/core`
|
|
309
|
+
*/
|
|
310
|
+
export declare const API_REQUEST_TIMEOUT: number;
|
|
304
311
|
/**
|
|
305
312
|
* URL of the Promptbook logo
|
|
306
313
|
*
|
|
@@ -110,6 +110,14 @@ export type AbstractTask<TTaskResult extends AbstractTaskResult> = {
|
|
|
110
110
|
* Gets a promise that resolves with the task result
|
|
111
111
|
*/
|
|
112
112
|
asPromise(options?: {
|
|
113
|
+
/**
|
|
114
|
+
* Do the task throws on error
|
|
115
|
+
*
|
|
116
|
+
* - If `true` when error occurs the returned promise will rejects
|
|
117
|
+
* - If `false` the promise will resolve with object with all listed errors and warnings and partial result
|
|
118
|
+
*
|
|
119
|
+
* @default true
|
|
120
|
+
*/
|
|
113
121
|
readonly isCrashedOnError?: boolean;
|
|
114
122
|
}): Promise<TTaskResult>;
|
|
115
123
|
/**
|
|
@@ -82,6 +82,14 @@ export declare abstract class OpenAiCompatibleExecutionTools implements LlmExecu
|
|
|
82
82
|
* Default model for completion variant.
|
|
83
83
|
*/
|
|
84
84
|
protected abstract getDefaultEmbeddingModel(): AvailableModel;
|
|
85
|
+
/**
|
|
86
|
+
* Makes a request with retry logic for network errors like ECONNRESET
|
|
87
|
+
*/
|
|
88
|
+
private makeRequestWithRetry;
|
|
89
|
+
/**
|
|
90
|
+
* Determines if an error is retryable (network-related errors)
|
|
91
|
+
*/
|
|
92
|
+
private isRetryableNetworkError;
|
|
85
93
|
}
|
|
86
94
|
/**
|
|
87
95
|
* TODO: [🛄] Some way how to re-wrap the errors from `OpenAiCompatibleExecutionTools`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { really_any } from './really_any';
|
|
2
|
+
/**
|
|
3
|
+
* Does nothing, but preserves the function in the bundle
|
|
4
|
+
* Compiler is tricked into thinking the function is used
|
|
5
|
+
*
|
|
6
|
+
* @param value any function to preserve
|
|
7
|
+
* @returns nothing
|
|
8
|
+
* @private within the repository
|
|
9
|
+
*/
|
|
10
|
+
export declare function $preserve(...value: Array<really_any>): void;
|
|
11
|
+
/**
|
|
12
|
+
* DO NOT USE THIS FUNCTION
|
|
13
|
+
* Only purpose of this function is to trick the compiler and javascript engine
|
|
14
|
+
* that `_preserved` array can be used in the future and should not be garbage collected
|
|
15
|
+
*
|
|
16
|
+
* @private internal for `preserve`
|
|
17
|
+
*/
|
|
18
|
+
export declare function __DO_NOT_USE_getPreserved(): Array<really_any>;
|
|
19
|
+
/**
|
|
20
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
21
|
+
*/
|
|
@@ -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.100.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.100.0-46`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/templates",
|
|
3
|
-
"version": "0.100.0-
|
|
3
|
+
"version": "0.100.0-47",
|
|
4
4
|
"description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -95,10 +95,9 @@
|
|
|
95
95
|
"module": "./esm/index.es.js",
|
|
96
96
|
"typings": "./esm/typings/src/_packages/templates.index.d.ts",
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@promptbook/core": "0.100.0-
|
|
98
|
+
"@promptbook/core": "0.100.0-47"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"prettier": "2.8.1",
|
|
102
101
|
"spacetrim": "0.11.59"
|
|
103
102
|
}
|
|
104
103
|
}
|
package/umd/index.umd.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('spacetrim'), require('prettier'), require('prettier/parser-
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'spacetrim', 'prettier', 'prettier/parser-
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-templates"] = {}, global.spaceTrim, global.
|
|
5
|
-
})(this, (function (exports, spaceTrim,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('spacetrim'), require('prettier/parser-html'), require('prettier/parser-markdown'), require('prettier/standalone')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'spacetrim', 'prettier/parser-html', 'prettier/parser-markdown', 'prettier/standalone'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-templates"] = {}, global.spaceTrim, global.parserHtml, global.parserMarkdown, global.standalone));
|
|
5
|
+
})(this, (function (exports, spaceTrim, parserHtml, parserMarkdown, standalone) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
9
|
var spaceTrim__default = /*#__PURE__*/_interopDefaultLegacy(spaceTrim);
|
|
10
10
|
var parserHtml__default = /*#__PURE__*/_interopDefaultLegacy(parserHtml);
|
|
11
|
+
var parserMarkdown__default = /*#__PURE__*/_interopDefaultLegacy(parserMarkdown);
|
|
11
12
|
|
|
12
13
|
// ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten
|
|
13
14
|
/**
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
* @generated
|
|
24
25
|
* @see https://github.com/webgptorg/promptbook
|
|
25
26
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.100.0-
|
|
27
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.100.0-47';
|
|
27
28
|
/**
|
|
28
29
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
30
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -197,6 +198,13 @@
|
|
|
197
198
|
newline: '\n',
|
|
198
199
|
skipEmptyLines: true,
|
|
199
200
|
});
|
|
201
|
+
/**
|
|
202
|
+
* API request timeout in milliseconds
|
|
203
|
+
* Can be overridden via API_REQUEST_TIMEOUT environment variable
|
|
204
|
+
*
|
|
205
|
+
* @public exported from `@promptbook/core`
|
|
206
|
+
*/
|
|
207
|
+
parseInt(process.env.API_REQUEST_TIMEOUT || '90000');
|
|
200
208
|
/**
|
|
201
209
|
* Indicates whether pipeline logic validation is enabled. When true, the pipeline logic is checked for consistency.
|
|
202
210
|
*
|
|
@@ -387,9 +395,9 @@
|
|
|
387
395
|
*/
|
|
388
396
|
function prettifyMarkdown(content) {
|
|
389
397
|
try {
|
|
390
|
-
return
|
|
398
|
+
return standalone.format(content, {
|
|
391
399
|
parser: 'markdown',
|
|
392
|
-
plugins: [parserHtml__default["default"]],
|
|
400
|
+
plugins: [parserMarkdown__default["default"], parserHtml__default["default"]],
|
|
393
401
|
// TODO: DRY - make some import or auto-copy of .prettierrc
|
|
394
402
|
endOfLine: 'lf',
|
|
395
403
|
tabWidth: 4,
|
|
@@ -1596,7 +1604,7 @@
|
|
|
1596
1604
|
"preparations": [
|
|
1597
1605
|
{
|
|
1598
1606
|
"id": 1,
|
|
1599
|
-
"promptbookVersion": "0.100.0-
|
|
1607
|
+
"promptbookVersion": "0.100.0-46",
|
|
1600
1608
|
"usage": {
|
|
1601
1609
|
"price": {
|
|
1602
1610
|
"value": 0.040614
|
|
@@ -2179,7 +2187,7 @@
|
|
|
2179
2187
|
"preparations": [
|
|
2180
2188
|
{
|
|
2181
2189
|
"id": 1,
|
|
2182
|
-
"promptbookVersion": "0.100.0-
|
|
2190
|
+
"promptbookVersion": "0.100.0-46",
|
|
2183
2191
|
"usage": {
|
|
2184
2192
|
"price": {
|
|
2185
2193
|
"value": 0.040614
|
|
@@ -2885,7 +2893,7 @@
|
|
|
2885
2893
|
"preparations": [
|
|
2886
2894
|
{
|
|
2887
2895
|
"id": 1,
|
|
2888
|
-
"promptbookVersion": "0.100.0-
|
|
2896
|
+
"promptbookVersion": "0.100.0-46",
|
|
2889
2897
|
"usage": {
|
|
2890
2898
|
"price": {
|
|
2891
2899
|
"value": 0.038256
|
|
@@ -3033,7 +3041,7 @@
|
|
|
3033
3041
|
"preparations": [
|
|
3034
3042
|
{
|
|
3035
3043
|
"id": 1,
|
|
3036
|
-
"promptbookVersion": "0.100.0-
|
|
3044
|
+
"promptbookVersion": "0.100.0-46",
|
|
3037
3045
|
"usage": {
|
|
3038
3046
|
"price": {
|
|
3039
3047
|
"value": 0.038181
|
|
@@ -3129,7 +3137,7 @@
|
|
|
3129
3137
|
"preparations": [
|
|
3130
3138
|
{
|
|
3131
3139
|
"id": 1,
|
|
3132
|
-
"promptbookVersion": "0.100.0-
|
|
3140
|
+
"promptbookVersion": "0.100.0-46",
|
|
3133
3141
|
"usage": {
|
|
3134
3142
|
"price": {
|
|
3135
3143
|
"value": 0
|
|
@@ -3278,7 +3286,7 @@
|
|
|
3278
3286
|
"preparations": [
|
|
3279
3287
|
{
|
|
3280
3288
|
"id": 1,
|
|
3281
|
-
"promptbookVersion": "0.100.0-
|
|
3289
|
+
"promptbookVersion": "0.100.0-46",
|
|
3282
3290
|
"usage": {
|
|
3283
3291
|
"price": {
|
|
3284
3292
|
"value": 0.038508
|
|
@@ -3428,7 +3436,7 @@
|
|
|
3428
3436
|
"preparations": [
|
|
3429
3437
|
{
|
|
3430
3438
|
"id": 1,
|
|
3431
|
-
"promptbookVersion": "0.100.0-
|
|
3439
|
+
"promptbookVersion": "0.100.0-46",
|
|
3432
3440
|
"usage": {
|
|
3433
3441
|
"price": {
|
|
3434
3442
|
"value": 0.036648
|
|
@@ -3761,7 +3769,7 @@
|
|
|
3761
3769
|
"preparations": [
|
|
3762
3770
|
{
|
|
3763
3771
|
"id": 1,
|
|
3764
|
-
"promptbookVersion": "0.100.0-
|
|
3772
|
+
"promptbookVersion": "0.100.0-46",
|
|
3765
3773
|
"usage": {
|
|
3766
3774
|
"price": {
|
|
3767
3775
|
"value": 0.039036
|
|
@@ -3908,7 +3916,7 @@
|
|
|
3908
3916
|
"preparations": [
|
|
3909
3917
|
{
|
|
3910
3918
|
"id": 1,
|
|
3911
|
-
"promptbookVersion": "0.100.0-
|
|
3919
|
+
"promptbookVersion": "0.100.0-46",
|
|
3912
3920
|
"usage": {
|
|
3913
3921
|
"price": {
|
|
3914
3922
|
"value": 0.038313
|