@promptbook/openai 0.71.0-14 → 0.71.0-15
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/README.md +6 -4
- package/esm/index.es.js +1 -1
- package/esm/typings/src/execution/ExecutionTools.d.ts +0 -2
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +0 -1
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,7 @@ import { JavascriptExecutionTools } from '@promptbook/execute-javascript';
|
|
|
56
56
|
import { OpenAiExecutionTools } from '@promptbook/openai';
|
|
57
57
|
|
|
58
58
|
// ▶ Prepare tools
|
|
59
|
+
const fs = $provideFilesystemForNode();
|
|
59
60
|
const llm = new OpenAiExecutionTools(
|
|
60
61
|
// <- TODO: [🧱] Implement in a functional (not new Class) way
|
|
61
62
|
{
|
|
@@ -65,8 +66,8 @@ const llm = new OpenAiExecutionTools(
|
|
|
65
66
|
);
|
|
66
67
|
const tools = {
|
|
67
68
|
llm,
|
|
68
|
-
fs
|
|
69
|
-
scrapers: await $provideScrapersForNode({ llm }),
|
|
69
|
+
fs,
|
|
70
|
+
scrapers: await $provideScrapersForNode({ fs, llm }),
|
|
70
71
|
script: [new JavascriptExecutionTools()],
|
|
71
72
|
};
|
|
72
73
|
|
|
@@ -146,6 +147,7 @@ import { AnthropicClaudeExecutionTools } from '@promptbook/anthropic-claude';
|
|
|
146
147
|
import { AzureOpenAiExecutionTools } from '@promptbook/azure-openai';
|
|
147
148
|
|
|
148
149
|
// ▶ Prepare multiple tools
|
|
150
|
+
const fs = $provideFilesystemForNode();
|
|
149
151
|
const llm = [
|
|
150
152
|
// Note: You can use multiple LLM providers in one Promptbook execution.
|
|
151
153
|
// The best model will be chosen automatically according to the prompt and the model's capabilities.
|
|
@@ -172,8 +174,8 @@ const llm = [
|
|
|
172
174
|
];
|
|
173
175
|
const tools = {
|
|
174
176
|
llm,
|
|
175
|
-
fs
|
|
176
|
-
scrapers: await $provideScrapersForNode({ llm }),
|
|
177
|
+
fs,
|
|
178
|
+
scrapers: await $provideScrapersForNode({ fs, llm }),
|
|
177
179
|
script: [new JavascriptExecutionTools()],
|
|
178
180
|
};
|
|
179
181
|
|
package/esm/index.es.js
CHANGED
|
@@ -6,7 +6,7 @@ import spaceTrim$1, { spaceTrim } from 'spacetrim';
|
|
|
6
6
|
/**
|
|
7
7
|
* The version of the Promptbook library
|
|
8
8
|
*/
|
|
9
|
-
var PROMPTBOOK_VERSION = '0.71.0-
|
|
9
|
+
var PROMPTBOOK_VERSION = '0.71.0-14';
|
|
10
10
|
// TODO: [main] !!!! List here all the versions and annotate + put into script
|
|
11
11
|
|
|
12
12
|
/*! *****************************************************************************
|
|
@@ -53,6 +53,4 @@ export type ExecutionTools = {
|
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
55
|
* TODO: !!!!!! Move here also the executables and make $provideXxxxForNode
|
|
56
|
-
* TODO: [🍂] Maybe make llm = $provideLlmToolsFromEnv() without problem with bundle contaminated by only `@promptbook/node` and `@promptbook/cli` stuff
|
|
57
|
-
* TODO: [🍂] Same with scrapers
|
|
58
56
|
*/
|
|
@@ -23,5 +23,4 @@ export declare function $provideLlmToolsFromEnv(options?: CreateLlmToolsFromConf
|
|
|
23
23
|
* TODO: [🥃] Allow `ptbk make` without llm tools
|
|
24
24
|
* TODO: This should be maybe not under `_common` but under `utils`
|
|
25
25
|
* TODO: [®] DRY Register logic
|
|
26
|
-
* TODO: [🍂] Maybe make llm = $provideLlmToolsFromEnv() without problem with bundle contaminated by only `@promptbook/node` and `@promptbook/cli` stuff
|
|
27
26
|
*/
|
|
@@ -9,7 +9,7 @@ import type { Scraper } from '../Scraper';
|
|
|
9
9
|
*
|
|
10
10
|
* @public exported from `@promptbook/node`
|
|
11
11
|
*/
|
|
12
|
-
export declare function $provideScrapersForNode(tools: Pick<ExecutionTools, 'llm'>, options?: PrepareAndScrapeOptions): Promise<Array<Scraper>>;
|
|
12
|
+
export declare function $provideScrapersForNode(tools: Pick<ExecutionTools, 'fs' | 'llm'>, options?: PrepareAndScrapeOptions): Promise<Array<Scraper>>;
|
|
13
13
|
/**
|
|
14
14
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
15
15
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/openai",
|
|
3
|
-
"version": "0.71.0-
|
|
3
|
+
"version": "0.71.0-15",
|
|
4
4
|
"description": "Supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"module": "./esm/index.es.js",
|
|
52
52
|
"typings": "./esm/typings/src/_packages/openai.index.d.ts",
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@promptbook/core": "0.71.0-
|
|
54
|
+
"@promptbook/core": "0.71.0-15"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* The version of the Promptbook library
|
|
16
16
|
*/
|
|
17
|
-
var PROMPTBOOK_VERSION = '0.71.0-
|
|
17
|
+
var PROMPTBOOK_VERSION = '0.71.0-14';
|
|
18
18
|
// TODO: [main] !!!! List here all the versions and annotate + put into script
|
|
19
19
|
|
|
20
20
|
/*! *****************************************************************************
|