@promptbook/website-crawler 0.104.0-2 → 0.104.0-3
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/types.index.d.ts +2 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +7 -11
- package/esm/typings/src/types/Message.d.ts +49 -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
|
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
27
27
|
* @generated
|
|
28
28
|
* @see https://github.com/webgptorg/promptbook
|
|
29
29
|
*/
|
|
30
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.104.0-
|
|
30
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.104.0-3';
|
|
31
31
|
/**
|
|
32
32
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
33
33
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -185,6 +185,7 @@ import type { BookTranspiler } from '../transpilers/_common/BookTranspiler';
|
|
|
185
185
|
import type { BookTranspilerOptions } from '../transpilers/_common/BookTranspilerOptions';
|
|
186
186
|
import type { IntermediateFilesStrategy } from '../types/IntermediateFilesStrategy';
|
|
187
187
|
import type { LlmCall } from '../types/LlmCall';
|
|
188
|
+
import type { Message } from '../types/Message';
|
|
188
189
|
import type { ModelRequirements } from '../types/ModelRequirements';
|
|
189
190
|
import type { CompletionModelRequirements } from '../types/ModelRequirements';
|
|
190
191
|
import type { ChatModelRequirements } from '../types/ModelRequirements';
|
|
@@ -551,6 +552,7 @@ export type { BookTranspiler };
|
|
|
551
552
|
export type { BookTranspilerOptions };
|
|
552
553
|
export type { IntermediateFilesStrategy };
|
|
553
554
|
export type { LlmCall };
|
|
555
|
+
export type { Message };
|
|
554
556
|
export type { ModelRequirements };
|
|
555
557
|
export type { CompletionModelRequirements };
|
|
556
558
|
export type { ChatModelRequirements };
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
+
import { Message } from '../../../types/Message';
|
|
1
2
|
import type { id, string_markdown } from '../../../types/typeAliases';
|
|
2
3
|
/**
|
|
3
4
|
* A message in the chat
|
|
4
5
|
*
|
|
5
6
|
* @public exported from `@promptbook/components`
|
|
6
7
|
*/
|
|
7
|
-
export type ChatMessage = {
|
|
8
|
+
export type ChatMessage = Omit<Message<id>, 'direction' | 'recipients' | 'threadId' | 'metadata'> & {
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Date when the message was created
|
|
14
|
-
*/
|
|
15
|
-
date?: Date;
|
|
16
|
-
/**
|
|
17
|
-
* The name of the participant who sent the message
|
|
10
|
+
* Force the channel to be 'PROMPTBOOK_CHAT'
|
|
11
|
+
*
|
|
12
|
+
* @default 'PROMPTBOOK_CHAT'
|
|
18
13
|
*/
|
|
19
|
-
|
|
14
|
+
channel?: 'PROMPTBOOK_CHAT';
|
|
20
15
|
/**
|
|
21
16
|
* The content of the message with optional markdown formatting
|
|
22
17
|
*/
|
|
@@ -37,6 +32,7 @@ export type ChatMessage = {
|
|
|
37
32
|
isVoiceCall?: boolean;
|
|
38
33
|
};
|
|
39
34
|
/**
|
|
35
|
+
* TODO: Make all fields readonly
|
|
40
36
|
* TODO: Delete `expectedAnswer` from ChatMessage
|
|
41
37
|
* TODO: Rename `date` into `created`+`modified`
|
|
42
38
|
*/
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Arrayable } from 'type-fest';
|
|
2
|
+
import { really_any } from '../_packages/types.index';
|
|
3
|
+
import { id, string_date_iso8601, string_markdown } from './typeAliases';
|
|
4
|
+
/**
|
|
5
|
+
* A generic message structure for various communication channels
|
|
6
|
+
*/
|
|
7
|
+
export type Message<TParticipant> = {
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier of the message
|
|
10
|
+
*/
|
|
11
|
+
readonly id?: id;
|
|
12
|
+
/**
|
|
13
|
+
* Date when the message was created
|
|
14
|
+
*/
|
|
15
|
+
readonly createdAt?: Date | string_date_iso8601;
|
|
16
|
+
/**
|
|
17
|
+
* The communication channel of the message
|
|
18
|
+
*/
|
|
19
|
+
readonly channel?: 'PROMPTBOOK_CHAT' | 'EMAIL' | 'SMS' | 'WHATSAPP' | 'TELEGRAM' | 'SIGNAL' | string | 'UNKNOWN';
|
|
20
|
+
/**
|
|
21
|
+
* Is the message send from the Promptbook or to the Promptbook
|
|
22
|
+
*/
|
|
23
|
+
readonly direction?: 'INBOUND' | 'OUTBOUND' | 'INTERNAL' | 'INITIAL';
|
|
24
|
+
/**
|
|
25
|
+
* Who sent the message
|
|
26
|
+
*/
|
|
27
|
+
readonly sender: TParticipant;
|
|
28
|
+
/**
|
|
29
|
+
* Who are the recipients of the message
|
|
30
|
+
*/
|
|
31
|
+
readonly recipients?: Readonly<Arrayable<TParticipant>>;
|
|
32
|
+
/**
|
|
33
|
+
* The content of the message as markdown
|
|
34
|
+
*
|
|
35
|
+
* Note: We are converting all message content to markdown for consistency
|
|
36
|
+
*/
|
|
37
|
+
readonly content: string_markdown;
|
|
38
|
+
/**
|
|
39
|
+
* The thread identifier the message belongs to
|
|
40
|
+
*
|
|
41
|
+
* - `null` means the message is not part of any thread
|
|
42
|
+
* - `undefined` means that we don't know if the message is part of a thread or not
|
|
43
|
+
*/
|
|
44
|
+
readonly threadId?: id | null;
|
|
45
|
+
/**
|
|
46
|
+
* Arbitrary metadata associated with the message
|
|
47
|
+
*/
|
|
48
|
+
readonly metadata?: Readonly<Record<string, really_any>>;
|
|
49
|
+
};
|
|
@@ -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.104.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.104.0-2`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/website-crawler",
|
|
3
|
-
"version": "0.104.0-
|
|
3
|
+
"version": "0.104.0-3",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
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/website-crawler.index.d.ts",
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@promptbook/core": "0.104.0-
|
|
98
|
+
"@promptbook/core": "0.104.0-3"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"@mozilla/readability": "0.6.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @generated
|
|
25
25
|
* @see https://github.com/webgptorg/promptbook
|
|
26
26
|
*/
|
|
27
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.104.0-
|
|
27
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.104.0-3';
|
|
28
28
|
/**
|
|
29
29
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
30
30
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|