@promptbook/node 0.92.0-3 → 0.92.0-31
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 +796 -426
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/browser.index.d.ts +2 -0
- package/esm/typings/src/_packages/core.index.d.ts +22 -6
- package/esm/typings/src/_packages/deepseek.index.d.ts +2 -0
- package/esm/typings/src/_packages/google.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +4 -2
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/cli/common/$provideLlmToolsForCli.d.ts +1 -1
- package/esm/typings/src/collection/PipelineCollection.d.ts +0 -2
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +1 -1
- package/esm/typings/src/commands/FOREACH/ForeachJson.d.ts +6 -6
- package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +0 -2
- package/esm/typings/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -1
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -1
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -28
- package/esm/typings/src/config.d.ts +41 -11
- package/esm/typings/src/constants.d.ts +43 -2
- package/esm/typings/src/conversion/archive/loadArchive.d.ts +2 -2
- package/esm/typings/src/errors/0-BoilerplateError.d.ts +2 -2
- package/esm/typings/src/executables/$provideExecutablesForNode.d.ts +1 -1
- package/esm/typings/src/executables/apps/locateLibreoffice.d.ts +2 -1
- package/esm/typings/src/executables/apps/locatePandoc.d.ts +2 -1
- package/esm/typings/src/executables/locateApp.d.ts +2 -2
- package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +2 -1
- package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +2 -1
- package/esm/typings/src/executables/platforms/locateAppOnWindows.d.ts +2 -1
- package/esm/typings/src/execution/AbstractTaskResult.d.ts +1 -1
- package/esm/typings/src/execution/CommonToolsOptions.d.ts +5 -1
- package/esm/typings/src/execution/LlmExecutionToolsConstructor.d.ts +2 -1
- package/esm/typings/src/execution/PipelineExecutorResult.d.ts +4 -2
- package/esm/typings/src/execution/createPipelineExecutor/$OngoingTaskResult.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +13 -10
- package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +15 -3
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +20 -14
- package/esm/typings/src/execution/createPipelineExecutor/computeCosineSimilarity.d.ts +13 -0
- package/esm/typings/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +7 -6
- package/esm/typings/src/execution/createPipelineExecutor/getContextForTask.d.ts +5 -1
- package/esm/typings/src/execution/createPipelineExecutor/getExamplesForTask.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +21 -5
- package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +19 -5
- package/esm/typings/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +9 -0
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +4 -4
- package/esm/typings/src/execution/utils/checkExpectations.d.ts +1 -1
- package/esm/typings/src/execution/utils/uncertainNumber.d.ts +3 -2
- package/esm/typings/src/formats/_common/{FormatDefinition.d.ts → FormatParser.d.ts} +8 -6
- package/esm/typings/src/formats/_common/FormatSubvalueParser.d.ts +66 -0
- package/esm/typings/src/formats/csv/CsvFormatParser.d.ts +17 -0
- package/esm/typings/src/formats/csv/CsvSettings.d.ts +2 -2
- package/esm/typings/src/formats/csv/utils/csvParse.d.ts +12 -0
- package/esm/typings/src/formats/csv/utils/isValidCsvString.d.ts +1 -1
- package/esm/typings/src/formats/index.d.ts +2 -2
- package/esm/typings/src/formats/json/{JsonFormatDefinition.d.ts → JsonFormatParser.d.ts} +6 -6
- package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +1 -1
- package/esm/typings/src/formats/json/utils/jsonParse.d.ts +8 -0
- package/esm/typings/src/formats/text/{TextFormatDefinition.d.ts → TextFormatParser.d.ts} +7 -7
- package/esm/typings/src/formats/xml/XmlFormatParser.d.ts +19 -0
- package/esm/typings/src/formats/xml/utils/isValidXmlString.d.ts +1 -1
- package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +16 -7
- package/esm/typings/src/formfactors/_common/FormfactorDefinition.d.ts +3 -1
- package/esm/typings/src/formfactors/_common/string_formfactor_name.d.ts +2 -1
- package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/completion/CompletionFormfactorDefinition.d.ts +29 -0
- package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +2 -1
- package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/index.d.ts +33 -8
- package/esm/typings/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +4 -2
- package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/high-level-abstractions/index.d.ts +2 -2
- package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +4 -4
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +4 -3
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +17 -4
- package/esm/typings/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +11 -4
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +27 -5
- package/esm/typings/src/llm-providers/_common/register/LlmToolsOptions.d.ts +9 -2
- package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +12 -3
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +10 -5
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +5 -3
- package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +5 -5
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -0
- package/esm/typings/src/llm-providers/deepseek/deepseek-models.d.ts +23 -0
- package/esm/typings/src/llm-providers/google/google-models.d.ts +23 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +4 -0
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +2 -2
- package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +2 -2
- package/esm/typings/src/migrations/migratePipeline.d.ts +9 -0
- package/esm/typings/src/other/templates/getBookTemplates.d.ts +2 -2
- package/esm/typings/src/personas/preparePersona.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +3 -3
- package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +5 -4
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineJson/CommonTaskJson.d.ts +9 -6
- package/esm/typings/src/pipeline/PipelineJson/PersonaJson.d.ts +4 -2
- package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +3 -2
- package/esm/typings/src/pipeline/PipelineString.d.ts +3 -1
- package/esm/typings/src/pipeline/book-notation.d.ts +2 -2
- package/esm/typings/src/postprocessing/utils/extractJsonBlock.d.ts +1 -1
- package/esm/typings/src/prepare/prepareTasks.d.ts +7 -4
- package/esm/typings/src/remote-server/openapi-types.d.ts +348 -6
- package/esm/typings/src/remote-server/openapi.d.ts +398 -4
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +2 -1
- package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +3 -3
- package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/Converter.d.ts +3 -1
- package/esm/typings/src/scrapers/_common/Scraper.d.ts +4 -3
- package/esm/typings/src/scrapers/_common/ScraperIntermediateSource.d.ts +4 -2
- package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -1
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +6 -3
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +3 -5
- package/esm/typings/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +3 -3
- package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +3 -2
- package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +8 -5
- package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +2 -1
- package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +6 -5
- package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +3 -1
- package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +2 -1
- package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +4 -1
- package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +2 -1
- package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +3 -4
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +5 -1
- package/esm/typings/src/storage/file-cache-storage/FileCacheStorage.d.ts +12 -5
- package/esm/typings/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +4 -2
- package/esm/typings/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +2 -1
- package/esm/typings/src/storage/local-storage/getIndexedDbStorage.d.ts +10 -0
- package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +7 -0
- package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +2 -1
- package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +2 -1
- package/esm/typings/src/types/ModelVariant.d.ts +5 -5
- package/esm/typings/src/types/typeAliases.d.ts +17 -13
- package/esm/typings/src/utils/$Register.d.ts +8 -7
- package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +2 -2
- package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +4 -1
- package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +2 -1
- package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -1
- package/esm/typings/src/utils/expectation-counters/index.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
- package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +4 -4
- package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +4 -4
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +3 -3
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +3 -3
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +4 -4
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +3 -3
- package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +3 -3
- package/esm/typings/src/utils/normalization/searchKeywords.d.ts +4 -1
- package/esm/typings/src/utils/normalization/titleToName.d.ts +4 -4
- package/esm/typings/src/utils/organization/empty_object.d.ts +2 -2
- package/esm/typings/src/utils/organization/just_empty_object.d.ts +4 -4
- package/esm/typings/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +7 -7
- package/esm/typings/src/utils/serialization/clonePipeline.d.ts +4 -3
- package/esm/typings/src/utils/serialization/deepClone.d.ts +5 -1
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +3 -3
- package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +5 -4
- package/esm/typings/src/version.d.ts +2 -1
- package/package.json +2 -2
- package/umd/index.umd.js +799 -429
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/formats/_common/FormatSubvalueDefinition.d.ts +0 -31
- package/esm/typings/src/formats/csv/CsvFormatDefinition.d.ts +0 -17
- package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +0 -19
|
@@ -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;
|
|
@@ -24,6 +24,6 @@ export declare function checkExpectations(expectations: Expectations, value: str
|
|
|
24
24
|
export declare function isPassingExpectations(expectations: Expectations, value: string): boolean;
|
|
25
25
|
/**
|
|
26
26
|
* TODO: [💝] Unite object for expecting amount and format
|
|
27
|
-
* TODO: [🧠][🤠] This should be part of `
|
|
27
|
+
* TODO: [🧠][🤠] This should be part of `TextFormatParser`
|
|
28
28
|
* Note: [💝] and [🤠] are interconnected together
|
|
29
29
|
*/
|
|
@@ -2,8 +2,9 @@ import type { UncertainNumber } from '../UncertainNumber';
|
|
|
2
2
|
/**
|
|
3
3
|
* Make UncertainNumber
|
|
4
4
|
*
|
|
5
|
-
* @param value
|
|
5
|
+
* @param value value of the uncertain number, if `NaN` or `undefined`, it will be set to 0 and `isUncertain=true`
|
|
6
|
+
* @param isUncertain if `true`, the value is uncertain, otherwise depends on the value
|
|
6
7
|
*
|
|
7
8
|
* @private utility for initializating UncertainNumber
|
|
8
9
|
*/
|
|
9
|
-
export declare function uncertainNumber(value?: number | typeof NaN | undefined | null): UncertainNumber;
|
|
10
|
+
export declare function uncertainNumber(value?: number | typeof NaN | undefined | null, isUncertain?: boolean): UncertainNumber;
|
|
@@ -2,16 +2,18 @@ import type { string_mime_type } from '../../types/typeAliases';
|
|
|
2
2
|
import type { string_name } from '../../types/typeAliases';
|
|
3
3
|
import type { string_SCREAMING_CASE } from '../../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
4
4
|
import type { empty_object } from '../../utils/organization/empty_object';
|
|
5
|
-
import type {
|
|
5
|
+
import type { FormatSubvalueParser } from './FormatSubvalueParser';
|
|
6
6
|
/**
|
|
7
|
-
* A format definition is a set of functions that define how to validate, heal and convert response from LLM
|
|
7
|
+
* A format definition is a set of functions that define how to validate, heal and convert response from LLM.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* - "settings" are runtime options that affect parsing (e.g., delimiter for CSV).
|
|
11
|
+
* - "schema" is a structural definition or contract for the data (e.g., expected fields in JSON).
|
|
10
12
|
*
|
|
11
13
|
* @see https://github.com/webgptorg/promptbook/discussions/36
|
|
12
14
|
* @private still in development [🏢]
|
|
13
15
|
*/
|
|
14
|
-
export type
|
|
16
|
+
export type FormatParser<TValue extends TPartialValue, TPartialValue extends string, TSettings extends empty_object, TSchema extends empty_object> = {
|
|
15
17
|
/**
|
|
16
18
|
* The name of the format used in .book.md files
|
|
17
19
|
*
|
|
@@ -56,9 +58,9 @@ export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends
|
|
|
56
58
|
*/
|
|
57
59
|
heal(value: string, settings?: TSettings, scheme?: TSchema): TValue;
|
|
58
60
|
/**
|
|
59
|
-
*
|
|
61
|
+
* Parsers for extracting or mapping subvalues from the main value (e.g., rows from CSV, items from JSON array).
|
|
60
62
|
*/
|
|
61
|
-
readonly
|
|
63
|
+
readonly subvalueParsers: ReadonlyArray<FormatSubvalueParser<TValue, TSettings>>;
|
|
62
64
|
};
|
|
63
65
|
/**
|
|
64
66
|
* TODO: [♏] Add some prepare hook to modify prompt according to the format
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Promisable } from 'type-fest';
|
|
2
|
+
import type { Parameters } from '../../types/typeAliases';
|
|
3
|
+
import type { string_name } from '../../types/typeAliases';
|
|
4
|
+
import type { string_parameter_name } from '../../types/typeAliases';
|
|
5
|
+
import type { string_SCREAMING_CASE } from '../../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
6
|
+
import type { empty_object } from '../../utils/organization/empty_object';
|
|
7
|
+
/**
|
|
8
|
+
* Defines how to extract or map subvalues from a main value in a specific format (e.g., cells from CSV, items from JSON array).
|
|
9
|
+
* Used for iterating or transforming structured data in pipeline tasks.
|
|
10
|
+
*/
|
|
11
|
+
export type FormatSubvalueParser<TValue extends string, TSettings extends empty_object> = {
|
|
12
|
+
/**
|
|
13
|
+
* The name of the format used in .book.md files
|
|
14
|
+
*
|
|
15
|
+
* @example "CELL"
|
|
16
|
+
*/
|
|
17
|
+
readonly subvalueName: string_name & string_SCREAMING_CASE;
|
|
18
|
+
/**
|
|
19
|
+
* Aliases for the `subvalueName`
|
|
20
|
+
*/
|
|
21
|
+
readonly aliases?: ReadonlyArray<string_name & string_SCREAMING_CASE>;
|
|
22
|
+
/**
|
|
23
|
+
* Maps or transforms subvalues from the main value. For example, iterates over all CSV cells or JSON array items.
|
|
24
|
+
*
|
|
25
|
+
* @param options - Options for mapping, including callbacks for progress and value transformation.
|
|
26
|
+
* @returns The final mapped string result.
|
|
27
|
+
*/
|
|
28
|
+
mapValues(options: FormatSubvalueParserMapValuesOptions<TValue, TSettings>): Promise<string>;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Options for mapping or extracting subvalues from a main value using a FormatSubvalueParser.
|
|
32
|
+
*/
|
|
33
|
+
export type FormatSubvalueParserMapValuesOptions<TValue extends string, TSettings extends empty_object> = {
|
|
34
|
+
/**
|
|
35
|
+
* The input string value to parse for subvalues
|
|
36
|
+
*/
|
|
37
|
+
readonly value: TValue;
|
|
38
|
+
/**
|
|
39
|
+
* The name of the output parameter where the processed value will be stored
|
|
40
|
+
*/
|
|
41
|
+
readonly outputParameterName: string_parameter_name;
|
|
42
|
+
/**
|
|
43
|
+
* Format-specific settings that control how subvalues are parsed or processed
|
|
44
|
+
*/
|
|
45
|
+
readonly settings: TSettings;
|
|
46
|
+
/**
|
|
47
|
+
* Callback function that processes each subvalue and returns the transformed value
|
|
48
|
+
*
|
|
49
|
+
* @param subvalues Object containing the extracted subvalues
|
|
50
|
+
* @param index Current index of the subvalue which is being mapped
|
|
51
|
+
* @param length Full length of the subvalues
|
|
52
|
+
* @param number Total number of subvalues to process
|
|
53
|
+
* @returns Transformed value after processing
|
|
54
|
+
*/
|
|
55
|
+
mapCallback(subvalues: Parameters, index: number, length: number): Promisable<TValue>;
|
|
56
|
+
/**
|
|
57
|
+
* Progress callback that receives partial results during processing
|
|
58
|
+
*
|
|
59
|
+
* @param partialResultString The current partial result as processing progresses
|
|
60
|
+
* @returns Promise or void to continue execution
|
|
61
|
+
*/
|
|
62
|
+
onProgress(partialResultString: TValue): Promisable<void>;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Note: [👩🏾🤝🧑🏽]
|
|
66
|
+
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
2
|
+
import type { FormatParser } from '../_common/FormatParser';
|
|
3
|
+
import type { CsvSettings } from './CsvSettings';
|
|
4
|
+
/**
|
|
5
|
+
* Definition for CSV spreadsheet
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/core`
|
|
8
|
+
* <- TODO: [🏢] Export from package `@promptbook/csv`
|
|
9
|
+
*/
|
|
10
|
+
export declare const CsvFormatParser: FormatParser<string, string, CsvSettings, TODO_any>;
|
|
11
|
+
/**
|
|
12
|
+
* TODO: [🍓] In `CsvFormatParser` implement simple `isValid`
|
|
13
|
+
* TODO: [🍓] In `CsvFormatParser` implement partial `canBeValid`
|
|
14
|
+
* TODO: [🍓] In `CsvFormatParser` implement `heal
|
|
15
|
+
* TODO: [🍓] In `CsvFormatParser` implement `subvalueParsers`
|
|
16
|
+
* TODO: [🏢] Allow to expect something inside CSV objects and other formats
|
|
17
|
+
*/
|
|
@@ -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
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ParseResult } from 'papaparse';
|
|
2
|
+
import type { TODO_any } from '../../../utils/organization/TODO_any';
|
|
3
|
+
import type { Parameters } from '../../../types/typeAliases';
|
|
4
|
+
import type { CsvSettings } from '../CsvSettings';
|
|
5
|
+
/**
|
|
6
|
+
* Converts a CSV string into an object
|
|
7
|
+
*
|
|
8
|
+
* Note: This is wrapper around `papaparse.parse()` with better autohealing
|
|
9
|
+
*
|
|
10
|
+
* @private - for now until `@promptbook/csv` is released
|
|
11
|
+
*/
|
|
12
|
+
export declare function csvParse(value: string, settings?: CsvSettings, schema?: TODO_any): ParseResult<Parameters>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Function to check if a string is valid CSV
|
|
3
3
|
*
|
|
4
4
|
* @param value The string to check
|
|
5
|
-
* @returns
|
|
5
|
+
* @returns `true` if the string is a valid CSV string, false otherwise
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/utils`
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @private internal index of `...` <- TODO [🏢]
|
|
5
5
|
*/
|
|
6
|
-
export declare const FORMAT_DEFINITIONS: readonly [import("./_common/
|
|
6
|
+
export declare const FORMAT_DEFINITIONS: readonly [import("./_common/FormatParser").FormatParser<string, string, any, any>, import("./_common/FormatParser").FormatParser<string, string, any, any>, import("./_common/FormatParser").FormatParser<string, string, any, any>, import("./_common/FormatParser").FormatParser<string, string, import("./csv/CsvSettings").CsvSettings, any>];
|
|
7
7
|
/**
|
|
8
8
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
9
|
-
*/
|
|
9
|
+
*/
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FormatParser } from '../_common/FormatParser';
|
|
3
3
|
/**
|
|
4
4
|
* Definition for JSON format
|
|
5
5
|
*
|
|
6
6
|
* @private still in development [🏢]
|
|
7
7
|
*/
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const JsonFormatParser: FormatParser<string, string, TODO_any, TODO_any>;
|
|
9
9
|
/**
|
|
10
10
|
* TODO: [🧠] Maybe propper instance of object
|
|
11
11
|
* TODO: [0] Make string_serialized_json
|
|
12
12
|
* TODO: [1] Make type for JSON Settings and Schema
|
|
13
13
|
* TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
|
|
14
|
-
* TODO: [🍓] In `
|
|
15
|
-
* TODO: [🍓] In `
|
|
16
|
-
* TODO: [🍓] In `
|
|
17
|
-
* TODO: [🍓] In `
|
|
14
|
+
* TODO: [🍓] In `JsonFormatParser` implement simple `isValid`
|
|
15
|
+
* TODO: [🍓] In `JsonFormatParser` implement partial `canBeValid`
|
|
16
|
+
* TODO: [🍓] In `JsonFormatParser` implement `heal
|
|
17
|
+
* TODO: [🍓] In `JsonFormatParser` implement `subvalueParsers`
|
|
18
18
|
* TODO: [🏢] Allow to expect something inside JSON objects and other formats
|
|
19
19
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Function isValidJsonString will tell you if the string is valid JSON or not
|
|
3
3
|
*
|
|
4
4
|
* @param value The string to check
|
|
5
|
-
* @returns
|
|
5
|
+
* @returns `true` if the string is a valid JSON string, false otherwise
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/utils`
|
|
8
8
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a JavaScript Object Notation (JSON) string into an object.
|
|
3
|
+
*
|
|
4
|
+
* Note: This is wrapper around `JSON.parse()` with better error and type handling
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
7
|
+
*/
|
|
8
|
+
export declare function jsonParse<T>(value: string): T;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FormatParser } from '../_common/FormatParser';
|
|
3
3
|
/**
|
|
4
4
|
* Definition for any text - this will be always valid
|
|
5
5
|
*
|
|
6
|
-
* Note: This is not useful for validation, but for splitting and mapping with `
|
|
6
|
+
* Note: This is not useful for validation, but for splitting and mapping with `subvalueParsers`
|
|
7
7
|
*
|
|
8
8
|
* @public exported from `@promptbook/core`
|
|
9
9
|
*/
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const TextFormatParser: FormatParser<string, string, TODO_any, TODO_any>;
|
|
11
11
|
/**
|
|
12
12
|
* TODO: [1] Make type for XML Text and Schema
|
|
13
13
|
* TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
|
|
14
|
-
* TODO: [🍓] In `
|
|
15
|
-
* TODO: [🍓] In `
|
|
16
|
-
* TODO: [🍓] In `
|
|
17
|
-
* TODO: [🍓] In `
|
|
14
|
+
* TODO: [🍓] In `TextFormatParser` implement simple `isValid`
|
|
15
|
+
* TODO: [🍓] In `TextFormatParser` implement partial `canBeValid`
|
|
16
|
+
* TODO: [🍓] In `TextFormatParser` implement `heal
|
|
17
|
+
* TODO: [🍓] In `TextFormatParser` implement `subvalueParsers`
|
|
18
18
|
* TODO: [🏢] Allow to expect something inside each item of list and other formats
|
|
19
19
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
2
|
+
import type { FormatParser } from '../_common/FormatParser';
|
|
3
|
+
/**
|
|
4
|
+
* Definition for XML format
|
|
5
|
+
*
|
|
6
|
+
* @private still in development [🏢]
|
|
7
|
+
*/
|
|
8
|
+
export declare const XmlFormatParser: FormatParser<string, string, TODO_any, TODO_any>;
|
|
9
|
+
/**
|
|
10
|
+
* TODO: [🧠] Maybe propper instance of object
|
|
11
|
+
* TODO: [0] Make string_serialized_xml
|
|
12
|
+
* TODO: [1] Make type for XML Settings and Schema
|
|
13
|
+
* TODO: [🧠] What to use for validating XMLs - XSD,...
|
|
14
|
+
* TODO: [🍓] In `XmlFormatParser` implement simple `isValid`
|
|
15
|
+
* TODO: [🍓] In `XmlFormatParser` implement partial `canBeValid`
|
|
16
|
+
* TODO: [🍓] In `XmlFormatParser` implement `heal
|
|
17
|
+
* TODO: [🍓] In `XmlFormatParser` implement `subvalueParsers`
|
|
18
|
+
* TODO: [🏢] Allow to expect something inside XML and other formats
|
|
19
|
+
*/
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Boilerplate is form of app that
|
|
2
|
+
* Boilerplate is form of app that serves as a template structure for creating other formfactors
|
|
3
|
+
* and should not be used directly in production.
|
|
3
4
|
*
|
|
4
5
|
* @public exported from `@promptbook/core`
|
|
5
6
|
*/
|
|
6
7
|
export declare const BoilerplateFormfactorDefinition: {
|
|
7
8
|
readonly name: "BOILERPLATE";
|
|
8
|
-
readonly description: "
|
|
9
|
+
readonly description: "A template structure for creating new formfactors, providing the base architecture and interfaces that should be implemented.";
|
|
9
10
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
10
11
|
readonly pipelineInterface: {
|
|
11
12
|
readonly inputParameters: readonly [];
|
|
@@ -4,34 +4,43 @@ import type { string_name } from '../../types/typeAliases';
|
|
|
4
4
|
import type { string_promptbook_documentation_url } from '../../types/typeAliases';
|
|
5
5
|
import type { string_SCREAMING_CASE } from '../../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* AbstractFormfactorDefinition provides the base structure for all form factor implementations
|
|
8
|
+
* in the Promptbook system. It defines common properties and interfaces that must be
|
|
9
|
+
* implemented by specific form factors.
|
|
8
10
|
*
|
|
9
11
|
* Note: [🚉] This is fully serializable as JSON
|
|
10
12
|
* @see https://github.com/webgptorg/promptbook/discussions/172
|
|
11
13
|
*/
|
|
12
14
|
export type AbstractFormfactorDefinition = {
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* Unique identifier for the form factor in SCREAMING_CASE format
|
|
17
|
+
* Used for programmatic identification and reference
|
|
15
18
|
*/
|
|
16
19
|
readonly name: string_name & string_SCREAMING_CASE;
|
|
17
20
|
/**
|
|
18
|
-
*
|
|
21
|
+
* Alternative names that can be used to reference this form factor
|
|
22
|
+
* Also in SCREAMING_CASE format for consistency
|
|
19
23
|
*/
|
|
20
24
|
readonly aliasNames?: ReadonlyArray<string_name & string_SCREAMING_CASE>;
|
|
21
25
|
/**
|
|
22
|
-
*
|
|
26
|
+
* Previous names that were used for this form factor but are now deprecated
|
|
27
|
+
* These are maintained for backward compatibility purposes
|
|
23
28
|
*/
|
|
24
29
|
readonly deprecatedNames?: ReadonlyArray<string_name & string_SCREAMING_CASE>;
|
|
25
30
|
/**
|
|
26
|
-
*
|
|
31
|
+
* Human-readable description of the form factor in markdown format
|
|
32
|
+
* Explains the purpose, functionality, and use cases of this form factor
|
|
27
33
|
*/
|
|
28
34
|
readonly description: string_markdown_text;
|
|
29
35
|
/**
|
|
30
|
-
*
|
|
36
|
+
* URL pointing to detailed documentation for this form factor
|
|
37
|
+
* Provides additional resources and guidance for implementation and usage
|
|
31
38
|
*/
|
|
32
39
|
readonly documentationUrl: string_promptbook_documentation_url;
|
|
33
40
|
/**
|
|
34
|
-
*
|
|
41
|
+
* Defines the interface structure for this form factor's pipeline
|
|
42
|
+
* Specifies how inputs and outputs are handled, processed, and formatted
|
|
43
|
+
* Required for properly configuring and executing the form factor's functionality
|
|
35
44
|
*/
|
|
36
45
|
readonly pipelineInterface: PipelineInterface;
|
|
37
46
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { FORMFACTOR_DEFINITIONS } from '../index';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* FormfactorDefinition is a type that defines the structure and capabilities of a specific
|
|
4
|
+
* application form factor in the Promptbook system. It encapsulates all properties needed
|
|
5
|
+
* to represent how a particular interface handles inputs, outputs, and behaviors.
|
|
4
6
|
*
|
|
5
7
|
* Note: [🚉] This is fully serializable as JSON
|
|
6
8
|
* @see https://github.com/webgptorg/promptbook/discussions/172
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FormfactorDefinition } from './FormfactorDefinition';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* A type alias representing the name of a formfactor, used for type checking and validation
|
|
4
|
+
* in the formfactor registry and selection processes
|
|
4
5
|
*/
|
|
5
6
|
export type string_formfactor_name = FormfactorDefinition['name'];
|
|
@@ -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 [{
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Completion is formfactor that emulates completion models
|
|
3
|
+
*
|
|
4
|
+
* @public exported from `@promptbook/core`
|
|
5
|
+
*/
|
|
6
|
+
export declare const CompletionFormfactorDefinition: {
|
|
7
|
+
readonly name: "COMPLETION";
|
|
8
|
+
readonly description: "Completion is formfactor that emulates completion models";
|
|
9
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
10
|
+
readonly pipelineInterface: {
|
|
11
|
+
readonly inputParameters: readonly [{
|
|
12
|
+
readonly name: "inputText";
|
|
13
|
+
readonly description: "Input text to be completed";
|
|
14
|
+
readonly isInput: true;
|
|
15
|
+
readonly isOutput: false;
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "instructions";
|
|
18
|
+
readonly description: "Additional instructions for the model, for example the required length, empty by default";
|
|
19
|
+
readonly isInput: true;
|
|
20
|
+
readonly isOutput: false;
|
|
21
|
+
}];
|
|
22
|
+
readonly outputParameters: readonly [{
|
|
23
|
+
readonly name: "followingText";
|
|
24
|
+
readonly description: "Text that follows the input text";
|
|
25
|
+
readonly isInput: false;
|
|
26
|
+
readonly isOutput: true;
|
|
27
|
+
}];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generator
|
|
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 [{
|
|
@@ -36,9 +36,6 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
|
|
|
36
36
|
readonly outputParameters: readonly [{
|
|
37
37
|
readonly name: "title";
|
|
38
38
|
readonly description: "Title of the conversation";
|
|
39
|
-
/**
|
|
40
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
41
|
-
*/
|
|
42
39
|
readonly isInput: false;
|
|
43
40
|
readonly isOutput: true;
|
|
44
41
|
}, {
|
|
@@ -55,7 +52,7 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
|
|
|
55
52
|
};
|
|
56
53
|
}, {
|
|
57
54
|
readonly name: "TRANSLATOR";
|
|
58
|
-
readonly description: "
|
|
55
|
+
readonly description: "A text transformation system that converts input content into different forms,\n including language translations, paraphrasing, style conversions, and tone adjustments.\n This form factor takes one input and produces one transformed output.";
|
|
59
56
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/175";
|
|
60
57
|
readonly pipelineInterface: {
|
|
61
58
|
readonly inputParameters: readonly [{
|
|
@@ -74,7 +71,7 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
|
|
|
74
71
|
}, {
|
|
75
72
|
readonly name: "SHEETS";
|
|
76
73
|
readonly aliasNames: readonly ["SHEETS", "SHEET"];
|
|
77
|
-
readonly description: "
|
|
74
|
+
readonly description: "A formfactor for processing spreadsheet-like data in CSV format, enabling AI transformations on tabular data";
|
|
78
75
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/176";
|
|
79
76
|
readonly pipelineInterface: {
|
|
80
77
|
readonly inputParameters: readonly [{
|
|
@@ -92,7 +89,7 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
|
|
|
92
89
|
};
|
|
93
90
|
}, {
|
|
94
91
|
readonly name: "EXPERIMENTAL_MATCHER";
|
|
95
|
-
readonly description: "
|
|
92
|
+
readonly description: "An evaluation system that determines whether content meets specific criteria or patterns.\n Used for content validation, quality assessment, and intelligent filtering tasks. Currently in experimental phase.";
|
|
96
93
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/177";
|
|
97
94
|
readonly pipelineInterface: {
|
|
98
95
|
readonly inputParameters: readonly [{
|
|
@@ -132,6 +129,11 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
|
|
|
132
129
|
readonly isInput: true;
|
|
133
130
|
readonly isOutput: false;
|
|
134
131
|
}];
|
|
132
|
+
/**
|
|
133
|
+
* All available formfactor definitions
|
|
134
|
+
*
|
|
135
|
+
* @public exported from `@promptbook/core`
|
|
136
|
+
*/
|
|
135
137
|
readonly outputParameters: readonly [{
|
|
136
138
|
readonly name: "prompt";
|
|
137
139
|
readonly description: "Prompt to be used for image generation";
|
|
@@ -139,6 +141,29 @@ export declare const FORMFACTOR_DEFINITIONS: readonly [{
|
|
|
139
141
|
readonly isOutput: true;
|
|
140
142
|
}];
|
|
141
143
|
};
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "COMPLETION";
|
|
146
|
+
readonly description: "Completion is formfactor that emulates completion models";
|
|
147
|
+
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
|
|
148
|
+
readonly pipelineInterface: {
|
|
149
|
+
readonly inputParameters: readonly [{
|
|
150
|
+
readonly name: "inputText";
|
|
151
|
+
readonly description: "Input text to be completed";
|
|
152
|
+
readonly isInput: true;
|
|
153
|
+
readonly isOutput: false;
|
|
154
|
+
}, {
|
|
155
|
+
readonly name: "instructions";
|
|
156
|
+
readonly description: "Additional instructions for the model, for example the required length, empty by default";
|
|
157
|
+
readonly isInput: true;
|
|
158
|
+
readonly isOutput: false;
|
|
159
|
+
}];
|
|
160
|
+
readonly outputParameters: readonly [{
|
|
161
|
+
readonly name: "followingText";
|
|
162
|
+
readonly description: "Text that follows the input text";
|
|
163
|
+
readonly isInput: false;
|
|
164
|
+
readonly isOutput: true;
|
|
165
|
+
}];
|
|
166
|
+
};
|
|
142
167
|
}];
|
|
143
168
|
/**
|
|
144
169
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Matcher is form of app that
|
|
2
|
+
* Matcher is form of app that evaluates (spreadsheet) content against defined criteria or patterns,
|
|
3
|
+
* determining if it matches or meets specific requirements. Used for classification,
|
|
4
|
+
* validation, filtering, and quality assessment of inputs.
|
|
3
5
|
*
|
|
4
6
|
* @public exported from `@promptbook/core`
|
|
5
7
|
*/
|
|
6
8
|
export declare const MatcherFormfactorDefinition: {
|
|
7
9
|
readonly name: "EXPERIMENTAL_MATCHER";
|
|
8
|
-
readonly description: "
|
|
10
|
+
readonly description: "An evaluation system that determines whether content meets specific criteria or patterns.\n Used for content validation, quality assessment, and intelligent filtering tasks. Currently in experimental phase.";
|
|
9
11
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/177";
|
|
10
12
|
readonly pipelineInterface: {
|
|
11
13
|
readonly inputParameters: readonly [{
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Sheets is form of app that
|
|
2
|
+
* Sheets is form of app that processes tabular data in CSV format, allowing transformation
|
|
3
|
+
* and analysis of structured data through AI-powered operations
|
|
3
4
|
*
|
|
4
5
|
* @public exported from `@promptbook/core`
|
|
5
6
|
*/
|
|
6
7
|
export declare const SheetsFormfactorDefinition: {
|
|
7
8
|
readonly name: "SHEETS";
|
|
8
9
|
readonly aliasNames: readonly ["SHEETS", "SHEET"];
|
|
9
|
-
readonly description: "
|
|
10
|
+
readonly description: "A formfactor for processing spreadsheet-like data in CSV format, enabling AI transformations on tabular data";
|
|
10
11
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/176";
|
|
11
12
|
readonly pipelineInterface: {
|
|
12
13
|
readonly inputParameters: readonly [{
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Translator is form of app that
|
|
2
|
+
* Translator is form of app that transforms input text from one form to another,
|
|
3
|
+
* such as language translation, style conversion, tone modification, or other text transformations.
|
|
3
4
|
*
|
|
4
5
|
* @public exported from `@promptbook/core`
|
|
5
6
|
*/
|
|
6
7
|
export declare const TranslatorFormfactorDefinition: {
|
|
7
8
|
readonly name: "TRANSLATOR";
|
|
8
|
-
readonly description: "
|
|
9
|
+
readonly description: "A text transformation system that converts input content into different forms,\n including language translations, paraphrasing, style conversions, and tone adjustments.\n This form factor takes one input and produces one transformed output.";
|
|
9
10
|
readonly documentationUrl: "https://github.com/webgptorg/promptbook/discussions/175";
|
|
10
11
|
readonly pipelineInterface: {
|
|
11
12
|
readonly inputParameters: readonly [{
|