@promptbook/node 0.100.0 → 0.100.1
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 +2 -2
- package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +3 -0
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/types/ChatParticipant.d.ts +4 -4
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +3 -6
- package/esm/typings/src/llm-providers/_common/profiles/llmProviderProfiles.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +3 -4
- package/esm/typings/src/utils/color/Color.d.ts +1 -2
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +2 -2
package/esm/index.es.js
CHANGED
@@ -31,7 +31,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
31
31
|
* @generated
|
32
32
|
* @see https://github.com/webgptorg/promptbook
|
33
33
|
*/
|
34
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.100.
|
34
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.100.1';
|
35
35
|
/**
|
36
36
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
37
37
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
@@ -3058,7 +3058,7 @@ const LLM_PROVIDER_PROFILES = {
|
|
3058
3058
|
};
|
3059
3059
|
/**
|
3060
3060
|
* TODO: Refactor this - each profile must be alongside the provider definition
|
3061
|
-
* TODO: Unite `AvatarProfileProps`
|
3061
|
+
* TODO: [🕛] Unite `AvatarProfileProps`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
|
3062
3062
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
3063
3063
|
*/
|
3064
3064
|
|
@@ -24,3 +24,6 @@ export type AvatarProfileProps = {
|
|
24
24
|
* @public exported from `@promptbook/components`
|
25
25
|
*/
|
26
26
|
export declare function AvatarProfile(props: AvatarProfileProps): import("react/jsx-runtime").JSX.Element;
|
27
|
+
/**
|
28
|
+
* TODO: [🕛] Unite `AvatarProfileProps`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
|
29
|
+
*/
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { CSSProperties } from 'react';
|
1
2
|
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
2
3
|
/**
|
3
4
|
* Props of `BookEditor`
|
@@ -9,6 +10,10 @@ export type BookEditorProps = {
|
|
9
10
|
* Additional CSS classes to apply to the editor container.
|
10
11
|
*/
|
11
12
|
readonly className?: string;
|
13
|
+
/**
|
14
|
+
* Optional CSS style which will be added to root <div/> element
|
15
|
+
*/
|
16
|
+
readonly style?: CSSProperties;
|
12
17
|
/**
|
13
18
|
* CSS className for a font (e.g. from next/font) to style the editor text.
|
14
19
|
* If omitted, defaults to system serif fonts.
|
@@ -1,7 +1,4 @@
|
|
1
|
-
import type { string_color } from '../../../types/typeAliases';
|
2
|
-
import type { string_name } from '../../../types/typeAliases';
|
3
|
-
import type { string_person_fullname } from '../../../types/typeAliases';
|
4
|
-
import type { string_url_image } from '../../../types/typeAliases';
|
1
|
+
import type { string_color, string_name, string_person_fullname, string_url_image } from '../../../types/typeAliases';
|
5
2
|
import { Color } from '../../../utils/color/Color';
|
6
3
|
/**
|
7
4
|
* A participant in the chat
|
@@ -30,3 +27,6 @@ export type ChatParticipant = {
|
|
30
27
|
*/
|
31
28
|
color: string_color | Color;
|
32
29
|
};
|
30
|
+
/**
|
31
|
+
* TODO: [🕛] Unite `AvatarProfileProps`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
|
32
|
+
*/
|
@@ -1,13 +1,9 @@
|
|
1
1
|
import type { Promisable } from 'type-fest';
|
2
2
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
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 { AvailableModel } from './AvailableModel';
|
8
|
-
import type { ChatPromptResult } from './PromptResult';
|
9
|
-
import type { CompletionPromptResult } from './PromptResult';
|
10
|
-
import type { EmbeddingPromptResult } from './PromptResult';
|
6
|
+
import type { ChatPromptResult, CompletionPromptResult, EmbeddingPromptResult } from './PromptResult';
|
11
7
|
/**
|
12
8
|
* Container for all the tools needed to execute prompts to large language models like GPT-4
|
13
9
|
* On its interface it exposes common methods for prompt execution.
|
@@ -60,6 +56,7 @@ export type LlmExecutionTools = {
|
|
60
56
|
callEmbeddingModel?(prompt: Prompt): Promise<EmbeddingPromptResult>;
|
61
57
|
};
|
62
58
|
/**
|
59
|
+
* TODO: [🕛] Extend this from sth class
|
63
60
|
* TODO: [🍚] Implement destroyable pattern to free resources
|
64
61
|
* TODO: [🏳] Add `callTranslationModel`
|
65
62
|
* TODO: [🧠] Emulation of one type of model with another one - emuate chat with completion; emulate translation with chat
|
@@ -76,6 +76,6 @@ export declare function getLlmProviderProfile(providerKey: keyof typeof LLM_PROV
|
|
76
76
|
export declare function createCustomLlmProfile(baseProfile: ChatParticipant, overrides: Partial<ChatParticipant>): ChatParticipant;
|
77
77
|
/**
|
78
78
|
* TODO: Refactor this - each profile must be alongside the provider definition
|
79
|
-
* TODO: Unite `AvatarProfileProps`
|
79
|
+
* TODO: [🕛] Unite `AvatarProfileProps`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
|
80
80
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
81
81
|
*/
|
@@ -1,7 +1,5 @@
|
|
1
|
-
import { MODEL_ORDERS } from '../../../constants';
|
2
|
-
import {
|
3
|
-
import type { string_name } from '../../../types/typeAliases';
|
4
|
-
import type { string_title } from '../../../types/typeAliases';
|
1
|
+
import { MODEL_ORDERS, MODEL_TRUST_LEVELS } from '../../../constants';
|
2
|
+
import type { string_name, string_title } from '../../../types/typeAliases';
|
5
3
|
import type { Registered } from '../../../utils/$Register';
|
6
4
|
import type { string_SCREAMING_CASE } from '../../../utils/normalization/normalizeTo_SCREAMING_CASE';
|
7
5
|
import type { LlmToolsConfiguration } from './LlmToolsConfiguration';
|
@@ -52,6 +50,7 @@ export type LlmToolsMetadata = Registered & {
|
|
52
50
|
createConfigurationFromEnv(env: Record<string_name, string>): LlmToolsConfiguration[number] | null;
|
53
51
|
};
|
54
52
|
/**
|
53
|
+
* TODO: [🕛] Extend this
|
55
54
|
* TODO: Add configuration schema and maybe some documentation link
|
56
55
|
* TODO: Maybe constrain LlmToolsConfiguration[number] by generic to ensure that `createConfigurationFromEnv` and `getBoilerplateConfiguration` always create same `packageName` and `className`
|
57
56
|
* TODO: [®] DRY Register logic
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import type { string_color } from '../../types/typeAliases';
|
2
|
-
import type { string_url_image } from '../../types/typeAliases';
|
1
|
+
import type { string_color, string_url_image } from '../../types/typeAliases';
|
3
2
|
import type { WithTake } from '../take/interfaces/ITakeChain';
|
4
3
|
import { CSS_COLORS } from './css-colors';
|
5
4
|
/**
|
@@ -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`).
|
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.100.
|
3
|
+
"version": "0.100.1",
|
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.100.
|
96
|
+
"@promptbook/core": "0.100.1"
|
97
97
|
},
|
98
98
|
"dependencies": {
|
99
99
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
@@ -47,7 +47,7 @@
|
|
47
47
|
* @generated
|
48
48
|
* @see https://github.com/webgptorg/promptbook
|
49
49
|
*/
|
50
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.100.
|
50
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.100.1';
|
51
51
|
/**
|
52
52
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
53
53
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
@@ -3074,7 +3074,7 @@
|
|
3074
3074
|
};
|
3075
3075
|
/**
|
3076
3076
|
* TODO: Refactor this - each profile must be alongside the provider definition
|
3077
|
-
* TODO: Unite `AvatarProfileProps`
|
3077
|
+
* TODO: [🕛] Unite `AvatarProfileProps`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
|
3078
3078
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
3079
3079
|
*/
|
3080
3080
|
|