@promptbook/pdf 0.84.0-14 β 0.84.0-16
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/LICENSE.md +1 -0
- package/README.md +6 -5
- package/esm/index.es.js +7 -6
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/cli.index.d.ts +4 -0
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/deepseek.index.d.ts +8 -0
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/_packages/wizzard.index.d.ts +4 -0
- package/esm/typings/src/llm-providers/deepseek/DeepseekExecutionToolsOptions.d.ts +9 -0
- package/esm/typings/src/llm-providers/deepseek/createDeepseekExecutionTools.d.ts +14 -0
- package/esm/typings/src/llm-providers/deepseek/register-configuration.d.ts +14 -0
- package/esm/typings/src/llm-providers/deepseek/register-constructor.d.ts +15 -0
- package/package.json +3 -15
- package/umd/index.umd.js +7 -6
- package/umd/index.umd.js.map +1 -1
|
@@ -4,6 +4,8 @@ import { _AnthropicClaudeMetadataRegistration } from '../llm-providers/anthropic
|
|
|
4
4
|
import { _AnthropicClaudeRegistration } from '../llm-providers/anthropic-claude/register-constructor';
|
|
5
5
|
import { _AzureOpenAiMetadataRegistration } from '../llm-providers/azure-openai/register-configuration';
|
|
6
6
|
import { _AzureOpenAiRegistration } from '../llm-providers/azure-openai/register-constructor';
|
|
7
|
+
import { _DeepseekMetadataRegistration } from '../llm-providers/deepseek/register-configuration';
|
|
8
|
+
import { _DeepseekRegistration } from '../llm-providers/deepseek/register-constructor';
|
|
7
9
|
import { _GoogleMetadataRegistration } from '../llm-providers/google/register-configuration';
|
|
8
10
|
import { _GoogleRegistration } from '../llm-providers/google/register-constructor';
|
|
9
11
|
import { _OpenAiMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
@@ -30,6 +32,8 @@ export { _AnthropicClaudeMetadataRegistration };
|
|
|
30
32
|
export { _AnthropicClaudeRegistration };
|
|
31
33
|
export { _AzureOpenAiMetadataRegistration };
|
|
32
34
|
export { _AzureOpenAiRegistration };
|
|
35
|
+
export { _DeepseekMetadataRegistration };
|
|
36
|
+
export { _DeepseekRegistration };
|
|
33
37
|
export { _GoogleMetadataRegistration };
|
|
34
38
|
export { _GoogleRegistration };
|
|
35
39
|
export { _OpenAiMetadataRegistration };
|
|
@@ -91,6 +91,7 @@ import { countTotalUsage } from '../llm-providers/_common/utils/count-total-usag
|
|
|
91
91
|
import { limitTotalUsage } from '../llm-providers/_common/utils/count-total-usage/limitTotalUsage';
|
|
92
92
|
import { _AnthropicClaudeMetadataRegistration } from '../llm-providers/anthropic-claude/register-configuration';
|
|
93
93
|
import { _AzureOpenAiMetadataRegistration } from '../llm-providers/azure-openai/register-configuration';
|
|
94
|
+
import { _DeepseekMetadataRegistration } from '../llm-providers/deepseek/register-configuration';
|
|
94
95
|
import { _GoogleMetadataRegistration } from '../llm-providers/google/register-configuration';
|
|
95
96
|
import { joinLlmExecutionTools } from '../llm-providers/multiple/joinLlmExecutionTools';
|
|
96
97
|
import { MultipleLlmExecutionTools } from '../llm-providers/multiple/MultipleLlmExecutionTools';
|
|
@@ -220,6 +221,7 @@ export { countTotalUsage };
|
|
|
220
221
|
export { limitTotalUsage };
|
|
221
222
|
export { _AnthropicClaudeMetadataRegistration };
|
|
222
223
|
export { _AzureOpenAiMetadataRegistration };
|
|
224
|
+
export { _DeepseekMetadataRegistration };
|
|
223
225
|
export { _GoogleMetadataRegistration };
|
|
224
226
|
export { joinLlmExecutionTools };
|
|
225
227
|
export { MultipleLlmExecutionTools };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
|
+
import { createDeepseekExecutionTools } from '../llm-providers/deepseek/createDeepseekExecutionTools';
|
|
3
|
+
import type { DeepseekExecutionToolsOptions } from '../llm-providers/deepseek/DeepseekExecutionToolsOptions';
|
|
4
|
+
import { _DeepseekRegistration } from '../llm-providers/deepseek/register-constructor';
|
|
5
|
+
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
6
|
+
export { createDeepseekExecutionTools };
|
|
7
|
+
export type { DeepseekExecutionToolsOptions };
|
|
8
|
+
export { _DeepseekRegistration };
|
|
@@ -70,6 +70,7 @@ import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anth
|
|
|
70
70
|
import type { AnthropicClaudeExecutionToolsDirectOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
|
|
71
71
|
import type { AnthropicClaudeExecutionToolsProxiedOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
|
|
72
72
|
import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions';
|
|
73
|
+
import type { DeepseekExecutionToolsOptions } from '../llm-providers/deepseek/DeepseekExecutionToolsOptions';
|
|
73
74
|
import type { GoogleExecutionToolsOptions } from '../llm-providers/google/GoogleExecutionToolsOptions';
|
|
74
75
|
import type { OpenAiAssistantExecutionToolsOptions } from '../llm-providers/openai/OpenAiAssistantExecutionToolsOptions';
|
|
75
76
|
import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions';
|
|
@@ -344,6 +345,7 @@ export type { AnthropicClaudeExecutionToolsOptions };
|
|
|
344
345
|
export type { AnthropicClaudeExecutionToolsDirectOptions };
|
|
345
346
|
export type { AnthropicClaudeExecutionToolsProxiedOptions };
|
|
346
347
|
export type { AzureOpenAiExecutionToolsOptions };
|
|
348
|
+
export type { DeepseekExecutionToolsOptions };
|
|
347
349
|
export type { GoogleExecutionToolsOptions };
|
|
348
350
|
export type { OpenAiAssistantExecutionToolsOptions };
|
|
349
351
|
export type { OpenAiExecutionToolsOptions };
|
|
@@ -3,6 +3,8 @@ import { _AnthropicClaudeMetadataRegistration } from '../llm-providers/anthropic
|
|
|
3
3
|
import { _AnthropicClaudeRegistration } from '../llm-providers/anthropic-claude/register-constructor';
|
|
4
4
|
import { _AzureOpenAiMetadataRegistration } from '../llm-providers/azure-openai/register-configuration';
|
|
5
5
|
import { _AzureOpenAiRegistration } from '../llm-providers/azure-openai/register-constructor';
|
|
6
|
+
import { _DeepseekMetadataRegistration } from '../llm-providers/deepseek/register-configuration';
|
|
7
|
+
import { _DeepseekRegistration } from '../llm-providers/deepseek/register-constructor';
|
|
6
8
|
import { _GoogleMetadataRegistration } from '../llm-providers/google/register-configuration';
|
|
7
9
|
import { _GoogleRegistration } from '../llm-providers/google/register-constructor';
|
|
8
10
|
import { _OpenAiMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
@@ -29,6 +31,8 @@ export { _AnthropicClaudeMetadataRegistration };
|
|
|
29
31
|
export { _AnthropicClaudeRegistration };
|
|
30
32
|
export { _AzureOpenAiMetadataRegistration };
|
|
31
33
|
export { _AzureOpenAiRegistration };
|
|
34
|
+
export { _DeepseekMetadataRegistration };
|
|
35
|
+
export { _DeepseekRegistration };
|
|
32
36
|
export { _GoogleMetadataRegistration };
|
|
33
37
|
export { _GoogleRegistration };
|
|
34
38
|
export { _OpenAiMetadataRegistration };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { createDeepSeek } from '@ai-sdk/deepseek';
|
|
2
|
+
import type { VercelExecutionToolsOptions } from '../vercel/VercelExecutionToolsOptions';
|
|
3
|
+
/**
|
|
4
|
+
* Options for `DeepseekExecutionTools`
|
|
5
|
+
*
|
|
6
|
+
* This combines options for Promptbook, Deepseek and Vercel together
|
|
7
|
+
* @public exported from `@promptbook/deepseek`
|
|
8
|
+
*/
|
|
9
|
+
export type DeepseekExecutionToolsOptions = Omit<VercelExecutionToolsOptions, 'title' | 'description' | 'vercelProvider' | 'availableModels'> & Parameters<typeof createDeepSeek>[0];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
2
|
+
import type { DeepseekExecutionToolsOptions } from './DeepseekExecutionToolsOptions';
|
|
3
|
+
/**
|
|
4
|
+
* Execution Tools for calling Deepseek API.
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/deepseek`
|
|
7
|
+
*/
|
|
8
|
+
export declare const createDeepseekExecutionTools: ((options: DeepseekExecutionToolsOptions) => LlmExecutionTools) & {
|
|
9
|
+
packageName: string;
|
|
10
|
+
className: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* TODO: [πΆ] Naming "constructor" vs "creator" vs "factory"
|
|
14
|
+
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Registration } from '../../utils/$Register';
|
|
2
|
+
/**
|
|
3
|
+
* Registration of LLM provider metadata
|
|
4
|
+
*
|
|
5
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/core`
|
|
8
|
+
* @public exported from `@promptbook/wizzard`
|
|
9
|
+
* @public exported from `@promptbook/cli`
|
|
10
|
+
*/
|
|
11
|
+
export declare const _DeepseekMetadataRegistration: Registration;
|
|
12
|
+
/**
|
|
13
|
+
* Note: [π] Ignore a discrepancy between file name and entity name
|
|
14
|
+
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Registration } from '../../utils/$Register';
|
|
2
|
+
/**
|
|
3
|
+
* Registration of LLM provider
|
|
4
|
+
*
|
|
5
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/deepseek`
|
|
8
|
+
* @public exported from `@promptbook/wizzard`
|
|
9
|
+
* @public exported from `@promptbook/cli`
|
|
10
|
+
*/
|
|
11
|
+
export declare const _DeepseekRegistration: Registration;
|
|
12
|
+
/**
|
|
13
|
+
* TODO: [πΆ] Naming "constructor" vs "creator" vs "factory"
|
|
14
|
+
* Note: [π] Ignore a discrepancy between file name and entity name
|
|
15
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/pdf",
|
|
3
|
-
"version": "0.84.0-
|
|
3
|
+
"version": "0.84.0-16",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
|
-
"--note-0": " <- [π]",
|
|
6
5
|
"private": false,
|
|
7
6
|
"sideEffects": false,
|
|
8
7
|
"repository": {
|
|
@@ -12,7 +11,6 @@
|
|
|
12
11
|
"contributors": [
|
|
13
12
|
"Pavol HejnΓ½ <pavol@ptbk.io> (https://www.pavolhejny.com/)"
|
|
14
13
|
],
|
|
15
|
-
"--todo-0": "TODO: [βοΈ] Make better list of keywords",
|
|
16
14
|
"keywords": [
|
|
17
15
|
"ai",
|
|
18
16
|
"llm",
|
|
@@ -35,26 +33,16 @@
|
|
|
35
33
|
"anthropic",
|
|
36
34
|
"LLMOps"
|
|
37
35
|
],
|
|
38
|
-
"license": "
|
|
36
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
39
37
|
"bugs": {
|
|
40
38
|
"url": "https://github.com/webgptorg/promptbook/issues"
|
|
41
39
|
},
|
|
42
40
|
"homepage": "https://www.npmjs.com/package/@promptbook/core",
|
|
43
|
-
"funding": [
|
|
44
|
-
{
|
|
45
|
-
"type": "individual",
|
|
46
|
-
"url": "https://buymeacoffee.com/hejny"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"type": "github",
|
|
50
|
-
"url": "https://github.com/webgptorg/promptbook/blob/main/README.md#%EF%B8%8F-contributing"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
41
|
"main": "./umd/index.umd.js",
|
|
54
42
|
"module": "./esm/index.es.js",
|
|
55
43
|
"typings": "./esm/typings/src/_packages/pdf.index.d.ts",
|
|
56
44
|
"peerDependencies": {
|
|
57
|
-
"@promptbook/core": "0.84.0-
|
|
45
|
+
"@promptbook/core": "0.84.0-16"
|
|
58
46
|
},
|
|
59
47
|
"dependencies": {
|
|
60
48
|
"crypto-js": "4.2.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @generated
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.84.0-
|
|
28
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.84.0-15';
|
|
29
29
|
/**
|
|
30
30
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
31
31
|
* Note: [π] Ignore a discrepancy between file name and entity name
|
|
@@ -6358,10 +6358,10 @@
|
|
|
6358
6358
|
this.tools = tools;
|
|
6359
6359
|
this.options = options;
|
|
6360
6360
|
this.markdownScraper = new MarkdownScraper(tools, options);
|
|
6361
|
+
// Note: Module `markitdown-ts` has no types available, so it is imported using `require`
|
|
6361
6362
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
6362
6363
|
var MarkItDown = require('markitdown-ts').MarkItDown;
|
|
6363
|
-
// <- TODO:
|
|
6364
|
-
// <- Note: !!!!!!!
|
|
6364
|
+
// <- TODO: 'Use Markitdown directly not through this package
|
|
6365
6365
|
this.markitdown = new MarkItDown();
|
|
6366
6366
|
}
|
|
6367
6367
|
Object.defineProperty(MarkitdownScraper.prototype, "metadata", {
|
|
@@ -6406,12 +6406,12 @@
|
|
|
6406
6406
|
case 2:
|
|
6407
6407
|
if (!!(_f.sent())) return [3 /*break*/, 5];
|
|
6408
6408
|
src = source.filename || source.url || null;
|
|
6409
|
-
console.log('!!!', { src
|
|
6409
|
+
// console.log('!!!', { src, source, cacheFilehandler });
|
|
6410
6410
|
if (src === null) {
|
|
6411
6411
|
throw new UnexpectedError('Source has no filename or url');
|
|
6412
6412
|
}
|
|
6413
6413
|
return [4 /*yield*/, this.markitdown.convert(src, {
|
|
6414
|
-
// TODO:
|
|
6414
|
+
// TODO: Pass when sacraping Youtube
|
|
6415
6415
|
// enableYoutubeTranscript: true,
|
|
6416
6416
|
// youtubeTranscriptLanguage: 'en',
|
|
6417
6417
|
})];
|
|
@@ -6421,9 +6421,10 @@
|
|
|
6421
6421
|
throw new Error("Markitdown could not convert the \"".concat(source.source, "\""));
|
|
6422
6422
|
// <- TODO: !!! Make MarkitdownError
|
|
6423
6423
|
}
|
|
6424
|
-
console.log('!!!', { result
|
|
6424
|
+
// console.log('!!!', { result, cacheFilehandler });
|
|
6425
6425
|
return [4 /*yield*/, this.tools.fs.writeFile(cacheFilehandler.filename, result.text_content)];
|
|
6426
6426
|
case 4:
|
|
6427
|
+
// console.log('!!!', { result, cacheFilehandler });
|
|
6427
6428
|
_f.sent();
|
|
6428
6429
|
_f.label = 5;
|
|
6429
6430
|
case 5: return [2 /*return*/, cacheFilehandler];
|