@promptbook/fake-llm 0.105.0-11 → 0.105.0-14
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/execution/AvailableModel.d.ts +5 -4
- package/esm/typings/src/llm-providers/google/createGoogleExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +2 -2
- package/esm/typings/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +7 -0
- package/esm/typings/src/speech-recognition/OpenAiSpeechRecognition.d.ts +3 -0
- package/esm/typings/src/types/Prompt.d.ts +4 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
package/esm/index.es.js
CHANGED
|
@@ -20,7 +20,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
20
20
|
* @generated
|
|
21
21
|
* @see https://github.com/webgptorg/promptbook
|
|
22
22
|
*/
|
|
23
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-
|
|
23
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-14';
|
|
24
24
|
/**
|
|
25
25
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
26
26
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { ModelVariant } from '../types/ModelVariant';
|
|
2
|
-
import type { number_usd } from '../types/typeAliases';
|
|
3
|
-
import type { string_model_description } from '../types/typeAliases';
|
|
4
|
-
import type { string_model_name } from '../types/typeAliases';
|
|
5
|
-
import type { string_title } from '../types/typeAliases';
|
|
2
|
+
import type { number_usd, string_model_description, string_model_name, string_title, string_url } from '../types/typeAliases';
|
|
6
3
|
/**
|
|
7
4
|
* Represents a model that can be used for prompt execution
|
|
8
5
|
*/
|
|
@@ -40,6 +37,10 @@ export type AvailableModel = {
|
|
|
40
37
|
readonly prompt: number_usd;
|
|
41
38
|
readonly output: number_usd;
|
|
42
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* URL to the model (or provider) documentation
|
|
42
|
+
*/
|
|
43
|
+
readonly documentationUrl?: string_url;
|
|
43
44
|
/**
|
|
44
45
|
* If the model is deprecated, it should not be used for new tasks
|
|
45
46
|
*/
|
|
@@ -10,5 +10,6 @@ export declare const createGoogleExecutionTools: ((options: GoogleExecutionTools
|
|
|
10
10
|
className: string;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
+
* TODO: !!!!! Rename to `createGoogleLlmExecutionTools`, `...GoogleLlmExecutionTools`
|
|
13
14
|
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
14
15
|
*/
|
|
@@ -33,11 +33,11 @@ export declare class OpenAiAssistantExecutionTools extends OpenAiExecutionTools
|
|
|
33
33
|
/**
|
|
34
34
|
* Calls OpenAI API to use a chat model.
|
|
35
35
|
*/
|
|
36
|
-
callChatModel(prompt:
|
|
36
|
+
callChatModel(prompt: Prompt): Promise<ChatPromptResult>;
|
|
37
37
|
/**
|
|
38
38
|
* Calls OpenAI API to use a chat model with streaming.
|
|
39
39
|
*/
|
|
40
|
-
callChatModelStream(prompt:
|
|
40
|
+
callChatModelStream(prompt: Prompt, onProgress: (chunk: ChatPromptResult) => void): Promise<ChatPromptResult>;
|
|
41
41
|
/**
|
|
42
42
|
* Get an existing assistant tool wrapper
|
|
43
43
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import OpenAI from 'openai';
|
|
2
|
+
/**
|
|
3
|
+
* Uploads files to OpenAI and returns their IDs
|
|
4
|
+
*
|
|
5
|
+
* @private utility for `OpenAiAssistantExecutionTools` and `OpenAiCompatibleExecutionTools`
|
|
6
|
+
*/
|
|
7
|
+
export declare function uploadFilesToOpenAi(client: OpenAI, files: Array<File>): Promise<Array<string>>;
|
|
@@ -19,6 +19,9 @@ export type OpenAiSpeechRecognitionOptions = {
|
|
|
19
19
|
export declare class OpenAiSpeechRecognition implements SpeechRecognition {
|
|
20
20
|
private readonly options;
|
|
21
21
|
private mediaRecorder;
|
|
22
|
+
private audioContext;
|
|
23
|
+
private analyser;
|
|
24
|
+
private silenceTimeout;
|
|
22
25
|
private audioChunks;
|
|
23
26
|
private callbacks;
|
|
24
27
|
private _state;
|
|
@@ -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.105.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.105.0-13`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/fake-llm",
|
|
3
|
-
"version": "0.105.0-
|
|
3
|
+
"version": "0.105.0-14",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"module": "./esm/index.es.js",
|
|
97
97
|
"typings": "./esm/typings/src/_packages/fake-llm.index.d.ts",
|
|
98
98
|
"peerDependencies": {
|
|
99
|
-
"@promptbook/core": "0.105.0-
|
|
99
|
+
"@promptbook/core": "0.105.0-14"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"crypto": "1.0.1",
|
package/umd/index.umd.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* @generated
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-
|
|
25
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-14';
|
|
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
|