@promptbook/vercel 0.103.0-49 → 0.103.0-50
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/_packages/components.index.d.ts +2 -0
- package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgent.d.ts +20 -0
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +8 -0
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +7 -0
- package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +5 -0
- 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
|
@@ -16,7 +16,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
16
16
|
* @generated
|
|
17
17
|
* @see https://github.com/webgptorg/promptbook
|
|
18
18
|
*/
|
|
19
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-
|
|
19
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-50';
|
|
20
20
|
/**
|
|
21
21
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
22
22
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -51,6 +51,7 @@ import { ResetIcon } from '../book-components/icons/ResetIcon';
|
|
|
51
51
|
import { SaveIcon } from '../book-components/icons/SaveIcon';
|
|
52
52
|
import { SendIcon } from '../book-components/icons/SendIcon';
|
|
53
53
|
import { TemplateIcon } from '../book-components/icons/TemplateIcon';
|
|
54
|
+
import { PromptbookAgent } from '../book-components/PromptbookAgent/PromptbookAgent';
|
|
54
55
|
import { BrandedQrCode } from '../book-components/Qr/BrandedQrCode';
|
|
55
56
|
import { GenericQrCode } from '../book-components/Qr/GenericQrCode';
|
|
56
57
|
import { PromptbookQrCode } from '../book-components/Qr/PromptbookQrCode';
|
|
@@ -109,6 +110,7 @@ export { ResetIcon };
|
|
|
109
110
|
export { SaveIcon };
|
|
110
111
|
export { SendIcon };
|
|
111
112
|
export { TemplateIcon };
|
|
113
|
+
export { PromptbookAgent };
|
|
112
114
|
export { BrandedQrCode };
|
|
113
115
|
export { GenericQrCode };
|
|
114
116
|
export { PromptbookQrCode };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './PromptbookAgent.css';
|
|
2
|
+
type PromptbookAgentProps = {
|
|
3
|
+
/**
|
|
4
|
+
* URL of the agent to connect to
|
|
5
|
+
*
|
|
6
|
+
* @example "http://s6.ptbk.io/benjamin-white"
|
|
7
|
+
*/
|
|
8
|
+
agentUrl: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Renders a floating agent button that opens a chat window with the remote agent.
|
|
12
|
+
*
|
|
13
|
+
* @public exported from `@promptbook/components`
|
|
14
|
+
*/
|
|
15
|
+
export declare function PromptbookAgent(props: PromptbookAgentProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
/**
|
|
18
|
+
* TODO: !!! Load the full branding
|
|
19
|
+
* TODO: !!! <promptbook-agent> element
|
|
20
|
+
*/
|
|
@@ -2,6 +2,8 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
2
2
|
import type { AgentBasicInformation, BookParameter } from '../../book-2.0/agent-source/AgentBasicInformation';
|
|
3
3
|
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
|
4
4
|
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
5
|
+
import type { ChatPromptResult } from '../../execution/PromptResult';
|
|
6
|
+
import type { Prompt } from '../../types/Prompt';
|
|
5
7
|
import type { string_agent_hash, string_agent_name, string_agent_url, string_url_image } from '../../types/typeAliases';
|
|
6
8
|
import { AgentLlmExecutionTools } from './AgentLlmExecutionTools';
|
|
7
9
|
import type { AgentOptions } from './AgentOptions';
|
|
@@ -55,6 +57,12 @@ export declare class Agent extends AgentLlmExecutionTools implements LlmExecutio
|
|
|
55
57
|
get parameters(): BookParameter[];
|
|
56
58
|
readonly agentSource: BehaviorSubject<string_book>;
|
|
57
59
|
constructor(options: AgentOptions);
|
|
60
|
+
/**
|
|
61
|
+
* Calls the chat model with agent-specific system prompt and requirements with streaming
|
|
62
|
+
*
|
|
63
|
+
* Note: This method also implements the learning mechanism
|
|
64
|
+
*/
|
|
65
|
+
callChatModelStream(prompt: Prompt, onProgress: (chunk: ChatPromptResult) => void): Promise<ChatPromptResult>;
|
|
58
66
|
}
|
|
59
67
|
/**
|
|
60
68
|
* TODO: [🧠][😰]Agent is not working with the parameters, should it be?
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Promisable } from 'type-fest';
|
|
2
|
+
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
|
2
3
|
import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant';
|
|
3
4
|
import type { AvailableModel } from '../../execution/AvailableModel';
|
|
4
5
|
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
@@ -40,6 +41,12 @@ export declare class AgentLlmExecutionTools implements LlmExecutionTools {
|
|
|
40
41
|
* @param agentSource The agent source string that defines the agent's behavior
|
|
41
42
|
*/
|
|
42
43
|
constructor(options: CreateAgentLlmExecutionToolsOptions);
|
|
44
|
+
/**
|
|
45
|
+
* Updates the agent source and clears the cache
|
|
46
|
+
*
|
|
47
|
+
* @param agentSource The new agent source string
|
|
48
|
+
*/
|
|
49
|
+
protected updateAgentSource(agentSource: string_book): void;
|
|
43
50
|
/**
|
|
44
51
|
* Get cached or parse agent information
|
|
45
52
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ChatPromptResult } from '../../execution/PromptResult';
|
|
2
2
|
import type { Prompt } from '../../types/Prompt';
|
|
3
|
+
import type { string_agent_hash, string_agent_name } from '../../types/typeAliases';
|
|
3
4
|
import { Agent } from './Agent';
|
|
4
5
|
import type { RemoteAgentOptions } from './RemoteAgentOptions';
|
|
5
6
|
/**
|
|
@@ -20,7 +21,11 @@ export declare class RemoteAgent extends Agent {
|
|
|
20
21
|
* The source of the agent
|
|
21
22
|
*/
|
|
22
23
|
private agentUrl;
|
|
24
|
+
private _remoteAgentName;
|
|
25
|
+
private _remoteAgentHash;
|
|
23
26
|
private constructor();
|
|
27
|
+
get agentName(): string_agent_name;
|
|
28
|
+
get agentHash(): string_agent_hash;
|
|
24
29
|
/**
|
|
25
30
|
* Calls the agent on agents remote server
|
|
26
31
|
*/
|
|
@@ -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.103.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.103.0-49`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/vercel",
|
|
3
|
-
"version": "0.103.0-
|
|
3
|
+
"version": "0.103.0-50",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"module": "./esm/index.es.js",
|
|
95
95
|
"typings": "./esm/typings/src/_packages/vercel.index.d.ts",
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@promptbook/core": "0.103.0-
|
|
97
|
+
"@promptbook/core": "0.103.0-50"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"colors": "^1.4.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.103.0-
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-50';
|
|
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
|