@promptbook/openai 0.85.0-1 → 0.85.0-10
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 +3 -3
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/cli/cli-commands/about.d.ts +0 -1
- package/esm/typings/src/execution/ExecutionTask.d.ts +7 -3
- package/esm/typings/src/execution/FilesystemTools.d.ts +1 -1
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +1 -2
- package/esm/typings/src/utils/normalization/suffixUrl.d.ts +7 -0
- package/esm/typings/src/utils/normalization/suffixUrl.test.d.ts +1 -0
- package/package.json +2 -2
- package/umd/index.umd.js +3 -3
package/esm/index.es.js
CHANGED
|
@@ -16,7 +16,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
16
16
|
* @generated
|
|
17
17
|
* @see https://github.com/webgptorg/promptbook
|
|
18
18
|
*/
|
|
19
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-
|
|
19
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-9';
|
|
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
|
|
@@ -1580,7 +1580,7 @@ var OPENAI_MODELS = exportJson({
|
|
|
1580
1580
|
pricing: {
|
|
1581
1581
|
prompt: computeUsage("$3.00 / 1M tokens"),
|
|
1582
1582
|
output: computeUsage("$12.00 / 1M tokens"),
|
|
1583
|
-
// <- TODO:
|
|
1583
|
+
// <- TODO: !! Unsure, check the pricing
|
|
1584
1584
|
},
|
|
1585
1585
|
},
|
|
1586
1586
|
/**/
|
|
@@ -1592,7 +1592,7 @@ var OPENAI_MODELS = exportJson({
|
|
|
1592
1592
|
pricing: {
|
|
1593
1593
|
prompt: computeUsage("$3.00 / 1M tokens"),
|
|
1594
1594
|
output: computeUsage("$12.00 / 1M tokens"),
|
|
1595
|
-
// <- TODO:
|
|
1595
|
+
// <- TODO: !! Unsure, check the pricing
|
|
1596
1596
|
},
|
|
1597
1597
|
},
|
|
1598
1598
|
/**/
|
|
@@ -47,6 +47,7 @@ import { parseKeywords } from '../utils/normalization/parseKeywords';
|
|
|
47
47
|
import { parseKeywordsFromString } from '../utils/normalization/parseKeywordsFromString';
|
|
48
48
|
import { removeDiacritics } from '../utils/normalization/removeDiacritics';
|
|
49
49
|
import { searchKeywords } from '../utils/normalization/searchKeywords';
|
|
50
|
+
import { suffixUrl } from '../utils/normalization/suffixUrl';
|
|
50
51
|
import { titleToName } from '../utils/normalization/titleToName';
|
|
51
52
|
import { spaceTrim } from '../utils/organization/spaceTrim';
|
|
52
53
|
import { extractParameterNames } from '../utils/parameters/extractParameterNames';
|
|
@@ -128,6 +129,7 @@ export { parseKeywords };
|
|
|
128
129
|
export { parseKeywordsFromString };
|
|
129
130
|
export { removeDiacritics };
|
|
130
131
|
export { searchKeywords };
|
|
132
|
+
export { suffixUrl };
|
|
131
133
|
export { titleToName };
|
|
132
134
|
export { spaceTrim };
|
|
133
135
|
export { extractParameterNames };
|
|
@@ -8,7 +8,6 @@ import type { Command as Program } from 'commander';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function $initializeAboutCommand(program: Program): void;
|
|
10
10
|
/**
|
|
11
|
-
* TODO: !!! Test this in `deno`
|
|
12
11
|
* TODO: [🗽] Unite branding and make single place for it
|
|
13
12
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
14
13
|
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs';
|
|
2
2
|
import { PartialDeep } from 'type-fest';
|
|
3
|
-
import type { string_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
4
3
|
import type { task_id } from '../types/typeAliases';
|
|
4
|
+
import type { string_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
5
5
|
import type { AbstractTaskResult } from './AbstractTaskResult';
|
|
6
6
|
import type { PipelineExecutorResult } from './PipelineExecutorResult';
|
|
7
7
|
/**
|
|
@@ -30,7 +30,7 @@ export declare function createTask<TTaskResult extends AbstractTaskResult>(optio
|
|
|
30
30
|
*/
|
|
31
31
|
export type ExecutionTask = AbstractTask<PipelineExecutorResult> & {
|
|
32
32
|
readonly taskType: 'EXECUTION';
|
|
33
|
-
readonly taskId: `
|
|
33
|
+
readonly taskId: `exec-${task_id}`;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
36
|
* Represents a task that prepares a pipeline
|
|
@@ -38,7 +38,7 @@ export type ExecutionTask = AbstractTask<PipelineExecutorResult> & {
|
|
|
38
38
|
*/
|
|
39
39
|
export type PreparationTask = AbstractTask<PipelineExecutorResult> & {
|
|
40
40
|
readonly taskType: 'PREPARATION';
|
|
41
|
-
readonly taskId: `
|
|
41
|
+
readonly taskId: `prep-${task_id}`;
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
44
|
* Base interface for all task types
|
|
@@ -62,6 +62,10 @@ export type AbstractTask<TTaskResult extends AbstractTaskResult> = {
|
|
|
62
62
|
* Gets an observable stream of partial task results
|
|
63
63
|
*/
|
|
64
64
|
asObservable(): Observable<PartialDeep<TTaskResult>>;
|
|
65
|
+
/**
|
|
66
|
+
* Gets just the current value which is mutated during the task processing
|
|
67
|
+
*/
|
|
68
|
+
currentValue: PartialDeep<TTaskResult>;
|
|
65
69
|
};
|
|
66
70
|
export type Task = ExecutionTask | PreparationTask;
|
|
67
71
|
export {};
|
|
@@ -11,8 +11,7 @@ import type { RemoteServerOptions } from './types/RemoteServerOptions';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function startRemoteServer<TCustomOptions = undefined>(options: RemoteServerOptions<TCustomOptions>): IDestroyable;
|
|
13
13
|
/**
|
|
14
|
-
* TODO:
|
|
15
|
-
* TODO: !!!!!!! Allow to pass tokem here
|
|
14
|
+
* TODO: !! Add CORS and security - probbably via `helmet`
|
|
16
15
|
* TODO: [👩🏾🤝🧑🏾] Allow to pass custom fetch function here - PromptbookFetch
|
|
17
16
|
* TODO: Split this file into multiple functions - handler for each request
|
|
18
17
|
* TODO: Maybe use `$exportJson`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/openai",
|
|
3
|
-
"version": "0.85.0-
|
|
3
|
+
"version": "0.85.0-10",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"module": "./esm/index.es.js",
|
|
48
48
|
"typings": "./esm/typings/src/_packages/openai.index.d.ts",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@promptbook/core": "0.85.0-
|
|
50
|
+
"@promptbook/core": "0.85.0-10"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"colors": "1.4.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
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-
|
|
27
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.85.0-9';
|
|
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
|
|
@@ -1588,7 +1588,7 @@
|
|
|
1588
1588
|
pricing: {
|
|
1589
1589
|
prompt: computeUsage("$3.00 / 1M tokens"),
|
|
1590
1590
|
output: computeUsage("$12.00 / 1M tokens"),
|
|
1591
|
-
// <- TODO:
|
|
1591
|
+
// <- TODO: !! Unsure, check the pricing
|
|
1592
1592
|
},
|
|
1593
1593
|
},
|
|
1594
1594
|
/**/
|
|
@@ -1600,7 +1600,7 @@
|
|
|
1600
1600
|
pricing: {
|
|
1601
1601
|
prompt: computeUsage("$3.00 / 1M tokens"),
|
|
1602
1602
|
output: computeUsage("$12.00 / 1M tokens"),
|
|
1603
|
-
// <- TODO:
|
|
1603
|
+
// <- TODO: !! Unsure, check the pricing
|
|
1604
1604
|
},
|
|
1605
1605
|
},
|
|
1606
1606
|
/**/
|