@promptbook/editable 0.102.0-6 → 0.102.0-8
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 +1 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +5 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +6 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +5 -0
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +0 -8
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
package/esm/index.es.js
CHANGED
@@ -17,7 +17,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
17
17
|
* @generated
|
18
18
|
* @see https://github.com/webgptorg/promptbook
|
19
19
|
*/
|
20
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.102.0-
|
20
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.102.0-8';
|
21
21
|
/**
|
22
22
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
23
23
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
@@ -17,11 +17,15 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'participants'> & {
|
|
17
17
|
currentRating: number;
|
18
18
|
handleRating: (message: ChatMessage, rating: number) => void;
|
19
19
|
mode: 'LIGHT' | 'DARK';
|
20
|
+
/**
|
21
|
+
* Enables the copy button for this message bubble.
|
22
|
+
*/
|
23
|
+
isCopyButtonEnabled?: boolean;
|
20
24
|
};
|
21
25
|
/**
|
22
26
|
* Renders a single chat message item with avatar, content, buttons, and rating.
|
23
27
|
*
|
24
28
|
* @private internal subcomponent of `<Chat>` component
|
25
29
|
*/
|
26
|
-
export declare const ChatMessageItem: import("react").MemoExoticComponent<({ message, participant, participants, isLastMessage, onMessage, setExpandedMessageId, isExpanded, currentRating, handleRating, mode, }: ChatMessageItemProps) => import("react/jsx-runtime").JSX.Element>;
|
30
|
+
export declare const ChatMessageItem: import("react").MemoExoticComponent<({ message, participant, participants, isLastMessage, onMessage, setExpandedMessageId, isExpanded, currentRating, handleRating, mode, isCopyButtonEnabled, }: ChatMessageItemProps) => import("react/jsx-runtime").JSX.Element>;
|
27
31
|
export {};
|
@@ -161,6 +161,12 @@ export type ChatProps = {
|
|
161
161
|
* @returns Promise or string with the text content to insert into the chat message
|
162
162
|
*/
|
163
163
|
onFileUpload?(file: File): Promisable<string>;
|
164
|
+
/**
|
165
|
+
* Enables the copy button for each message bubble.
|
166
|
+
* When true, a copy button appears in the top-right of each message.
|
167
|
+
* @default true
|
168
|
+
*/
|
169
|
+
isCopyButtonEnabled?: boolean;
|
164
170
|
};
|
165
171
|
/**
|
166
172
|
* TODO: [☁️] Export component prop types only to `@promptbook/components` (not `@promptbook/types`)
|
@@ -10,6 +10,11 @@ import type { ChatParticipant } from '../types/ChatParticipant';
|
|
10
10
|
* @public exported from `@promptbook/components`
|
11
11
|
*/
|
12
12
|
export type LlmChatProps = Omit<ChatProps, 'messages' | 'onMessage' | 'onChange'> & {
|
13
|
+
/**
|
14
|
+
* Optional thread (full chat history) to be passed to LLM execution tools.
|
15
|
+
* If not provided, the internal messages state will be used.
|
16
|
+
*/
|
17
|
+
readonly thread?: ReadonlyArray<ChatMessage>;
|
13
18
|
/**
|
14
19
|
* LLM execution tools for chatting with the model
|
15
20
|
*/
|
@@ -22,14 +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
|
-
/**
|
30
|
-
* Tracks the history of attempts for error reporting
|
31
|
-
*/
|
32
|
-
private attemptHistory;
|
33
25
|
/**
|
34
26
|
* Creates OpenAI compatible Execution Tools.
|
35
27
|
*
|
@@ -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.102.0-
|
18
|
+
* It follows semantic versioning (e.g., `0.102.0-7`).
|
19
19
|
*
|
20
20
|
* @generated
|
21
21
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@promptbook/editable",
|
3
|
-
"version": "0.102.0-
|
3
|
+
"version": "0.102.0-8",
|
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,7 +95,7 @@
|
|
95
95
|
"module": "./esm/index.es.js",
|
96
96
|
"typings": "./esm/typings/src/_packages/editable.index.d.ts",
|
97
97
|
"peerDependencies": {
|
98
|
-
"@promptbook/core": "0.102.0-
|
98
|
+
"@promptbook/core": "0.102.0-8"
|
99
99
|
},
|
100
100
|
"dependencies": {
|
101
101
|
"crypto-js": "4.2.0",
|
package/umd/index.umd.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
* @generated
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
25
25
|
*/
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.102.0-
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.102.0-8';
|
27
27
|
/**
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|