@promptbook/openai 0.77.0-5 â 0.77.0-6
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/execution/AvailableModel.d.ts +16 -2
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +1 -0
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +6 -3
- package/esm/typings/src/llm-providers/google/GoogleExecutionToolsOptions.d.ts +3 -6
- package/esm/typings/src/llm-providers/vercel/VercelExecutionToolsOptions.d.ts +2 -1
- package/esm/typings/src/llm-providers/vercel/createExecutionToolsFromVercelProvider.d.ts +1 -1
- package/esm/typings/src/types/typeAliases.d.ts +7 -1
- package/esm/typings/src/utils/serialization/asSerializable.d.ts +11 -0
- package/esm/typings/src/utils/serialization/asSerializable.test.d.ts +1 -0
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
package/esm/index.es.js
CHANGED
|
@@ -14,7 +14,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webgptorg/promptbook
|
|
16
16
|
*/
|
|
17
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.77.0-
|
|
17
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.77.0-5';
|
|
18
18
|
/**
|
|
19
19
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
20
20
|
* Note: [ð] Ignore a discrepancy between file name and entity name
|
|
@@ -145,6 +145,7 @@ import type { string_reserved_parameter_name } from '../types/typeAliases';
|
|
|
145
145
|
import type { ReservedParameters } from '../types/typeAliases';
|
|
146
146
|
import type { string_title } from '../types/typeAliases';
|
|
147
147
|
import type { string_persona_description } from '../types/typeAliases';
|
|
148
|
+
import type { string_model_description } from '../types/typeAliases';
|
|
148
149
|
import type { string_knowledge_source_content } from '../types/typeAliases';
|
|
149
150
|
import type { string_knowledge_source_link } from '../types/typeAliases';
|
|
150
151
|
import type { string_html } from '../types/typeAliases';
|
|
@@ -402,6 +403,7 @@ export type { string_reserved_parameter_name };
|
|
|
402
403
|
export type { ReservedParameters };
|
|
403
404
|
export type { string_title };
|
|
404
405
|
export type { string_persona_description };
|
|
406
|
+
export type { string_model_description };
|
|
405
407
|
export type { string_knowledge_source_content };
|
|
406
408
|
export type { string_knowledge_source_link };
|
|
407
409
|
export type { string_html };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ModelVariant } from '../types/ModelVariant';
|
|
2
|
+
import type { string_model_description } from '../types/typeAliases';
|
|
2
3
|
import type { string_model_name } from '../types/typeAliases';
|
|
3
4
|
import type { string_title } from '../types/typeAliases';
|
|
4
5
|
/**
|
|
@@ -6,19 +7,32 @@ import type { string_title } from '../types/typeAliases';
|
|
|
6
7
|
*/
|
|
7
8
|
export type AvailableModel = {
|
|
8
9
|
/**
|
|
9
|
-
* The model title
|
|
10
|
+
* The model title, when not provided, the `modelName` should be used
|
|
11
|
+
*
|
|
12
|
+
* @example "GPT o1"
|
|
10
13
|
*/
|
|
11
14
|
readonly modelTitle?: string_title;
|
|
12
15
|
/**
|
|
13
16
|
* The model name aviailable
|
|
17
|
+
*
|
|
18
|
+
* @example "o1"
|
|
14
19
|
*/
|
|
15
20
|
readonly modelName: string_model_name;
|
|
16
21
|
/**
|
|
17
22
|
* Variant of the model
|
|
23
|
+
*
|
|
24
|
+
* @example "CHAT"
|
|
18
25
|
*/
|
|
19
26
|
readonly modelVariant: ModelVariant;
|
|
27
|
+
/**
|
|
28
|
+
* Unstructured description of the model
|
|
29
|
+
*
|
|
30
|
+
* This will be used to pick the best available model for each task
|
|
31
|
+
*
|
|
32
|
+
* @example "Model with 1 billion parameters and advanced reasoning capabilities"
|
|
33
|
+
*/
|
|
34
|
+
readonly modelDescription?: string_model_description;
|
|
20
35
|
};
|
|
21
36
|
/**
|
|
22
|
-
* TODO: !!!!!! Maybe remove `modelTitle`
|
|
23
37
|
* TODO: !!!!!! Put pricing information here
|
|
24
38
|
*/
|
package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts
CHANGED
|
@@ -21,5 +21,5 @@ export declare function $provideLlmToolsConfigurationFromEnv(): LlmToolsConfigur
|
|
|
21
21
|
* Note: [ðĒ] Code in this file should never be never released in packages that could be imported into browser environment
|
|
22
22
|
* TODO: [ð·ââïļ] @@@ Manual about construction of llmTools
|
|
23
23
|
* TODO: This should be maybe not under `_common` but under `utils`
|
|
24
|
-
* TODO: [ð§ ] Maybe pass env as argument
|
|
24
|
+
* TODO: [ð§ ][â] Maybe pass env as argument
|
|
25
25
|
* TODO: [ÂŪ] DRY Register logic */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { string_SCREAMING_CASE } from '../../../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
2
1
|
import type { string_name } from '../../../types/typeAliases';
|
|
3
2
|
import type { string_title } from '../../../types/typeAliases';
|
|
4
3
|
import type { Registered } from '../../../utils/$Register';
|
|
4
|
+
import type { string_SCREAMING_CASE } from '../../../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
5
5
|
import type { LlmToolsConfiguration } from './LlmToolsConfiguration';
|
|
6
6
|
/**
|
|
7
7
|
* @@@
|
|
@@ -14,9 +14,12 @@ export type LlmToolsMetadata = Registered & {
|
|
|
14
14
|
*/
|
|
15
15
|
readonly title: string_title;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* List of environment variables that can be used to configure the provider
|
|
18
|
+
*
|
|
19
|
+
* If `[]`, empty array, it means that the provider is available automatically without any configuration
|
|
20
|
+
* If `null`, it means that the provider can not be configured via environment variables
|
|
18
21
|
*/
|
|
19
|
-
readonly envVariables: ReadonlyArray<string_name & string_SCREAMING_CASE
|
|
22
|
+
readonly envVariables: ReadonlyArray<string_name & string_SCREAMING_CASE> | null;
|
|
20
23
|
/**
|
|
21
24
|
* @@@
|
|
22
25
|
*/
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { createGoogleGenerativeAI } from '@ai-sdk/google';
|
|
2
|
-
import type {
|
|
2
|
+
import type { VercelExecutionToolsOptions } from '../vercel/VercelExecutionToolsOptions';
|
|
3
3
|
/**
|
|
4
4
|
* Options for `GoogleExecutionTools`
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* This combines options for Promptbook, Google and Vercel together
|
|
7
7
|
* @public exported from `@promptbook/google`
|
|
8
8
|
*/
|
|
9
|
-
export type GoogleExecutionToolsOptions =
|
|
10
|
-
/**
|
|
11
|
-
* TODO: [ð§ ][ðĪš] Pass `userId`
|
|
12
|
-
*/
|
|
9
|
+
export type GoogleExecutionToolsOptions = Omit<VercelExecutionToolsOptions, 'title' | 'description' | 'vercelProvider' | 'availableModels'> & Parameters<typeof createGoogleGenerativeAI>[0];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { AvailableModel } from '../../execution/AvailableModel';
|
|
2
2
|
import type { CommonToolsOptions } from '../../execution/CommonToolsOptions';
|
|
3
|
+
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
3
4
|
import type { VercelProvider } from './VercelProvider';
|
|
4
5
|
/**
|
|
5
6
|
* Options for `createExecutionToolsFromVercelProvider`
|
|
6
7
|
*
|
|
7
8
|
* @public exported from `@promptbook/google`
|
|
8
9
|
*/
|
|
9
|
-
export type VercelExecutionToolsOptions = CommonToolsOptions & {
|
|
10
|
+
export type VercelExecutionToolsOptions = CommonToolsOptions & Pick<LlmExecutionTools, 'title' | 'description'> & {
|
|
10
11
|
/**
|
|
11
12
|
* Vercel provider for the execution tools
|
|
12
13
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
2
2
|
import type { VercelExecutionToolsOptions } from './VercelExecutionToolsOptions';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Adapter which creates Promptbook execution tools from Vercel provider
|
|
5
5
|
*
|
|
6
6
|
* @public exported from `@promptbook/vercel`
|
|
7
7
|
*/
|
|
@@ -128,11 +128,17 @@ export type ReservedParameters = Record<string_reserved_parameter_name, string_p
|
|
|
128
128
|
*/
|
|
129
129
|
export type string_title = string;
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Unstructured description of the persona
|
|
132
132
|
*
|
|
133
133
|
* For example `"Skilled copywriter"`
|
|
134
134
|
*/
|
|
135
135
|
export type string_persona_description = string;
|
|
136
|
+
/**
|
|
137
|
+
* Unstructured description of the model
|
|
138
|
+
*
|
|
139
|
+
* For example `"Model with logical reasoning and creative mindset"`
|
|
140
|
+
*/
|
|
141
|
+
export type string_model_description = string;
|
|
136
142
|
/**
|
|
137
143
|
* Source of one knowledge
|
|
138
144
|
*
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { really_any } from '../organization/really_any';
|
|
2
|
+
/**
|
|
3
|
+
* Function `asSerializable` will convert values which are not serializable to serializable values
|
|
4
|
+
* It walks deeply through the object and converts all values
|
|
5
|
+
*
|
|
6
|
+
* For example:
|
|
7
|
+
* - `Date` objects will be converted to string
|
|
8
|
+
*
|
|
9
|
+
* @private Internal helper function
|
|
10
|
+
*/
|
|
11
|
+
export declare function asSerializable(value: really_any): really_any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/openai",
|
|
3
|
-
"version": "0.77.0-
|
|
3
|
+
"version": "0.77.0-6",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
5
|
"--note-0": " <- [ð]",
|
|
6
6
|
"private": false,
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"module": "./esm/index.es.js",
|
|
55
55
|
"typings": "./esm/typings/src/_packages/openai.index.d.ts",
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@promptbook/core": "0.77.0-
|
|
57
|
+
"@promptbook/core": "0.77.0-6"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.77.0-
|
|
25
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.77.0-5';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
* Note: [ð] Ignore a discrepancy between file name and entity name
|