@promptbook/cli 0.77.0-3 → 0.77.0-4
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 +408 -347
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/cli/cli-commands/list-models.d.ts +11 -0
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -0
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -0
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +5 -0
- package/esm/typings/src/llm-providers/azure-openai/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInJest.d.ts +8 -0
- package/package.json +1 -1
- package/umd/index.umd.js +408 -347
- package/umd/index.umd.js.map +1 -1
|
@@ -10,6 +10,7 @@ import { forEachAsync } from '../execution/utils/forEachAsync';
|
|
|
10
10
|
import { isValidJsonString } from '../formats/json/utils/isValidJsonString';
|
|
11
11
|
import { $getCurrentDate } from '../utils/$getCurrentDate';
|
|
12
12
|
import { $isRunningInBrowser } from '../utils/environment/$isRunningInBrowser';
|
|
13
|
+
import { $isRunningInJest } from '../utils/environment/$isRunningInJest';
|
|
13
14
|
import { $isRunningInNode } from '../utils/environment/$isRunningInNode';
|
|
14
15
|
import { $isRunningInWebWorker } from '../utils/environment/$isRunningInWebWorker';
|
|
15
16
|
import { CHARACTERS_PER_STANDARD_LINE } from '../utils/expectation-counters/constants';
|
|
@@ -84,6 +85,7 @@ export { forEachAsync };
|
|
|
84
85
|
export { isValidJsonString };
|
|
85
86
|
export { $getCurrentDate };
|
|
86
87
|
export { $isRunningInBrowser };
|
|
88
|
+
export { $isRunningInJest };
|
|
87
89
|
export { $isRunningInNode };
|
|
88
90
|
export { $isRunningInWebWorker };
|
|
89
91
|
export { CHARACTERS_PER_STANDARD_LINE };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Command as Program } from 'commander';
|
|
2
|
+
/**
|
|
3
|
+
* Initializes `list-models` command for Promptbook CLI utilities
|
|
4
|
+
*
|
|
5
|
+
* @private internal function of `promptbookCli`
|
|
6
|
+
*/
|
|
7
|
+
export declare function initializeListModelsCommand(program: Program): void;
|
|
8
|
+
/**
|
|
9
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
10
|
+
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
|
|
11
|
+
*/
|
package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { LlmToolsConfiguration } from './LlmToolsConfiguration';
|
|
|
7
7
|
* It looks for environment variables:
|
|
8
8
|
* - `process.env.OPENAI_API_KEY`
|
|
9
9
|
* - `process.env.ANTHROPIC_CLAUDE_API_KEY`
|
|
10
|
+
* - ...
|
|
10
11
|
*
|
|
11
12
|
* @returns @@@
|
|
12
13
|
* @public exported from `@promptbook/node`
|
|
@@ -10,6 +10,7 @@ import type { CreateLlmToolsFromConfigurationOptions } from './createLlmToolsFro
|
|
|
10
10
|
* It looks for environment variables:
|
|
11
11
|
* - `process.env.OPENAI_API_KEY`
|
|
12
12
|
* - `process.env.ANTHROPIC_CLAUDE_API_KEY`
|
|
13
|
+
* - ...
|
|
13
14
|
*
|
|
14
15
|
* @returns @@@
|
|
15
16
|
* @public exported from `@promptbook/node`
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { string_SCREAMING_CASE } from '../../../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
1
2
|
import type { string_name } from '../../../types/typeAliases';
|
|
2
3
|
import type { string_title } from '../../../types/typeAliases';
|
|
3
4
|
import type { Registered } from '../../../utils/$Register';
|
|
@@ -12,6 +13,10 @@ export type LlmToolsMetadata = Registered & {
|
|
|
12
13
|
* @@@
|
|
13
14
|
*/
|
|
14
15
|
readonly title: string_title;
|
|
16
|
+
/**
|
|
17
|
+
* @@@
|
|
18
|
+
*/
|
|
19
|
+
readonly envVariables: ReadonlyArray<string_name & string_SCREAMING_CASE>;
|
|
15
20
|
/**
|
|
16
21
|
* @@@
|
|
17
22
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects if the code is running in jest environment
|
|
3
|
+
*
|
|
4
|
+
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
7
|
+
*/
|
|
8
|
+
export declare const $isRunningInJest: Function;
|