@promptbook/node 0.92.0-27 → 0.92.0-29

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.
Files changed (38) hide show
  1. package/esm/index.es.js +35 -23
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/core.index.d.ts +4 -4
  4. package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +0 -2
  5. package/esm/typings/src/constants.d.ts +35 -0
  6. package/esm/typings/src/executables/$provideExecutablesForNode.d.ts +1 -1
  7. package/esm/typings/src/executables/apps/locateLibreoffice.d.ts +2 -1
  8. package/esm/typings/src/executables/apps/locatePandoc.d.ts +2 -1
  9. package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +2 -1
  10. package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +2 -1
  11. package/esm/typings/src/executables/platforms/locateAppOnWindows.d.ts +2 -1
  12. package/esm/typings/src/execution/AbstractTaskResult.d.ts +1 -1
  13. package/esm/typings/src/execution/LlmExecutionToolsConstructor.d.ts +2 -1
  14. package/esm/typings/src/execution/PipelineExecutorResult.d.ts +1 -1
  15. package/esm/typings/src/execution/createPipelineExecutor/$OngoingTaskResult.d.ts +12 -9
  16. package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +20 -14
  17. package/esm/typings/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +7 -6
  18. package/esm/typings/src/execution/createPipelineExecutor/getContextForTask.d.ts +5 -1
  19. package/esm/typings/src/execution/createPipelineExecutor/getExamplesForTask.d.ts +1 -1
  20. package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +8 -11
  21. package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +4 -4
  22. package/esm/typings/src/formats/csv/CsvSettings.d.ts +2 -2
  23. package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +2 -2
  24. package/esm/typings/src/formfactors/completion/CompletionFormfactorDefinition.d.ts +1 -1
  25. package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +2 -1
  26. package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +2 -2
  27. package/esm/typings/src/formfactors/index.d.ts +3 -3
  28. package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +4 -37
  29. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  30. package/esm/typings/src/llm-providers/deepseek/deepseek-models.d.ts +1 -1
  31. package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
  32. package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
  33. package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +2 -2
  34. package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +2 -2
  35. package/esm/typings/src/version.d.ts +1 -1
  36. package/package.json +2 -2
  37. package/umd/index.umd.js +35 -23
  38. package/umd/index.umd.js.map +1 -1
@@ -36,6 +36,8 @@ import { SET_IS_VERBOSE } from '../config';
36
36
  import { DEFAULT_IS_AUTO_INSTALLED } from '../config';
37
37
  import { DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME } from '../config';
38
38
  import { DEFAULT_RPM } from '../config';
39
+ import { MODEL_TRUST_LEVELS } from '../constants';
40
+ import { MODEL_ORDERS } from '../constants';
39
41
  import { ORDER_OF_PIPELINE_JSON } from '../constants';
40
42
  import { RESERVED_PARAMETER_NAMES } from '../constants';
41
43
  import { compilePipeline } from '../conversion/compilePipeline';
@@ -97,8 +99,6 @@ import { filterModels } from '../llm-providers/_common/filterModels';
97
99
  import { $llmToolsMetadataRegister } from '../llm-providers/_common/register/$llmToolsMetadataRegister';
98
100
  import { $llmToolsRegister } from '../llm-providers/_common/register/$llmToolsRegister';
99
101
  import { createLlmToolsFromConfiguration } from '../llm-providers/_common/register/createLlmToolsFromConfiguration';
100
- import { MODEL_TRUST_LEVEL } from '../llm-providers/_common/register/LlmToolsMetadata';
101
- import { MODEL_ORDER } from '../llm-providers/_common/register/LlmToolsMetadata';
102
102
  import { cacheLlmTools } from '../llm-providers/_common/utils/cache/cacheLlmTools';
103
103
  import { countUsage } from '../llm-providers/_common/utils/count-total-usage/countUsage';
104
104
  import { limitTotalUsage } from '../llm-providers/_common/utils/count-total-usage/limitTotalUsage';
@@ -183,6 +183,8 @@ export { SET_IS_VERBOSE };
183
183
  export { DEFAULT_IS_AUTO_INSTALLED };
184
184
  export { DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME };
185
185
  export { DEFAULT_RPM };
186
+ export { MODEL_TRUST_LEVELS };
187
+ export { MODEL_ORDERS };
186
188
  export { ORDER_OF_PIPELINE_JSON };
187
189
  export { RESERVED_PARAMETER_NAMES };
188
190
  export { compilePipeline };
@@ -244,8 +246,6 @@ export { filterModels };
244
246
  export { $llmToolsMetadataRegister };
245
247
  export { $llmToolsRegister };
246
248
  export { createLlmToolsFromConfiguration };
247
- export { MODEL_TRUST_LEVEL };
248
- export { MODEL_ORDER };
249
249
  export { cacheLlmTools };
250
250
  export { countUsage };
251
251
  export { limitTotalUsage };
@@ -3,8 +3,6 @@ import type { ForeachCommand } from './ForeachCommand';
3
3
  /**
4
4
  * Parses the foreach command
5
5
  *
6
- * Note: @@@ This command is used as foreach for new commands - it should NOT be used in any `.book` file
7
- *
8
6
  * @see `documentationUrl` for more details
9
7
  * @public exported from `@promptbook/editable`
10
8
  */
@@ -1,5 +1,40 @@
1
1
  import type { PipelineJson } from './pipeline/PipelineJson/PipelineJson';
2
2
  import type { ExportJsonOptions } from './utils/serialization/exportJson';
3
+ /**
4
+ * How is the model provider trusted?
5
+ *
6
+ * @public exported from `@promptbook/core`
7
+ */
8
+ export declare const MODEL_TRUST_LEVELS: {
9
+ readonly FULL: "Model is running on the local machine, training data and model weights are known, data are ethically sourced";
10
+ readonly OPEN: "Model is open source, training data and model weights are known";
11
+ readonly PARTIALLY_OPEN: "Model is open source, but training data and model weights are not (fully) known";
12
+ readonly CLOSED_LOCAL: "Model can be run locally, but it is not open source";
13
+ readonly CLOSED_FREE: "Model is behind API gateway but free to use";
14
+ readonly CLOSED_BUSINESS: "Model is behind API gateway and paid but has good SLA, TOS, privacy policy and in general is a good to use in business applications";
15
+ readonly CLOSED: "Model is behind API gateway and paid";
16
+ readonly UNTRUSTED: "Model has questions about the training data and ethics, but it is not known if it is a problem or not";
17
+ readonly VURNABLE: "Model has some known serious vulnerabilities, leaks, ethical problems, etc.";
18
+ };
19
+ /**
20
+ * How is the model provider important?
21
+ *
22
+ * @public exported from `@promptbook/core`
23
+ */
24
+ export declare const MODEL_ORDERS: {
25
+ /**
26
+ * Top-tier models, e.g. OpenAI, Anthropic,...
27
+ */
28
+ readonly TOP_TIER: 333;
29
+ /**
30
+ * Mid-tier models, e.g. Llama, Mistral, etc.
31
+ */
32
+ readonly NORMAL: 100;
33
+ /**
34
+ * Low-tier models, e.g. Phi, Tiny, etc.
35
+ */
36
+ readonly LOW_TIER: 0;
37
+ };
3
38
  /**
4
39
  * Order of keys in the pipeline JSON
5
40
  *
@@ -1,7 +1,7 @@
1
1
  import type { Executables } from '../execution/Executables';
2
2
  import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions';
3
3
  /**
4
- * @@@
4
+ * Provides paths to required executables (i.e. as Pandoc and LibreOffice) for Node.js environments.
5
5
  *
6
6
  * @public exported from `@promptbook/node`
7
7
  */
@@ -1,6 +1,7 @@
1
1
  import type { string_executable_path } from '../../types/typeAliases';
2
2
  /**
3
- * @@@
3
+ * Locates the LibreOffice executable on the current system by searching platform-specific paths.
4
+ * Returns the path to the executable if found, or null otherwise.
4
5
  *
5
6
  * @private within the repository
6
7
  */
@@ -1,6 +1,7 @@
1
1
  import type { string_executable_path } from '../../types/typeAliases';
2
2
  /**
3
- * @@@
3
+ * Locates the Pandoc executable on the current system by searching platform-specific paths.
4
+ * Returns the path to the executable if found, or null otherwise.
4
5
  *
5
6
  * @private within the repository
6
7
  */
@@ -1,7 +1,8 @@
1
1
  import type { string_executable_path } from '../../types/typeAliases';
2
2
  import type { LocateAppOptions } from '../locateApp';
3
3
  /**
4
- * @@@
4
+ * Attempts to locate the specified application on a Linux system using the 'which' command.
5
+ * Returns the path to the executable if found, or null otherwise.
5
6
  *
6
7
  * @private within the repository
7
8
  */
@@ -1,7 +1,8 @@
1
1
  import type { string_executable_path } from '../../types/typeAliases';
2
2
  import type { LocateAppOptions } from '../locateApp';
3
3
  /**
4
- * @@@
4
+ * Attempts to locate the specified application on a macOS system by checking standard application paths and using mdfind.
5
+ * Returns the path to the executable if found, or null otherwise.
5
6
  *
6
7
  * @private within the repository
7
8
  */
@@ -1,7 +1,8 @@
1
1
  import type { string_executable_path } from '../../types/typeAliases';
2
2
  import type { LocateAppOptions } from '../locateApp';
3
3
  /**
4
- * @@@
4
+ * Attempts to locate the specified application on a Windows system by searching common installation directories.
5
+ * Returns the path to the executable if found, or null otherwise.
5
6
  *
6
7
  * @private within the repository
7
8
  */
@@ -1,7 +1,7 @@
1
1
  import { ReadonlyDeep } from 'type-fest';
2
2
  import type { ErrorJson } from '../errors/utils/ErrorJson';
3
3
  /**
4
- * @@@
4
+ * Represents the result of execution of a task in a pipeline
5
5
  *
6
6
  * Note: [🚉] This is fully serializable as JSON
7
7
  */
@@ -2,7 +2,8 @@ import type { Registered } from '../utils/$Register';
2
2
  import type { TODO_any } from '../utils/organization/TODO_any';
3
3
  import type { LlmExecutionTools } from './LlmExecutionTools';
4
4
  /**
5
- * @@@
5
+ * Type representing a constructor for LLM execution tools, which are used to interact with language models.
6
+ * Combines registration metadata with a factory function for creating LLM tool instances.
6
7
  */
7
8
  export type LlmExecutionToolsConstructor = Registered & ((options: TODO_any) => LlmExecutionTools);
8
9
  /**
@@ -5,7 +5,7 @@ import type { AbstractTaskResult } from './AbstractTaskResult';
5
5
  import type { ExecutionReportJson } from './execution-report/ExecutionReportJson';
6
6
  import type { Usage } from './Usage';
7
7
  /**
8
- * @@@
8
+ * The result of executing a pipeline
9
9
  *
10
10
  * Note: [🚉] This is fully serializable as JSON
11
11
  */
@@ -5,41 +5,44 @@ import type { CompletionPromptResult } from '../PromptResult';
5
5
  import type { EmbeddingPromptResult } from '../PromptResult';
6
6
  import type { PromptResult } from '../PromptResult';
7
7
  /**
8
- * @@@
8
+ * Represents the ongoing result of a pipeline task execution
9
+ *
10
+ * Used internally by the pipeline executor to track state during execution attempts
9
11
  *
10
12
  * @private internal utility of `createPipelineExecutor`
11
13
  */
12
14
  export type $OngoingTaskResult = {
13
15
  /**
14
- * @@@
16
+ * The prompt object used for the current execution attempt, if applicable.
15
17
  */
16
18
  $prompt?: Prompt;
17
19
  /**
18
- * @@@
20
+ * The result of a chat model execution, if applicable.
19
21
  */
20
22
  $chatResult?: ChatPromptResult;
21
23
  /**
22
- * @@@
24
+ * The result of a completion model execution, if applicable.
23
25
  */
24
26
  $completionResult?: CompletionPromptResult;
25
27
  /**
26
- * @@@
28
+ * The result of an embedding model execution, if applicable.
29
+ * Note: [🤖] Embedding results are less common in standard pipelines.
27
30
  */
28
31
  $embeddingResult?: EmbeddingPromptResult;
29
32
  /**
30
- * @@@
33
+ * The final result object for the task, or null if not yet available.
31
34
  */
32
35
  $result: PromptResult | null;
33
36
  /**
34
- * @@@
37
+ * The result string produced by the task, or null if not yet available.
35
38
  */
36
39
  $resultString: string | null;
37
40
  /**
38
- * @@@
41
+ * The last expectation error encountered, or null if none.
39
42
  */
40
43
  $expectError: ExpectError | null;
41
44
  /**
42
- * @@@
45
+ * List of errors encountered during script postprocessing or execution.
43
46
  */
44
47
  $scriptPipelineExecutionErrors: Array<Error>;
45
48
  };
@@ -7,55 +7,61 @@ import type { TODO_string } from '../../utils/organization/TODO_string';
7
7
  import type { ExecutionReportJson } from '../execution-report/ExecutionReportJson';
8
8
  import type { CreatePipelineExecutorOptions } from './00-CreatePipelineExecutorOptions';
9
9
  /**
10
- * @@@
10
+ * Options for executing attempts of a pipeline task, including configuration for jokers, priority,
11
+ * maximum attempts, prepared content, parameters, the task itself, the prepared pipeline, execution report,
12
+ * and pipeline identification. Used internally by the pipeline executor.
11
13
  *
12
14
  * @private internal type of `executeAttempts`
13
15
  */
14
16
  export type ExecuteAttemptsOptions = Required<Omit<CreatePipelineExecutorOptions, 'pipeline'>> & {
15
17
  /**
16
- * @@@
18
+ * Names of parameters that act as jokers, which can be used to bypass normal execution if their value meets requirements.
17
19
  */
18
20
  readonly jokerParameterNames: Readonly<ReadonlyArray<string_parameter_name>>;
19
21
  /**
20
- * @@@
22
+ * Priority of the current execution attempt, used to influence UI or execution order.
21
23
  */
22
24
  readonly priority: number;
23
25
  /**
24
- * @@@
25
- *
26
+ * Maximum number of attempts allowed for this task, including retries and joker attempts.
26
27
  * Note: [💂] There are two distinct variabiles
27
- * 1) `maxExecutionAttempts` - the amount of attempts LLM model
28
- * 2) `maxAttempts` - the amount of attempts for any task - LLM, SCRIPT, DIALOG, etc.
28
+ * 1) `maxExecutionAttempts` - attempts for LLM model
29
+ * 2) `maxAttempts` - attempts for any task (LLM, SCRIPT, DIALOG, etc.)
29
30
  */
30
31
  readonly maxAttempts: number;
31
32
  /**
32
- * @@@
33
+ * The content prepared for execution, with parameters already substituted.
33
34
  */
34
35
  readonly preparedContent: TODO_string;
35
36
  /**
36
- * @@@
37
+ * The parameters provided for this execution attempt.
37
38
  */
38
39
  readonly parameters: Readonly<Parameters>;
39
40
  /**
40
- * @@@
41
+ * The task being executed, as a deeply immutable TaskJson object.
42
+ * Note: Naming should be unified between `task` and `currentTask`.
41
43
  */
42
44
  readonly task: ReadonlyDeep<TaskJson>;
43
45
  /**
44
- * @@@
46
+ * The pipeline structure prepared for execution, as a deeply immutable PipelineJson object.
45
47
  */
46
48
  readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
47
49
  /**
48
- * @@@
50
+ * The execution report object, which is updated during execution.
49
51
  */
50
52
  readonly $executionReport: WritableDeep<ExecutionReportJson>;
51
53
  /**
52
- * @@@
54
+ * String identifier for the pipeline, used for logging and error reporting.
53
55
  */
54
56
  readonly pipelineIdentification: string;
55
57
  };
56
58
  /**
57
- * @@@
59
+ * Executes a pipeline task with multiple attempts, including joker and retry logic. Handles different task types
60
+ * (prompt, script, dialog, etc.), applies postprocessing, checks expectations, and updates the execution report.
61
+ * Throws errors if execution fails after all attempts.
58
62
  *
63
+ * @param options - The options for execution, including task, parameters, pipeline, and configuration.
64
+ * @returns The result string of the executed task.
59
65
  * @private internal utility of `createPipelineExecutor`
60
66
  */
61
67
  export declare function executeAttempts(options: ExecuteAttemptsOptions): Promise<TODO_string>;
@@ -3,30 +3,31 @@ import { PipelineExecutionError } from '../../errors/PipelineExecutionError';
3
3
  import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
4
4
  import type { Parameters } from '../../types/typeAliases';
5
5
  /**
6
- * @@@
6
+ * Options for filtering and extracting only output parameters from a pipeline execution.
7
7
  *
8
8
  * @private internal type of `createPipelineExecutor`
9
9
  */
10
10
  type FilterJustOutputParametersOptions = {
11
11
  /**
12
- * @@@
12
+ * The fully prepared pipeline containing parameter definitions.
13
13
  */
14
14
  readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
15
15
  /**
16
- * @@@
16
+ * The parameters passed to the pipeline, including both input and output values.
17
17
  */
18
18
  readonly parametersToPass: Readonly<Parameters>;
19
19
  /**
20
- * @@@
20
+ * Array to collect warnings encountered during parameter extraction.
21
21
  */
22
22
  readonly $warnings: PipelineExecutionError[];
23
23
  /**
24
- * @@@
24
+ * String identifier for the pipeline, used in warning messages.
25
25
  */
26
26
  readonly pipelineIdentification: string;
27
27
  };
28
28
  /**
29
- * @@@
29
+ * Filters and returns only the output parameters from the provided pipeline execution options.
30
+ * Adds warnings for any expected output parameters that are missing.
30
31
  *
31
32
  * @private internal utility of `createPipelineExecutor`
32
33
  */
@@ -3,8 +3,12 @@ import type { TaskJson } from '../../pipeline/PipelineJson/TaskJson';
3
3
  import type { string_markdown } from '../../types/typeAliases';
4
4
  import type { string_parameter_value } from '../../types/typeAliases';
5
5
  /**
6
- * @@@
6
+ * Returns the context for a given task, typically used to provide additional information or variables
7
+ * required for the execution of the task within a pipeline. The context is returned as a string value
8
+ * that may include markdown formatting.
7
9
  *
10
+ * @param task - The task for which the context is being generated. This should be a deeply immutable TaskJson object.
11
+ * @returns The context as a string, formatted as markdown and parameter value.
8
12
  * @private internal utility of `createPipelineExecutor`
9
13
  */
10
14
  export declare function getContextForTask(task: ReadonlyDeep<TaskJson>): Promise<string_parameter_value & string_markdown>;
@@ -3,7 +3,7 @@ import type { TaskJson } from '../../pipeline/PipelineJson/TaskJson';
3
3
  import type { string_markdown } from '../../types/typeAliases';
4
4
  import type { string_parameter_value } from '../../types/typeAliases';
5
5
  /**
6
- * @@@
6
+ * Retrieves example values or templates for a given task, used to guide or validate pipeline execution.
7
7
  *
8
8
  * @private internal utility of `createPipelineExecutor`
9
9
  */
@@ -6,34 +6,31 @@ import type { string_markdown } from '../../types/typeAliases';
6
6
  import type { string_parameter_value } from '../../types/typeAliases';
7
7
  import type { ExecutionTools } from '../ExecutionTools';
8
8
  /**
9
- * @@@
9
+ * Options for retrieving relevant knowledge for a specific task during pipeline execution.
10
10
  *
11
- * @private internal type of `getKnowledgeFoTask`
11
+ * @private internal type of `getKnowledgeForTask`
12
12
  */
13
13
  type GetKnowledgeForTaskOptions = {
14
14
  /**
15
- * The execution tools to be used during the execution of the pipeline
15
+ * The execution tools to be used during the execution of the pipeline.
16
16
  */
17
17
  readonly tools: ExecutionTools;
18
18
  /**
19
- * @@@
19
+ * The fully prepared pipeline containing all tasks and knowledge pieces.
20
20
  */
21
21
  readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
22
22
  /**
23
- * @@@
23
+ * The current task for which knowledge is being retrieved.
24
24
  */
25
25
  readonly task: ReadonlyDeep<TaskJson>;
26
26
  /**
27
- * @@@
28
- *
29
- * Parameters to complete the content of the task for embedding
27
+ * Parameters used to complete the content of the task for embedding and knowledge retrieval.
30
28
  */
31
29
  readonly parameters: Readonly<Parameters>;
32
30
  };
33
31
  /**
34
- * @@@
35
- *
36
- * Here is the place where RAG (retrieval-augmented generation) happens
32
+ * Retrieves the most relevant knowledge pieces for a given task using embedding-based similarity search.
33
+ * This is where retrieval-augmented generation (RAG) is performed to enhance the task with external knowledge.
37
34
  *
38
35
  * @private internal utility of `createPipelineExecutor`
39
36
  */
@@ -1,18 +1,18 @@
1
1
  import type { AutomaticTranslator } from './AutomaticTranslator';
2
2
  import type { TranslatorOptions } from './TranslatorOptions';
3
3
  /**
4
- * @@@
4
+ * Options for configuring the Lindat automatic translator, including API URL and language settings.
5
5
  */
6
6
  type LindatAutomaticTranslatorOptions = TranslatorOptions & {
7
7
  /**
8
- * @@@
8
+ * Optional URL of the Lindat translation API endpoint.
9
9
  */
10
10
  readonly apiUrl?: URL;
11
11
  };
12
12
  /**
13
- * @@@
13
+ * Automatic translator implementation using the Lindat translation API.
14
14
  *
15
- * @private still in development [🏳]
15
+ * @private still in development [🏳️]
16
16
  */
17
17
  export declare class LindatAutomaticTranslator implements AutomaticTranslator {
18
18
  protected readonly options: LindatAutomaticTranslatorOptions;
@@ -1,10 +1,10 @@
1
1
  import type { ParseConfig, UnparseConfig } from 'papaparse';
2
2
  /**
3
- * @@@
3
+ * Settings and configuration options for CSV format handling within the application.
4
4
  */
5
5
  export type CsvSettings = Pick<ParseConfig & UnparseConfig, 'delimiter' | 'quoteChar' | 'newline' | 'skipEmptyLines'>;
6
6
  /**
7
- * @@@
7
+ * Contains configuration options for parsing and generating CSV files, such as delimiters and quoting rules.
8
8
  *
9
9
  * @public exported from `@promptbook/core`
10
10
  */
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @@@
2
+ * Chatbot form factor definition for conversational interfaces that interact with users in a chat-like manner.
3
3
  *
4
4
  * @public exported from `@promptbook/core`
5
5
  */
6
6
  export declare const ChatbotFormfactorDefinition: {
7
7
  readonly name: "CHATBOT";
8
8
  readonly aliasNames: readonly ["CHAT"];
9
- readonly description: "@@@";
9
+ readonly description: "A chatbot form factor for conversational user interfaces.";
10
10
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/174";
11
11
  readonly pipelineInterface: {
12
12
  readonly inputParameters: readonly [{
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export declare const CompletionFormfactorDefinition: {
7
7
  readonly name: "COMPLETION";
8
- readonly description: "@@@";
8
+ readonly description: "Completion is formfactor that emulates completion models";
9
9
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
10
10
  readonly pipelineInterface: {
11
11
  readonly inputParameters: readonly [{
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Generator is form of app that @@@
2
+ * Generator form factor represents an application that generates content or data based on user input or predefined rules.
3
+ * This form factor is used for apps that produce outputs, such as text, images, or other media, based on provided input.
3
4
  *
4
5
  * @public exported from `@promptbook/core`
5
6
  */
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @@@
2
+ * A generic pipeline
3
3
  *
4
4
  * @public exported from `@promptbook/core`
5
5
  */
6
6
  export declare const GenericFormfactorDefinition: {
7
7
  readonly name: "GENERIC";
8
- readonly description: "@@@";
8
+ readonly description: "A generic pipeline";
9
9
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/173";
10
10
  readonly pipelineInterface: {
11
11
  readonly inputParameters: readonly [];
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export declare const FORMFACTOR_DEFINITIONS: readonly [{
7
7
  readonly name: "GENERIC";
8
- readonly description: "@@@";
8
+ readonly description: "A generic pipeline";
9
9
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/173";
10
10
  readonly pipelineInterface: {
11
11
  readonly inputParameters: readonly [];
@@ -14,7 +14,7 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
14
14
  }, {
15
15
  readonly name: "CHATBOT";
16
16
  readonly aliasNames: readonly ["CHAT"];
17
- readonly description: "@@@";
17
+ readonly description: "A chatbot form factor for conversational user interfaces.";
18
18
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/174";
19
19
  readonly pipelineInterface: {
20
20
  readonly inputParameters: readonly [{
@@ -143,7 +143,7 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
143
143
  };
144
144
  }, {
145
145
  readonly name: "COMPLETION";
146
- readonly description: "@@@";
146
+ readonly description: "Completion is formfactor that emulates completion models";
147
147
  readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
148
148
  readonly pipelineInterface: {
149
149
  readonly inputParameters: readonly [{
@@ -1,43 +1,10 @@
1
+ import { MODEL_ORDERS } from '../../../constants';
2
+ import { MODEL_TRUST_LEVELS } from '../../../constants';
1
3
  import type { string_name } from '../../../types/typeAliases';
2
4
  import type { string_title } from '../../../types/typeAliases';
3
5
  import type { Registered } from '../../../utils/$Register';
4
6
  import type { string_SCREAMING_CASE } from '../../../utils/normalization/normalizeTo_SCREAMING_CASE';
5
7
  import type { LlmToolsConfiguration } from './LlmToolsConfiguration';
6
- /**
7
- * How is the model provider trusted?
8
- *
9
- * @public exported from `@promptbook/core`
10
- */
11
- export declare const MODEL_TRUST_LEVEL: {
12
- readonly FULL: "Model is running on the local machine, training data and model weights are known, data are ethically sourced";
13
- readonly OPEN: "Model is open source, training data and model weights are known";
14
- readonly PARTIALLY_OPEN: "Model is open source, but training data and model weights are not (fully) known";
15
- readonly CLOSED_LOCAL: "Model can be run locally, but it is not open source";
16
- readonly CLOSED_FREE: "Model is behind API gateway but free to use";
17
- readonly CLOSED_BUSINESS: "Model is behind API gateway and paid but has good SLA, TOS, privacy policy and in general is a good to use in business applications";
18
- readonly CLOSED: "Model is behind API gateway and paid";
19
- readonly UNTRUSTED: "Model has questions about the training data and ethics, but it is not known if it is a problem or not";
20
- readonly VURNABLE: "Model has some known serious vulnerabilities, leaks, ethical problems, etc.";
21
- };
22
- /**
23
- * How is the model provider important?
24
- *
25
- * @public exported from `@promptbook/core`
26
- */
27
- export declare const MODEL_ORDER: {
28
- /**
29
- * Top-tier models, e.g. OpenAI, Anthropic,...
30
- */
31
- readonly TOP_TIER: 333;
32
- /**
33
- * Mid-tier models, e.g. Llama, Mistral, etc.
34
- */
35
- readonly NORMAL: 100;
36
- /**
37
- * Low-tier models, e.g. Phi, Tiny, etc.
38
- */
39
- readonly LOW_TIER: 0;
40
- };
41
8
  /**
42
9
  * Metadata definition for LLM execution tools that provides information about a provider's capabilities,
43
10
  * configuration options, and relationships within the registry system.
@@ -57,11 +24,11 @@ export type LlmToolsMetadata = Registered & {
57
24
  /**
58
25
  * How is the model is trusted?
59
26
  */
60
- readonly trustLevel: keyof typeof MODEL_TRUST_LEVEL;
27
+ readonly trustLevel: keyof typeof MODEL_TRUST_LEVELS;
61
28
  /**
62
29
  * How is the model provider important and should be sorted in the list of available providers?
63
30
  */
64
- readonly order: typeof MODEL_ORDER[keyof typeof MODEL_ORDER] | number;
31
+ readonly order: typeof MODEL_ORDERS[keyof typeof MODEL_ORDERS] | number;
65
32
  /**
66
33
  * List of environment variables that can be used to configure the provider
67
34
  *
@@ -3,7 +3,7 @@ import type { number_usd } from '../../types/typeAliases';
3
3
  /**
4
4
  * List of available Anthropic Claude models with pricing
5
5
  *
6
- * Note: Done at 2024-08-16
6
+ * Note: Done at 2025-05-06
7
7
  *
8
8
  * @see https://docs.anthropic.com/en/docs/models-overview
9
9
  * @public exported from `@promptbook/anthropic-claude`
@@ -3,7 +3,7 @@ import type { number_usd } from '../../types/typeAliases';
3
3
  /**
4
4
  * List of available Deepseek models with descriptions
5
5
  *
6
- * Note: Done at 2025-04-22
6
+ * Note: Done at 2025-05-06
7
7
  *
8
8
  * @see https://www.deepseek.com/models
9
9
  * @public exported from `@promptbook/deepseek`
@@ -3,7 +3,7 @@ import type { number_usd } from '../../types/typeAliases';
3
3
  /**
4
4
  * List of available Google models with descriptions
5
5
  *
6
- * Note: Done at 2025-04-22
6
+ * Note: Done at 2025-05-06
7
7
  *
8
8
  * @see https://ai.google.dev/models/gemini
9
9
  * @public exported from `@promptbook/google`
@@ -3,7 +3,7 @@ import type { number_usd } from '../../types/typeAliases';
3
3
  /**
4
4
  * List of available OpenAI models with pricing
5
5
  *
6
- * Note: Done at 2024-05-20
6
+ * Note: Done at 2025-05-06
7
7
  *
8
8
  * @see https://platform.openai.com/docs/models/
9
9
  * @see https://openai.com/api/pricing/