@promptbook/website-crawler 0.104.0-1 → 0.104.0-11
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 +24 -3
- package/esm/index.es.js.map +1 -1
- package/esm/typings/servers.d.ts +8 -0
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +16 -2
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +29 -1
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +6 -6
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.closed.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +3 -3
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +5 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/CodeBlock/CodeBlock.d.ts +13 -0
- package/esm/typings/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +9 -13
- package/esm/typings/src/book-components/_common/Dropdown/Dropdown.d.ts +3 -3
- package/esm/typings/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +1 -1
- package/esm/typings/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +56 -0
- package/esm/typings/src/book-components/icons/AboutIcon.d.ts +1 -1
- package/esm/typings/src/book-components/icons/AttachmentIcon.d.ts +1 -1
- package/esm/typings/src/book-components/icons/CameraIcon.d.ts +1 -1
- package/esm/typings/src/book-components/icons/DownloadIcon.d.ts +1 -1
- package/esm/typings/src/book-components/icons/MenuIcon.d.ts +1 -1
- package/esm/typings/src/book-components/icons/SaveIcon.d.ts +1 -1
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -12
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +27 -15
- package/esm/typings/src/commitments/DICTIONARY/DICTIONARY.d.ts +46 -0
- package/esm/typings/src/commitments/index.d.ts +2 -1
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -1
- package/esm/typings/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +6 -2
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +6 -1
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/ollama/OllamaExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -0
- package/esm/typings/src/remote-server/ui/ServerApp.d.ts +1 -1
- package/esm/typings/src/search-engines/SearchEngine.d.ts +9 -0
- package/esm/typings/src/search-engines/SearchResult.d.ts +18 -0
- package/esm/typings/src/search-engines/bing/BingSearchEngine.d.ts +15 -0
- package/esm/typings/src/search-engines/dummy/DummySearchEngine.d.ts +15 -0
- package/esm/typings/src/types/Message.d.ts +49 -0
- package/esm/typings/src/types/ModelRequirements.d.ts +38 -14
- package/esm/typings/src/types/typeAliases.d.ts +23 -1
- package/esm/typings/src/utils/color/utils/colorToDataUrl.d.ts +2 -1
- package/esm/typings/src/utils/environment/$detectRuntimeEnvironment.d.ts +4 -4
- package/esm/typings/src/utils/environment/$isRunningInBrowser.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInJest.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInNode.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInWebWorker.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/random/$randomAgentPersona.d.ts +3 -2
- package/esm/typings/src/utils/random/$randomBase58.d.ts +12 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +24 -3
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/book-2.0/utils/generateGravatarUrl.d.ts +0 -10
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { string_persona_description } from '../../types/typeAliases';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
+
* Generates a random agent persona description.
|
|
3
4
|
*
|
|
4
5
|
* @private internal helper function
|
|
5
6
|
*/
|
|
6
|
-
export declare function $randomAgentPersona():
|
|
7
|
+
export declare function $randomAgentPersona(): string_persona_description;
|
|
7
8
|
/**
|
|
8
9
|
* TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
|
|
9
10
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates random base58 string
|
|
3
|
+
*
|
|
4
|
+
* Note: `$` is used to indicate that this function is not a pure function - it is not deterministic
|
|
5
|
+
* Note: This function is cryptographically secure (it uses crypto.randomBytes internally)
|
|
6
|
+
*
|
|
7
|
+
* @param length - length of the string
|
|
8
|
+
* @returns secure random base58 string
|
|
9
|
+
*
|
|
10
|
+
* @private internal helper function
|
|
11
|
+
*/
|
|
12
|
+
export declare function $randomBase58(length: number): string;
|
|
@@ -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-10`).
|
|
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-11",
|
|
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-11"
|
|
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-11';
|
|
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
|
|
@@ -4001,6 +4001,15 @@
|
|
|
4001
4001
|
return promptResult;
|
|
4002
4002
|
};
|
|
4003
4003
|
}
|
|
4004
|
+
if (llmTools.callImageGenerationModel !== undefined) {
|
|
4005
|
+
proxyTools.callImageGenerationModel = async (prompt) => {
|
|
4006
|
+
// console.info('[🚕] callImageGenerationModel through countTotalUsage');
|
|
4007
|
+
const promptResult = await llmTools.callImageGenerationModel(prompt);
|
|
4008
|
+
totalUsage = addUsage(totalUsage, promptResult.usage);
|
|
4009
|
+
spending.next(promptResult.usage);
|
|
4010
|
+
return promptResult;
|
|
4011
|
+
};
|
|
4012
|
+
}
|
|
4004
4013
|
// <- Note: [🤖]
|
|
4005
4014
|
return proxyTools;
|
|
4006
4015
|
}
|
|
@@ -4009,7 +4018,7 @@
|
|
|
4009
4018
|
* TODO: [🧠] Is there some meaningfull way how to test this util
|
|
4010
4019
|
* TODO: [🧠][🌯] Maybe a way how to hide ability to `get totalUsage`
|
|
4011
4020
|
* > const [llmToolsWithUsage,getUsage] = countTotalUsage(llmTools);
|
|
4012
|
-
* TODO: [👷♂️]
|
|
4021
|
+
* TODO: [👷♂️] Write a comprehensive manual explaining the construction and usage of LLM tools in the Promptbook ecosystem
|
|
4013
4022
|
*/
|
|
4014
4023
|
|
|
4015
4024
|
/**
|
|
@@ -4110,6 +4119,12 @@
|
|
|
4110
4119
|
callEmbeddingModel(prompt) {
|
|
4111
4120
|
return this.callCommonModel(prompt);
|
|
4112
4121
|
}
|
|
4122
|
+
/**
|
|
4123
|
+
* Calls the best available embedding model
|
|
4124
|
+
*/
|
|
4125
|
+
callImageGenerationModel(prompt) {
|
|
4126
|
+
return this.callCommonModel(prompt);
|
|
4127
|
+
}
|
|
4113
4128
|
// <- Note: [🤖]
|
|
4114
4129
|
/**
|
|
4115
4130
|
* Calls the best available model
|
|
@@ -4136,6 +4151,11 @@
|
|
|
4136
4151
|
continue llm;
|
|
4137
4152
|
}
|
|
4138
4153
|
return await llmExecutionTools.callEmbeddingModel(prompt);
|
|
4154
|
+
case 'IMAGE_GENERATION':
|
|
4155
|
+
if (llmExecutionTools.callImageGenerationModel === undefined) {
|
|
4156
|
+
continue llm;
|
|
4157
|
+
}
|
|
4158
|
+
return await llmExecutionTools.callImageGenerationModel(prompt);
|
|
4139
4159
|
// <- case [🤖]:
|
|
4140
4160
|
default:
|
|
4141
4161
|
throw new UnexpectedError(`Unknown model variant "${prompt.modelRequirements.modelVariant}" in ${llmExecutionTools.title}`);
|
|
@@ -6151,8 +6171,9 @@
|
|
|
6151
6171
|
$ongoingTaskResult.$resultString = $ongoingTaskResult.$completionResult.content;
|
|
6152
6172
|
break variant;
|
|
6153
6173
|
case 'EMBEDDING':
|
|
6174
|
+
case 'IMAGE_GENERATION':
|
|
6154
6175
|
throw new PipelineExecutionError(spaceTrim$1.spaceTrim((block) => `
|
|
6155
|
-
|
|
6176
|
+
${modelRequirements.modelVariant} model can not be used in pipeline
|
|
6156
6177
|
|
|
6157
6178
|
This should be catched during parsing
|
|
6158
6179
|
|