@promptbook/remote-client
Advanced tools
Comparing version 0.62.0 to 0.63.0-0
import { io } from 'socket.io-client'; | ||
/** | ||
* The version of the Promptbook library | ||
* | ||
* @public exported from all packages | ||
*/ | ||
var PROMPTBOOK_VERSION = '0.62.0'; | ||
// TODO: !!!! List here all the versions and annotate + put into script | ||
/*! ***************************************************************************** | ||
@@ -74,2 +82,4 @@ Copyright (c) Microsoft Corporation. | ||
* This error indicates errors during the execution of the pipeline | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -94,2 +104,3 @@ var PipelineExecutionError = /** @class */ (function (_super) { | ||
* @see https://github.com/webgptorg/promptbook#remote-server | ||
* @public exported from `@promptbook/remote-client` | ||
*/ | ||
@@ -217,9 +228,3 @@ var RemoteLlmExecutionTools = /** @class */ (function () { | ||
/** | ||
* The version of the Promptbook library | ||
*/ | ||
var PROMPTBOOK_VERSION = '0.62.0-1'; | ||
// TODO: !!!! List here all the versions and annotate + put into script | ||
export { PROMPTBOOK_VERSION, RemoteLlmExecutionTools }; | ||
//# sourceMappingURL=index.es.js.map |
@@ -0,5 +1,6 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { AnthropicClaudeExecutionTools } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionTools'; | ||
import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { PROMPTBOOK_VERSION }; | ||
export { AnthropicClaudeExecutionTools, AnthropicClaudeExecutionToolsOptions }; | ||
export { AnthropicClaudeExecutionTools }; | ||
export type { AnthropicClaudeExecutionToolsOptions }; |
@@ -0,4 +1,6 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { AzureOpenAiExecutionTools } from '../llm-providers/azure-openai/AzureOpenAiExecutionTools'; | ||
import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { AzureOpenAiExecutionTools, AzureOpenAiExecutionToolsOptions, PROMPTBOOK_VERSION }; | ||
export { PROMPTBOOK_VERSION }; | ||
export { AzureOpenAiExecutionTools }; | ||
export type { AzureOpenAiExecutionToolsOptions }; |
@@ -1,10 +0,4 @@ | ||
import { promptbookCli } from '../cli/promptbookCli'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { __CLI } from '../cli/main'; | ||
export { PROMPTBOOK_VERSION }; | ||
/** | ||
* Hidden utilities which should not be used by external consumers. | ||
*/ | ||
declare const __CLI: { | ||
__initialize: typeof promptbookCli; | ||
}; | ||
export { __CLI }; |
@@ -0,1 +1,2 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { collectionToJson } from '../collection/collectionToJson'; | ||
@@ -6,5 +7,14 @@ import { createCollectionFromJson } from '../collection/constructors/createCollectionFromJson'; | ||
import { createSubcollection } from '../collection/constructors/createSubcollection'; | ||
import type { BlockType } from '../commands/BLOCK/BlockTypes'; | ||
import { BlockTypes } from '../commands/BLOCK/BlockTypes'; | ||
import { MAX_PARALLEL_COUNT } from '../config'; | ||
import { MAX_EXECUTION_ATTEMPTS } from '../config'; | ||
import { MAX_FILENAME_LENGTH } from '../config'; | ||
import { MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH } from '../config'; | ||
import { MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL } from '../config'; | ||
import { EXECUTIONS_CACHE_DIRNAME } from '../config'; | ||
import { PIPELINE_COLLECTION_BASE_FILENAME } from '../config'; | ||
import { RESERVED_PARAMETER_NAMES } from '../config'; | ||
import { pipelineJsonToString } from '../conversion/pipelineJsonToString'; | ||
import type { PipelineStringToJsonOptions } from '../conversion/pipelineStringToJson'; | ||
import { pipelineStringToJson } from '../conversion/pipelineStringToJson'; | ||
@@ -16,3 +26,6 @@ import { pipelineStringToJsonSync } from '../conversion/pipelineStringToJsonSync'; | ||
import { CollectionError } from '../errors/CollectionError'; | ||
import { EnvironmentMismatchError } from '../errors/EnvironmentMismatchError'; | ||
import { LimitReachedError } from '../errors/LimitReachedError'; | ||
import { NotFoundError } from '../errors/NotFoundError'; | ||
import { NotYetImplementedError } from '../errors/NotYetImplementedError'; | ||
import { ParsingError } from '../errors/ParsingError'; | ||
@@ -24,30 +37,91 @@ import { PipelineExecutionError } from '../errors/PipelineExecutionError'; | ||
import { VersionMismatchError } from '../errors/VersionMismatchError'; | ||
import { ExpectError } from '../errors/_ExpectError'; | ||
import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful'; | ||
import { createPipelineExecutor } from '../execution/createPipelineExecutor'; | ||
import { embeddingVectorToString } from '../execution/embeddingVectorToString'; | ||
import { ZERO_USAGE } from '../execution/utils/addUsage'; | ||
import { addUsage } from '../execution/utils/addUsage'; | ||
import { checkExpectations, isPassingExpectations } from '../execution/utils/checkExpectations'; | ||
import { checkExpectations } from '../execution/utils/checkExpectations'; | ||
import { isPassingExpectations } from '../execution/utils/checkExpectations'; | ||
import { usageToHuman } from '../execution/utils/usageToHuman'; | ||
import { usageToWorktime } from '../execution/utils/usageToWorktime'; | ||
import { usageToHuman } from '../execution/utils/usageToHuman'; | ||
import { CallbackInterfaceTools } from '../knowledge/dialogs/callback/CallbackInterfaceTools'; | ||
import type { CallbackInterfaceToolsOptions } from '../knowledge/dialogs/callback/CallbackInterfaceToolsOptions'; | ||
import { SimplePromptInterfaceTools } from '../knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools'; | ||
import { prepareKnowledgePieces } from '../knowledge/prepare-knowledge/_common/prepareKnowledgePieces'; | ||
import { prepareKnowledgeFromMarkdown } from '../knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown'; | ||
import { cacheLlmTools } from '../llm-providers/_common/utils/cache/cacheLlmTools'; | ||
import { countTotalUsage } from '../llm-providers/_common/utils/count-total-usage/countTotalUsage'; | ||
import { limitTotalUsage } from '../llm-providers/_common/utils/count-total-usage/limitTotalUsage'; | ||
import { joinLlmExecutionTools } from '../llm-providers/multiple/joinLlmExecutionTools'; | ||
import { preparePersona } from '../personas/preparePersona'; | ||
import { isPipelinePrepared } from '../prepare/isPipelinePrepared'; | ||
import { preparePipeline } from '../prepare/preparePipeline'; | ||
import { prepareTemplates } from '../prepare/prepareTemplates'; | ||
import { unpreparePipeline } from '../prepare/unpreparePipeline'; | ||
import { MemoryStorage } from '../storage/memory/MemoryStorage'; | ||
import { PrefixStorage } from '../storage/utils/PrefixStorage'; | ||
import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString'; | ||
import type { ExecutionReportStringOptions } from '../types/execution-report/ExecutionReportStringOptions'; | ||
import { ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions'; | ||
import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { PROMPTBOOK_VERSION }; | ||
export { BlockTypes, RESERVED_PARAMETER_NAMES }; | ||
export { addUsage, assertsExecutionSuccessful, checkExpectations, embeddingVectorToString, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPipelineString, usageToWorktime, usageToHuman, }; | ||
export { collectionToJson, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createSubcollection, }; | ||
export { collectionToJson }; | ||
export { createCollectionFromJson }; | ||
export { createCollectionFromPromise }; | ||
export { createCollectionFromUrl }; | ||
export { createSubcollection }; | ||
export type { BlockType }; | ||
export { BlockTypes }; | ||
export { MAX_PARALLEL_COUNT }; | ||
export { MAX_EXECUTION_ATTEMPTS }; | ||
export { MAX_FILENAME_LENGTH }; | ||
export { MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH }; | ||
export { MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL }; | ||
export { EXECUTIONS_CACHE_DIRNAME }; | ||
export { PIPELINE_COLLECTION_BASE_FILENAME }; | ||
export { RESERVED_PARAMETER_NAMES }; | ||
export { pipelineJsonToString }; | ||
export type { PipelineStringToJsonOptions }; | ||
export { pipelineStringToJson }; | ||
export { pipelineStringToJsonSync }; | ||
export { prettifyPipelineString }; | ||
export { stringifyPipelineJson }; | ||
export { validatePipeline }; | ||
export { CollectionError }; | ||
export { EnvironmentMismatchError }; | ||
export { LimitReachedError }; | ||
export { NotFoundError }; | ||
export { NotYetImplementedError }; | ||
export { ParsingError }; | ||
export { PipelineExecutionError }; | ||
export { PipelineLogicError }; | ||
export { ReferenceError }; | ||
export { UnexpectedError }; | ||
export { VersionMismatchError }; | ||
export { assertsExecutionSuccessful }; | ||
export { createPipelineExecutor }; | ||
export { embeddingVectorToString }; | ||
export { ZERO_USAGE }; | ||
export { addUsage }; | ||
export { checkExpectations }; | ||
export { isPassingExpectations }; | ||
export { usageToHuman }; | ||
export { usageToWorktime }; | ||
export { CallbackInterfaceTools }; | ||
export type { CallbackInterfaceToolsOptions }; | ||
export { SimplePromptInterfaceTools }; | ||
export { pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, stringifyPipelineJson, validatePipeline, }; | ||
export { preparePipeline, unpreparePipeline }; | ||
export { createPipelineExecutor, joinLlmExecutionTools }; | ||
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions }; | ||
export { CollectionError, ExpectError, NotFoundError, ParsingError, PipelineExecutionError, PipelineLogicError, ReferenceError, UnexpectedError, VersionMismatchError, }; | ||
export { prepareKnowledgePieces }; | ||
export { prepareKnowledgeFromMarkdown }; | ||
export { cacheLlmTools }; | ||
export { countTotalUsage }; | ||
export { limitTotalUsage }; | ||
export { joinLlmExecutionTools }; | ||
export { preparePersona }; | ||
export { isPipelinePrepared }; | ||
export { preparePipeline }; | ||
export { prepareTemplates }; | ||
export { unpreparePipeline }; | ||
export { MemoryStorage }; | ||
export { PrefixStorage }; | ||
export { executionReportJsonToString }; | ||
export type { ExecutionReportStringOptions }; | ||
export { ExecutionReportStringOptionsDefaults }; |
@@ -1,48 +0,8 @@ | ||
import spaceTrim from 'spacetrim'; | ||
import { extractBlock } from '../postprocessing/utils/extractBlock'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { JavascriptEvalExecutionTools } from '../scripting/javascript/JavascriptEvalExecutionTools'; | ||
import { JavascriptExecutionTools } from '../scripting/javascript/JavascriptExecutionTools'; | ||
import { prettifyMarkdown } from '../utils/markdown/prettifyMarkdown'; | ||
import { capitalize } from '../utils/normalization/capitalize'; | ||
import { decapitalize } from '../utils/normalization/decapitalize'; | ||
import { nameToUriPart } from '../utils/normalization/nameToUriPart'; | ||
import { nameToUriParts } from '../utils/normalization/nameToUriParts'; | ||
import { normalizeToKebabCase } from '../utils/normalization/normalize-to-kebab-case'; | ||
import { normalizeTo_PascalCase } from '../utils/normalization/normalizeTo_PascalCase'; | ||
import { normalizeTo_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import { normalizeTo_camelCase } from '../utils/normalization/normalizeTo_camelCase'; | ||
import { normalizeTo_snake_case } from '../utils/normalization/normalizeTo_snake_case'; | ||
import { normalizeWhitespaces } from '../utils/normalization/normalizeWhitespaces'; | ||
import { removeDiacritics } from '../utils/normalization/removeDiacritics'; | ||
import { removeEmojis } from '../utils/removeEmojis'; | ||
import { removeQuotes } from '../utils/removeQuotes'; | ||
import { trimCodeBlock } from '../utils/trimCodeBlock'; | ||
import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock'; | ||
import { unwrapResult } from '../utils/unwrapResult'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { POSTPROCESSING_FUNCTIONS } from '../scripting/javascript/postprocessing-functions'; | ||
export { PROMPTBOOK_VERSION }; | ||
declare const POSTPROCESSING_FUNCTIONS: { | ||
spaceTrim: typeof spaceTrim; | ||
removeQuotes: typeof removeQuotes; | ||
unwrapResult: typeof unwrapResult; | ||
trimEndOfCodeBlock: typeof trimEndOfCodeBlock; | ||
trimCodeBlock: typeof trimCodeBlock; | ||
trim: (str: string) => string; | ||
reverse: (str: string) => string; | ||
removeEmojis: typeof removeEmojis; | ||
prettifyMarkdown: typeof prettifyMarkdown; | ||
capitalize: typeof capitalize; | ||
decapitalize: typeof decapitalize; | ||
nameToUriPart: typeof nameToUriPart; | ||
nameToUriParts: typeof nameToUriParts; | ||
removeDiacritics: typeof removeDiacritics; | ||
normalizeWhitespaces: typeof normalizeWhitespaces; | ||
normalizeToKebabCase: typeof normalizeToKebabCase; | ||
normalizeTo_camelCase: typeof normalizeTo_camelCase; | ||
normalizeTo_snake_case: typeof normalizeTo_snake_case; | ||
normalizeTo_PascalCase: typeof normalizeTo_PascalCase; | ||
parseKeywords: (input: string) => string; | ||
normalizeTo_SCREAMING_CASE: typeof normalizeTo_SCREAMING_CASE; | ||
extractBlock: typeof extractBlock; | ||
}; | ||
export { JavascriptEvalExecutionTools, JavascriptExecutionTools, POSTPROCESSING_FUNCTIONS }; | ||
export { JavascriptEvalExecutionTools }; | ||
export { JavascriptExecutionTools }; | ||
export { POSTPROCESSING_FUNCTIONS }; |
@@ -0,7 +1,6 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { MockedEchoLlmExecutionTools } from '../llm-providers/mocked/MockedEchoLlmExecutionTools'; | ||
import { MockedFackedLlmExecutionTools } from '../llm-providers/mocked/MockedFackedLlmExecutionTools'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { MockedEchoLlmExecutionTools, MockedFackedLlmExecutionTools, PROMPTBOOK_VERSION }; | ||
/** | ||
* TODO: [🚏] FakeLLM | ||
*/ | ||
export { PROMPTBOOK_VERSION }; | ||
export { MockedEchoLlmExecutionTools }; | ||
export { MockedFackedLlmExecutionTools }; |
@@ -0,4 +1,6 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { LangtailExecutionTools } from '../llm-providers/langtail/LangtailExecutionTools'; | ||
import type { LangtailExecutionToolsOptions } from '../llm-providers/langtail/LangtailExecutionToolsOptions'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { LangtailExecutionTools, LangtailExecutionToolsOptions, PROMPTBOOK_VERSION }; | ||
export { PROMPTBOOK_VERSION }; | ||
export { LangtailExecutionTools }; | ||
export type { LangtailExecutionToolsOptions }; |
@@ -1,2 +0,6 @@ | ||
import type { string_markdown_section, string_markdown_section_content, string_markdown_text } from '../types/typeAliases'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import type { string_markdown } from '../types/typeAliases'; | ||
import type { string_markdown_section } from '../types/typeAliases'; | ||
import type { string_markdown_section_content } from '../types/typeAliases'; | ||
import type { string_markdown_text } from '../types/typeAliases'; | ||
import { addAutoGeneratedSection } from '../utils/markdown/addAutoGeneratedSection'; | ||
@@ -15,4 +19,19 @@ import { createMarkdownChart } from '../utils/markdown/createMarkdownChart'; | ||
import { splitMarkdownIntoSections } from '../utils/markdown/splitMarkdownIntoSections'; | ||
import { string_markdown } from './types.index'; | ||
export { addAutoGeneratedSection, createMarkdownChart, createMarkdownTable, escapeMarkdownBlock, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, flattenMarkdown, parseMarkdownSection, removeContentComments, removeMarkdownFormatting, splitMarkdownIntoSections, }; | ||
export type { MarkdownSection, string_markdown, string_markdown_section, string_markdown_section_content, string_markdown_text, }; | ||
export { PROMPTBOOK_VERSION }; | ||
export type { string_markdown }; | ||
export type { string_markdown_section }; | ||
export type { string_markdown_section_content }; | ||
export type { string_markdown_text }; | ||
export { addAutoGeneratedSection }; | ||
export { createMarkdownChart }; | ||
export { createMarkdownTable }; | ||
export { escapeMarkdownBlock }; | ||
export { extractAllBlocksFromMarkdown }; | ||
export { extractAllListItemsFromMarkdown }; | ||
export { extractOneBlockFromMarkdown }; | ||
export { flattenMarkdown }; | ||
export type { MarkdownSection }; | ||
export { parseMarkdownSection }; | ||
export { removeContentComments }; | ||
export { removeMarkdownFormatting }; | ||
export { splitMarkdownIntoSections }; |
@@ -0,5 +1,8 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { createCollectionFromDirectory } from '../collection/constructors/createCollectionFromDirectory'; | ||
import { createLlmToolsFromEnv } from '../llm-providers/_common/createLlmToolsFromEnv'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { FilesStorage } from '../storage/files-storage/FilesStorage'; | ||
export { PROMPTBOOK_VERSION }; | ||
export { createCollectionFromDirectory, createLlmToolsFromEnv }; | ||
export { createCollectionFromDirectory }; | ||
export { createLlmToolsFromEnv }; | ||
export { FilesStorage }; |
@@ -0,5 +1,8 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { OPENAI_MODELS } from '../llm-providers/openai/openai-models'; | ||
import { OpenAiExecutionTools } from '../llm-providers/openai/OpenAiExecutionTools'; | ||
import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { OPENAI_MODELS, OpenAiExecutionTools, OpenAiExecutionToolsOptions, PROMPTBOOK_VERSION }; | ||
export { PROMPTBOOK_VERSION }; | ||
export { OPENAI_MODELS }; | ||
export { OpenAiExecutionTools }; | ||
export type { OpenAiExecutionToolsOptions }; |
@@ -0,5 +1,8 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import type { RemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions'; | ||
import { RemoteLlmExecutionTools } from '../llm-providers/remote/RemoteLlmExecutionTools'; | ||
import type { RemoteLlmExecutionToolsOptions } from '../llm-providers/remote/RemoteLlmExecutionToolsOptions'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { PROMPTBOOK_VERSION, RemoteLlmExecutionTools, RemoteLlmExecutionToolsOptions, RemoteServerOptions }; | ||
export { PROMPTBOOK_VERSION }; | ||
export type { RemoteServerOptions }; | ||
export { RemoteLlmExecutionTools }; | ||
export type { RemoteLlmExecutionToolsOptions }; |
@@ -0,4 +1,6 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import type { RemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions'; | ||
import { startRemoteServer } from '../llm-providers/remote/startRemoteServer'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { PROMPTBOOK_VERSION, RemoteServerOptions, startRemoteServer }; | ||
export { PROMPTBOOK_VERSION }; | ||
export type { RemoteServerOptions }; | ||
export { startRemoteServer }; |
@@ -0,25 +1,95 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import type { PipelineCollection } from '../collection/PipelineCollection'; | ||
import type { BoilerplateCommand } from '../commands/_BOILERPLATE/BoilerplateCommand'; | ||
import type { Command } from '../commands/_common/types/Command'; | ||
import type { CommandParser } from '../commands/_common/types/CommandParser'; | ||
import type { CommandParserInput } from '../commands/_common/types/CommandParser'; | ||
import type { ApplyToPipelineJsonSubjects } from '../commands/_common/types/CommandParser'; | ||
import type { CommandUsagePlace } from '../commands/_common/types/CommandUsagePlaces'; | ||
import type { BlockCommand } from '../commands/BLOCK/BlockCommand'; | ||
import type { BlockType } from '../commands/BLOCK/BlockTypes'; | ||
import type { ExpectAmountCommand } from '../commands/EXPECT/ExpectAmountCommand'; | ||
import type { ExpectCommand } from '../commands/EXPECT/ExpectCommand'; | ||
import type { ExpectFormatCommand } from '../commands/EXPECT/ExpectFormatCommand'; | ||
import type { JokerCommand } from '../commands/JOKER/JokerCommand'; | ||
import type { KnowledgeCommand } from '../commands/KNOWLEDGE/KnowledgeCommand'; | ||
import type { ModelCommand } from '../commands/MODEL/ModelCommand'; | ||
import type { ParameterCommand } from '../commands/PARAMETER/ParameterCommand'; | ||
import type { PersonaCommand } from '../commands/PERSONA/PersonaCommand'; | ||
import type { PostprocessCommand } from '../commands/POSTPROCESS/PostprocessCommand'; | ||
import type { PromptbookVersionCommand } from '../commands/PROMPTBOOK_VERSION/PromptbookVersionCommand'; | ||
import type { UrlCommand } from '../commands/URL/UrlCommand'; | ||
import type { ActionCommand } from '../commands/X_ACTION/ActionCommand'; | ||
import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentCommand'; | ||
import type { PipelineStringToJsonOptions } from '../conversion/pipelineStringToJson'; | ||
import type { PrettifyOptions } from '../conversion/prettify/PrettifyOptions'; | ||
import type { renderPipelineMermaidOptions } from '../conversion/prettify/renderPipelineMermaidOptions'; | ||
import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions'; | ||
import { EmbeddingVector } from '../execution/EmbeddingVector'; | ||
import type { EmbeddingVector } from '../execution/EmbeddingVector'; | ||
import type { ExecutionTools } from '../execution/ExecutionTools'; | ||
import type { AvailableModel, LlmExecutionTools } from '../execution/LlmExecutionTools'; | ||
import type { PipelineExecutor, PipelineExecutorResult } from '../execution/PipelineExecutor'; | ||
import type { ChatPromptResult, CommonPromptResult, CompletionPromptResult, EmbeddingPromptResult, PromptResult } from '../execution/PromptResult'; | ||
import type { PromptResultUsage, PromptResultUsageCounts } from '../execution/PromptResultUsage'; | ||
import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools'; | ||
import type { LlmExecutionTools } from '../execution/LlmExecutionTools'; | ||
import type { AvailableModel } from '../execution/LlmExecutionTools'; | ||
import type { PipelineExecutor } from '../execution/PipelineExecutor'; | ||
import type { PipelineExecutorResult } from '../execution/PipelineExecutor'; | ||
import type { PromptResult } from '../execution/PromptResult'; | ||
import type { CompletionPromptResult } from '../execution/PromptResult'; | ||
import type { ChatPromptResult } from '../execution/PromptResult'; | ||
import type { EmbeddingPromptResult } from '../execution/PromptResult'; | ||
import type { CommonPromptResult } from '../execution/PromptResult'; | ||
import type { PromptResultUsage } from '../execution/PromptResultUsage'; | ||
import type { PromptResultUsageCounts } from '../execution/PromptResultUsage'; | ||
import type { ScriptExecutionTools } from '../execution/ScriptExecutionTools'; | ||
import type { ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools'; | ||
import type { AutomaticTranslator } from '../execution/translation/automatic-translate/automatic-translators/AutomaticTranslator'; | ||
import type { TranslatorOptions } from '../execution/translation/automatic-translate/automatic-translators/TranslatorOptions'; | ||
import type { UncertainNumber } from '../execution/UncertainNumber'; | ||
import type { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools'; | ||
import type { UserInterfaceTools } from '../execution/UserInterfaceTools'; | ||
import type { UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools'; | ||
import type { FormatDefinition } from '../formats/_common/FormatDefinition'; | ||
import type { CallbackInterfaceToolsOptions } from '../knowledge/dialogs/callback/CallbackInterfaceToolsOptions'; | ||
import type { Scraper } from '../knowledge/prepare-knowledge/_common/Scraper'; | ||
import type { ScraperSourceOptions } from '../knowledge/prepare-knowledge/_common/Scraper'; | ||
import type { CreateLlmToolsFromEnvOptions } from '../llm-providers/_common/createLlmToolsFromEnv'; | ||
import type { CacheItem } from '../llm-providers/_common/utils/cache/CacheItem'; | ||
import type { CacheLlmToolsOptions } from '../llm-providers/_common/utils/cache/CacheLlmToolsOptions'; | ||
import type { LlmExecutionToolsWithTotalUsage } from '../llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage'; | ||
import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions'; | ||
import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions'; | ||
import type { LangtailExecutionToolsOptions } from '../llm-providers/langtail/LangtailExecutionToolsOptions'; | ||
import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions'; | ||
import type { Promptbook_Server_Error } from '../llm-providers/remote/interfaces/Promptbook_Server_Error'; | ||
import type { Promptbook_Server_Progress } from '../llm-providers/remote/interfaces/Promptbook_Server_Progress'; | ||
import type { Promptbook_Server_Request } from '../llm-providers/remote/interfaces/Promptbook_Server_Request'; | ||
import type { Promptbook_Server_Response } from '../llm-providers/remote/interfaces/Promptbook_Server_Response'; | ||
import type { RemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions'; | ||
import type { RemoteLlmExecutionToolsOptions } from '../llm-providers/remote/RemoteLlmExecutionToolsOptions'; | ||
import type { PrepareOptions } from '../prepare/PrepareOptions'; | ||
import type { JavascriptExecutionToolsOptions } from '../scripting/javascript/JavascriptExecutionToolsOptions'; | ||
import type { PostprocessingFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions'; | ||
import type { PromptbookStorage } from '../storage/_common/PromptbookStorage'; | ||
import type { FilesStorageOptions } from '../storage/files-storage/FilesStorageOptions'; | ||
import type { Arrayable } from '../types/Arrayable'; | ||
import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson'; | ||
import type { ExecutionReportString } from '../types/execution-report/ExecutionReportString'; | ||
import type { ExecutionReportStringOptions } from '../types/execution-report/ExecutionReportStringOptions'; | ||
import type { ModelRequirements } from '../types/ModelRequirements'; | ||
import type { CompletionModelRequirements } from '../types/ModelRequirements'; | ||
import type { ChatModelRequirements } from '../types/ModelRequirements'; | ||
import type { EmbeddingModelRequirements } from '../types/ModelRequirements'; | ||
import type { CommonModelRequirements } from '../types/ModelRequirements'; | ||
import type { ModelVariant } from '../types/ModelVariant'; | ||
import type { ExpectationAmount, ExpectationUnit, Expectations } from '../types/PipelineJson/Expectations'; | ||
import { EXPECTATION_UNITS } from '../types/PipelineJson/Expectations'; | ||
import { KnowledgePiecePreparedJson } from '../types/PipelineJson/KnowledgePieceJson'; | ||
import { KnowledgeSourceJson, KnowledgeSourcePreparedJson } from '../types/PipelineJson/KnowledgeSourceJson'; | ||
import type { Expectations } from '../types/PipelineJson/Expectations'; | ||
import type { ExpectationUnit } from '../types/PipelineJson/Expectations'; | ||
import type { ExpectationAmount } from '../types/PipelineJson/Expectations'; | ||
import type { KnowledgePiecePreparedJson } from '../types/PipelineJson/KnowledgePieceJson'; | ||
import type { KnowledgeSourceJson } from '../types/PipelineJson/KnowledgeSourceJson'; | ||
import type { KnowledgeSourcePreparedJson } from '../types/PipelineJson/KnowledgeSourceJson'; | ||
import type { LlmTemplateJson } from '../types/PipelineJson/LlmTemplateJson'; | ||
import { PersonaJson, PersonaPreparedJson } from '../types/PipelineJson/PersonaJson'; | ||
import type { PersonaJson } from '../types/PipelineJson/PersonaJson'; | ||
import type { PersonaPreparedJson } from '../types/PipelineJson/PersonaJson'; | ||
import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
import { PreparationJson } from '../types/PipelineJson/PreparationJson'; | ||
import type { PreparationJson } from '../types/PipelineJson/PreparationJson'; | ||
import type { PromptDialogJson } from '../types/PipelineJson/PromptDialogJson'; | ||
import type { PromptTemplateJson } from '../types/PipelineJson/PromptTemplateJson'; | ||
import type { PromptTemplateJsonCommon } from '../types/PipelineJson/PromptTemplateJsonCommon'; | ||
import type { PromptTemplateParameterJson } from '../types/PipelineJson/PromptTemplateParameterJson'; | ||
@@ -30,14 +100,364 @@ import type { ScriptJson } from '../types/PipelineJson/ScriptJson'; | ||
import type { Prompt } from '../types/Prompt'; | ||
import type { CompletionPrompt } from '../types/Prompt'; | ||
import type { ChatPrompt } from '../types/Prompt'; | ||
import type { EmbeddingPrompt } from '../types/Prompt'; | ||
import type { CommonPrompt } from '../types/Prompt'; | ||
import type { ScriptLanguage } from '../types/ScriptLanguage'; | ||
import type { TaskProgress } from '../types/TaskProgress'; | ||
import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson'; | ||
import type { string_char_emoji } from '../types/typeAliasEmoji'; | ||
import type { Parameters, ReservedParameters, client_id, number_model_temperature, number_seed, string_char, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_parameter_name, string_parameter_value, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_documentation_url, string_reserved_parameter_name, string_script, string_semantic_version, string_sha256, string_system_message, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid } from '../types/typeAliases'; | ||
import type { string_business_category_name } from '../types/typeAliases'; | ||
import type { string_model_name } from '../types/typeAliases'; | ||
import type { string_prompt } from '../types/typeAliases'; | ||
import type { string_template } from '../types/typeAliases'; | ||
import type { string_text_prompt } from '../types/typeAliases'; | ||
import type { string_chat_prompt } from '../types/typeAliases'; | ||
import type { string_system_message } from '../types/typeAliases'; | ||
import type { string_completion_prompt } from '../types/typeAliases'; | ||
import type { string_page } from '../types/typeAliases'; | ||
import type { string_mime_type } from '../types/typeAliases'; | ||
import type { string_mime_type_with_wildcard } from '../types/typeAliases'; | ||
import type { string_char } from '../types/typeAliases'; | ||
import type { string_name } from '../types/typeAliases'; | ||
import type { string_parameter_name } from '../types/typeAliases'; | ||
import type { string_parameter_value } from '../types/typeAliases'; | ||
import type { Parameters } from '../types/typeAliases'; | ||
import type { string_reserved_parameter_name } from '../types/typeAliases'; | ||
import type { ReservedParameters } from '../types/typeAliases'; | ||
import type { string_title } from '../types/typeAliases'; | ||
import type { string_persona_description } from '../types/typeAliases'; | ||
import type { string_knowledge_source } from '../types/typeAliases'; | ||
import type { string_knowledge_source_link } from '../types/typeAliases'; | ||
import type { string_html } from '../types/typeAliases'; | ||
import type { string_xml } from '../types/typeAliases'; | ||
import type { string_markdown } from '../types/typeAliases'; | ||
import type { string_markdown_section } from '../types/typeAliases'; | ||
import type { string_markdown_section_content } from '../types/typeAliases'; | ||
import type { string_markdown_text } from '../types/typeAliases'; | ||
import type { string_promptbook_documentation_url } from '../types/typeAliases'; | ||
import type { string_domain } from '../types/typeAliases'; | ||
import type { string_tdl } from '../types/typeAliases'; | ||
import type { string_css } from '../types/typeAliases'; | ||
import type { string_svg } from '../types/typeAliases'; | ||
import type { string_script } from '../types/typeAliases'; | ||
import type { string_javascript } from '../types/typeAliases'; | ||
import type { string_json } from '../types/typeAliases'; | ||
import type { string_css_class } from '../types/typeAliases'; | ||
import type { string_css_property } from '../types/typeAliases'; | ||
import type { string_css_value } from '../types/typeAliases'; | ||
import type { string_css_selector } from '../types/typeAliases'; | ||
import type { string_url } from '../types/typeAliases'; | ||
import type { string_pipeline_url } from '../types/typeAliases'; | ||
import type { string_pipeline_url_with_hashtemplate } from '../types/typeAliases'; | ||
import type { string_data_url } from '../types/typeAliases'; | ||
import type { string_base64 } from '../types/typeAliases'; | ||
import type { string_href } from '../types/typeAliases'; | ||
import type { string_url_image } from '../types/typeAliases'; | ||
import type { string_uri } from '../types/typeAliases'; | ||
import type { string_uri_part } from '../types/typeAliases'; | ||
import type { string_uriid } from '../types/typeAliases'; | ||
import type { string_hostname } from '../types/typeAliases'; | ||
import type { string_host } from '../types/typeAliases'; | ||
import type { string_protocol } from '../types/typeAliases'; | ||
import type { string_email } from '../types/typeAliases'; | ||
import type { string_emails } from '../types/typeAliases'; | ||
import type { string_uuid } from '../types/typeAliases'; | ||
import type { client_id } from '../types/typeAliases'; | ||
import type { string_sha256 } from '../types/typeAliases'; | ||
import type { string_semantic_version } from '../types/typeAliases'; | ||
import type { string_version_dependency } from '../types/typeAliases'; | ||
import type { string_file_extension } from '../types/typeAliases'; | ||
import type { string_file_absolute_path } from '../types/typeAliases'; | ||
import type { string_file_relative_path } from '../types/typeAliases'; | ||
import type { string_file_path } from '../types/typeAliases'; | ||
import type { string_folder_absolute_path } from '../types/typeAliases'; | ||
import type { string_folder_relative_path } from '../types/typeAliases'; | ||
import type { string_folder_path } from '../types/typeAliases'; | ||
import type { string_filename } from '../types/typeAliases'; | ||
import type { string_person_fullname } from '../types/typeAliases'; | ||
import type { string_person_profile } from '../types/typeAliases'; | ||
import type { string_license } from '../types/typeAliases'; | ||
import type { string_attribute } from '../types/typeAliases'; | ||
import type { string_attribute_value_scope } from '../types/typeAliases'; | ||
import type { string_color } from '../types/typeAliases'; | ||
import type { string_translate_name } from '../types/typeAliases'; | ||
import type { string_translate_name_not_normalized } from '../types/typeAliases'; | ||
import type { string_translate_language } from '../types/typeAliases'; | ||
import type { string_javascript_name } from '../types/typeAliases'; | ||
import type { string_token } from '../types/typeAliases'; | ||
import type { string_license_token } from '../types/typeAliases'; | ||
import type { string_password } from '../types/typeAliases'; | ||
import type { string_ssh_key } from '../types/typeAliases'; | ||
import type { string_pgp_key } from '../types/typeAliases'; | ||
import type { string_date_iso8601 } from '../types/typeAliases'; | ||
import type { number_usd } from '../types/typeAliases'; | ||
import type { number_id } from '../types/typeAliases'; | ||
import type { number_linecol_number } from '../types/typeAliases'; | ||
import type { number_tokens } from '../types/typeAliases'; | ||
import type { number_positive } from '../types/typeAliases'; | ||
import type { number_negative } from '../types/typeAliases'; | ||
import type { number_integer } from '../types/typeAliases'; | ||
import type { number_percent } from '../types/typeAliases'; | ||
import type { number_model_temperature } from '../types/typeAliases'; | ||
import type { number_seed } from '../types/typeAliases'; | ||
import type { number_likeness } from '../types/typeAliases'; | ||
import type { number_miliseconds } from '../types/typeAliases'; | ||
import type { number_seconds } from '../types/typeAliases'; | ||
import type { number_minutes } from '../types/typeAliases'; | ||
import type { number_hours } from '../types/typeAliases'; | ||
import type { number_days } from '../types/typeAliases'; | ||
import type { number_weeks } from '../types/typeAliases'; | ||
import type { number_months } from '../types/typeAliases'; | ||
import type { number_years } from '../types/typeAliases'; | ||
import type { number_bytes } from '../types/typeAliases'; | ||
import type { number_kilobytes } from '../types/typeAliases'; | ||
import type { number_megabytes } from '../types/typeAliases'; | ||
import type { number_gigabytes } from '../types/typeAliases'; | ||
import type { number_terabytes } from '../types/typeAliases'; | ||
import type { FromtoItems } from '../utils/FromtoItems'; | ||
import { PROMPTBOOK_VERSION, string_promptbook_version } from '../version'; | ||
import type { CodeBlock } from '../utils/markdown/extractAllBlocksFromMarkdown'; | ||
import type { MarkdownSection } from '../utils/markdown/parseMarkdownSection'; | ||
import type { string_keyword } from '../utils/normalization/IKeywords'; | ||
import type { IKeywords } from '../utils/normalization/IKeywords'; | ||
import type { string_kebab_case } from '../utils/normalization/normalize-to-kebab-case'; | ||
import type { string_camelCase } from '../utils/normalization/normalizeTo_camelCase'; | ||
import type { string_PascalCase } from '../utils/normalization/normalizeTo_PascalCase'; | ||
import type { string_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import type { string_snake_case } from '../utils/normalization/normalizeTo_snake_case'; | ||
import type { ___ } from '../utils/organization/___'; | ||
import type { really_any } from '../utils/organization/really_any'; | ||
import type { really_unknown } from '../utils/organization/really_unknown'; | ||
import type { TODO_any } from '../utils/organization/TODO_any'; | ||
import type { TODO_object } from '../utils/organization/TODO_object'; | ||
import type { TODO_unknown } from '../utils/organization/TODO_unknown'; | ||
import type { string_promptbook_version } from '../version'; | ||
export { PROMPTBOOK_VERSION }; | ||
export { EXPECTATION_UNITS }; | ||
export type { AvailableModel, BlockType, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgePiecePreparedJson, KnowledgeSourceJson, KnowledgeSourcePreparedJson, LlmExecutionTools, LlmTemplateJson, ModelRequirements, ModelVariant, Parameters, PersonaJson, PersonaPreparedJson, PipelineCollection, PipelineExecutor, PipelineExecutorResult, PipelineJson, PipelineString, PreparationJson, Prompt, ChatPromptResult as PromptChatResult, CommonPromptResult as PromptCommonResult, CompletionPromptResult as PromptCompletionResult, PromptDialogJson, EmbeddingPromptResult as PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ReservedParameters, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_model_temperature, number_seed, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_parameter_name, string_parameter_value, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_documentation_url, string_promptbook_version, string_reserved_parameter_name, string_script, string_semantic_version, string_sha256, string_system_message, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid, }; | ||
/** | ||
* TODO: Delete type aliases (from ../types/typeAliases) that are not exported here | ||
*/ | ||
export type { PipelineCollection }; | ||
export type { BoilerplateCommand }; | ||
export type { Command }; | ||
export type { CommandParser }; | ||
export type { CommandParserInput }; | ||
export type { ApplyToPipelineJsonSubjects }; | ||
export type { CommandUsagePlace }; | ||
export type { BlockCommand }; | ||
export type { BlockType }; | ||
export type { ExpectAmountCommand }; | ||
export type { ExpectCommand }; | ||
export type { ExpectFormatCommand }; | ||
export type { JokerCommand }; | ||
export type { KnowledgeCommand }; | ||
export type { ModelCommand }; | ||
export type { ParameterCommand }; | ||
export type { PersonaCommand }; | ||
export type { PostprocessCommand }; | ||
export type { PromptbookVersionCommand }; | ||
export type { UrlCommand }; | ||
export type { ActionCommand }; | ||
export type { InstrumentCommand }; | ||
export type { PipelineStringToJsonOptions }; | ||
export type { PrettifyOptions }; | ||
export type { renderPipelineMermaidOptions }; | ||
export type { CommonExecutionToolsOptions }; | ||
export type { EmbeddingVector }; | ||
export type { ExecutionTools }; | ||
export type { LlmExecutionTools }; | ||
export type { AvailableModel }; | ||
export type { PipelineExecutor }; | ||
export type { PipelineExecutorResult }; | ||
export type { PromptResult }; | ||
export type { CompletionPromptResult }; | ||
export type { ChatPromptResult }; | ||
export type { EmbeddingPromptResult }; | ||
export type { CommonPromptResult }; | ||
export type { PromptResultUsage }; | ||
export type { PromptResultUsageCounts }; | ||
export type { ScriptExecutionTools }; | ||
export type { ScriptExecutionToolsExecuteOptions }; | ||
export type { AutomaticTranslator }; | ||
export type { TranslatorOptions }; | ||
export type { UncertainNumber }; | ||
export type { UserInterfaceTools }; | ||
export type { UserInterfaceToolsPromptDialogOptions }; | ||
export type { FormatDefinition }; | ||
export type { CallbackInterfaceToolsOptions }; | ||
export type { Scraper }; | ||
export type { ScraperSourceOptions }; | ||
export type { CreateLlmToolsFromEnvOptions }; | ||
export type { CacheItem }; | ||
export type { CacheLlmToolsOptions }; | ||
export type { LlmExecutionToolsWithTotalUsage }; | ||
export type { AnthropicClaudeExecutionToolsOptions }; | ||
export type { AzureOpenAiExecutionToolsOptions }; | ||
export type { LangtailExecutionToolsOptions }; | ||
export type { OpenAiExecutionToolsOptions }; | ||
export type { Promptbook_Server_Error }; | ||
export type { Promptbook_Server_Progress }; | ||
export type { Promptbook_Server_Request }; | ||
export type { Promptbook_Server_Response }; | ||
export type { RemoteServerOptions }; | ||
export type { RemoteLlmExecutionToolsOptions }; | ||
export type { PrepareOptions }; | ||
export type { JavascriptExecutionToolsOptions }; | ||
export type { PostprocessingFunction }; | ||
export type { PromptbookStorage }; | ||
export type { FilesStorageOptions }; | ||
export type { Arrayable }; | ||
export type { ExecutionReportJson }; | ||
export type { ExecutionReportString }; | ||
export type { ExecutionReportStringOptions }; | ||
export type { ModelRequirements }; | ||
export type { CompletionModelRequirements }; | ||
export type { ChatModelRequirements }; | ||
export type { EmbeddingModelRequirements }; | ||
export type { CommonModelRequirements }; | ||
export type { ModelVariant }; | ||
export type { Expectations }; | ||
export type { ExpectationUnit }; | ||
export type { ExpectationAmount }; | ||
export type { KnowledgePiecePreparedJson }; | ||
export type { KnowledgeSourceJson }; | ||
export type { KnowledgeSourcePreparedJson }; | ||
export type { LlmTemplateJson }; | ||
export type { PersonaJson }; | ||
export type { PersonaPreparedJson }; | ||
export type { PipelineJson }; | ||
export type { PreparationJson }; | ||
export type { PromptDialogJson }; | ||
export type { PromptTemplateJson }; | ||
export type { PromptTemplateJsonCommon }; | ||
export type { PromptTemplateParameterJson }; | ||
export type { ScriptJson }; | ||
export type { SimpleTemplateJson }; | ||
export type { PipelineString }; | ||
export type { Prompt }; | ||
export type { CompletionPrompt }; | ||
export type { ChatPrompt }; | ||
export type { EmbeddingPrompt }; | ||
export type { CommonPrompt }; | ||
export type { ScriptLanguage }; | ||
export type { TaskProgress }; | ||
export type { string_char_emoji }; | ||
export type { string_business_category_name }; | ||
export type { string_model_name }; | ||
export type { string_prompt }; | ||
export type { string_template }; | ||
export type { string_text_prompt }; | ||
export type { string_chat_prompt }; | ||
export type { string_system_message }; | ||
export type { string_completion_prompt }; | ||
export type { string_page }; | ||
export type { string_mime_type }; | ||
export type { string_mime_type_with_wildcard }; | ||
export type { string_char }; | ||
export type { string_name }; | ||
export type { string_parameter_name }; | ||
export type { string_parameter_value }; | ||
export type { Parameters }; | ||
export type { string_reserved_parameter_name }; | ||
export type { ReservedParameters }; | ||
export type { string_title }; | ||
export type { string_persona_description }; | ||
export type { string_knowledge_source }; | ||
export type { string_knowledge_source_link }; | ||
export type { string_html }; | ||
export type { string_xml }; | ||
export type { string_markdown }; | ||
export type { string_markdown_section }; | ||
export type { string_markdown_section_content }; | ||
export type { string_markdown_text }; | ||
export type { string_promptbook_documentation_url }; | ||
export type { string_domain }; | ||
export type { string_tdl }; | ||
export type { string_css }; | ||
export type { string_svg }; | ||
export type { string_script }; | ||
export type { string_javascript }; | ||
export type { string_json }; | ||
export type { string_css_class }; | ||
export type { string_css_property }; | ||
export type { string_css_value }; | ||
export type { string_css_selector }; | ||
export type { string_url }; | ||
export type { string_pipeline_url }; | ||
export type { string_pipeline_url_with_hashtemplate }; | ||
export type { string_data_url }; | ||
export type { string_base64 }; | ||
export type { string_href }; | ||
export type { string_url_image }; | ||
export type { string_uri }; | ||
export type { string_uri_part }; | ||
export type { string_uriid }; | ||
export type { string_hostname }; | ||
export type { string_host }; | ||
export type { string_protocol }; | ||
export type { string_email }; | ||
export type { string_emails }; | ||
export type { string_uuid }; | ||
export type { client_id }; | ||
export type { string_sha256 }; | ||
export type { string_semantic_version }; | ||
export type { string_version_dependency }; | ||
export type { string_file_extension }; | ||
export type { string_file_absolute_path }; | ||
export type { string_file_relative_path }; | ||
export type { string_file_path }; | ||
export type { string_folder_absolute_path }; | ||
export type { string_folder_relative_path }; | ||
export type { string_folder_path }; | ||
export type { string_filename }; | ||
export type { string_person_fullname }; | ||
export type { string_person_profile }; | ||
export type { string_license }; | ||
export type { string_attribute }; | ||
export type { string_attribute_value_scope }; | ||
export type { string_color }; | ||
export type { string_translate_name }; | ||
export type { string_translate_name_not_normalized }; | ||
export type { string_translate_language }; | ||
export type { string_javascript_name }; | ||
export type { string_token }; | ||
export type { string_license_token }; | ||
export type { string_password }; | ||
export type { string_ssh_key }; | ||
export type { string_pgp_key }; | ||
export type { string_date_iso8601 }; | ||
export type { number_usd }; | ||
export type { number_id }; | ||
export type { number_linecol_number }; | ||
export type { number_tokens }; | ||
export type { number_positive }; | ||
export type { number_negative }; | ||
export type { number_integer }; | ||
export type { number_percent }; | ||
export type { number_model_temperature }; | ||
export type { number_seed }; | ||
export type { number_likeness }; | ||
export type { number_miliseconds }; | ||
export type { number_seconds }; | ||
export type { number_minutes }; | ||
export type { number_hours }; | ||
export type { number_days }; | ||
export type { number_weeks }; | ||
export type { number_months }; | ||
export type { number_years }; | ||
export type { number_bytes }; | ||
export type { number_kilobytes }; | ||
export type { number_megabytes }; | ||
export type { number_gigabytes }; | ||
export type { number_terabytes }; | ||
export type { FromtoItems }; | ||
export type { CodeBlock }; | ||
export type { MarkdownSection }; | ||
export type { string_keyword }; | ||
export type { IKeywords }; | ||
export type { string_kebab_case }; | ||
export type { string_camelCase }; | ||
export type { string_PascalCase }; | ||
export type { string_SCREAMING_CASE }; | ||
export type { string_snake_case }; | ||
export type { ___ }; | ||
export type { really_any }; | ||
export type { really_unknown }; | ||
export type { TODO_any }; | ||
export type { TODO_object }; | ||
export type { TODO_unknown }; | ||
export type { string_promptbook_version }; |
@@ -1,2 +0,2 @@ | ||
import { spaceTrim } from 'spacetrim'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { renderPromptbookMermaid } from '../conversion/prettify/renderPipelineMermaidOptions'; | ||
@@ -11,2 +11,4 @@ import { extractParameterNamesFromPromptTemplate } from '../conversion/utils/extractParameterNamesFromPromptTemplate'; | ||
import { $currentDate } from '../utils/currentDate'; | ||
import { deepClone } from '../utils/deepClone'; | ||
import { deepFreezeWithSameType } from '../utils/deepFreeze'; | ||
import { countCharacters } from '../utils/expectation-counters/countCharacters'; | ||
@@ -16,19 +18,27 @@ import { countLines } from '../utils/expectation-counters/countLines'; | ||
import { countParagraphs } from '../utils/expectation-counters/countParagraphs'; | ||
import { countSentences, splitIntoSentences } from '../utils/expectation-counters/countSentences'; | ||
import { splitIntoSentences } from '../utils/expectation-counters/countSentences'; | ||
import { countSentences } from '../utils/expectation-counters/countSentences'; | ||
import { countWords } from '../utils/expectation-counters/countWords'; | ||
import { CountUtils } from '../utils/expectation-counters/index'; | ||
import { extractParameterNames } from '../utils/extractParameterNames'; | ||
import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS'; | ||
import type { IKeywords, string_keyword } from '../utils/normalization/IKeywords'; | ||
import { isRunningInBrowser } from '../utils/isRunningInWhatever'; | ||
import { isRunningInNode } from '../utils/isRunningInWhatever'; | ||
import { isRunningInWebWorker } from '../utils/isRunningInWhatever'; | ||
import { capitalize } from '../utils/normalization/capitalize'; | ||
import { decapitalize } from '../utils/normalization/decapitalize'; | ||
import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS'; | ||
import type { string_keyword } from '../utils/normalization/IKeywords'; | ||
import type { IKeywords } from '../utils/normalization/IKeywords'; | ||
import { isValidKeyword } from '../utils/normalization/isValidKeyword'; | ||
import { nameToUriPart } from '../utils/normalization/nameToUriPart'; | ||
import { nameToUriParts } from '../utils/normalization/nameToUriParts'; | ||
import { normalizeToKebabCase, string_kebab_case } from '../utils/normalization/normalize-to-kebab-case'; | ||
import { normalizeTo_PascalCase, string_PascalCase } from '../utils/normalization/normalizeTo_PascalCase'; | ||
import { normalizeTo_SCREAMING_CASE, string_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import { normalizeTo_camelCase, string_camelCase } from '../utils/normalization/normalizeTo_camelCase'; | ||
import { normalizeTo_snake_case, string_snake_case } from '../utils/normalization/normalizeTo_snake_case'; | ||
import { normalizeWhitespaces } from '../utils/normalization/normalizeWhitespaces'; | ||
import type { string_kebab_case } from '../utils/normalization/normalize-to-kebab-case'; | ||
import { normalizeToKebabCase } from '../utils/normalization/normalize-to-kebab-case'; | ||
import type { string_camelCase } from '../utils/normalization/normalizeTo_camelCase'; | ||
import { normalizeTo_camelCase } from '../utils/normalization/normalizeTo_camelCase'; | ||
import type { string_PascalCase } from '../utils/normalization/normalizeTo_PascalCase'; | ||
import { normalizeTo_PascalCase } from '../utils/normalization/normalizeTo_PascalCase'; | ||
import type { string_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import { normalizeTo_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import { normalizeTo_snake_case } from '../utils/normalization/normalizeTo_snake_case'; | ||
import { parseKeywords } from '../utils/normalization/parseKeywords'; | ||
@@ -58,23 +68,66 @@ import { parseKeywordsFromString } from '../utils/normalization/parseKeywordsFromString'; | ||
import { isValidUuid } from '../utils/validators/uuid/isValidUuid'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { forEachAsync, PROMPTBOOK_VERSION }; | ||
export { extractParameterNames, extractVariables, replaceParameters, spaceTrim }; | ||
export { $currentDate, $randomSeed, extractBlock, // <- [🌻] + maybe export through `@promptbook/markdown-utils` | ||
isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [🌻] | ||
removeEmojis, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, }; | ||
export { countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords }; | ||
export { PROMPTBOOK_VERSION }; | ||
export { renderPromptbookMermaid }; | ||
export { extractParameterNamesFromPromptTemplate }; | ||
export { extractVariables }; | ||
export { renameParameter }; | ||
export { titleToName }; | ||
export { forEachAsync }; | ||
export { isValidJsonString }; | ||
export { extractBlock }; | ||
export { $currentDate }; | ||
export { deepClone }; | ||
export { deepFreezeWithSameType }; | ||
export { countCharacters }; | ||
export { countLines }; | ||
export { countPages }; | ||
export { countParagraphs }; | ||
export { splitIntoSentences }; | ||
export declare const normalizeTo: { | ||
camelCase: typeof normalizeTo_camelCase; | ||
PascalCase: typeof normalizeTo_PascalCase; | ||
SCREAMING_CASE: typeof normalizeTo_SCREAMING_CASE; | ||
snake_case: typeof normalizeTo_snake_case; | ||
'kebab-case': typeof normalizeToKebabCase; | ||
}; | ||
export { capitalize, decapitalize, DIACRITIC_VARIANTS_LETTERS, IKeywords, isValidKeyword, nameToUriPart, nameToUriParts, normalizeTo_camelCase, normalizeTo_PascalCase, normalizeTo_SCREAMING_CASE, normalizeTo_snake_case, normalizeToKebabCase, normalizeWhitespaces, parseKeywords, parseKeywordsFromString, removeDiacritics, searchKeywords, string_keyword, titleToName, }; | ||
export type { string_camelCase, string_kebab_case, string_PascalCase, string_SCREAMING_CASE, string_snake_case }; | ||
export { extractParameterNamesFromPromptTemplate, renameParameter, renderPromptbookMermaid }; | ||
export { difference, intersection, union }; | ||
/** | ||
* Note: [🕙] It does not make sence to have simple lower / UPPER case normalization | ||
*/ | ||
export { countSentences }; | ||
export { countWords }; | ||
export { CountUtils }; | ||
export { extractParameterNames }; | ||
export { isRunningInBrowser }; | ||
export { isRunningInNode }; | ||
export { isRunningInWebWorker }; | ||
export { capitalize }; | ||
export { decapitalize }; | ||
export { DIACRITIC_VARIANTS_LETTERS }; | ||
export type { string_keyword }; | ||
export type { IKeywords }; | ||
export { isValidKeyword }; | ||
export { nameToUriPart }; | ||
export { nameToUriParts }; | ||
export type { string_kebab_case }; | ||
export { normalizeToKebabCase }; | ||
export type { string_camelCase }; | ||
export { normalizeTo_camelCase }; | ||
export type { string_PascalCase }; | ||
export { normalizeTo_PascalCase }; | ||
export type { string_SCREAMING_CASE }; | ||
export { normalizeTo_SCREAMING_CASE }; | ||
export { normalizeTo_snake_case }; | ||
export { parseKeywords }; | ||
export { parseKeywordsFromString }; | ||
export { removeDiacritics }; | ||
export { searchKeywords }; | ||
export { parseNumber }; | ||
export { $randomSeed }; | ||
export { removeEmojis }; | ||
export { removeQuotes }; | ||
export { replaceParameters }; | ||
export { difference }; | ||
export { intersection }; | ||
export { union }; | ||
export { trimCodeBlock }; | ||
export { trimEndOfCodeBlock }; | ||
export { unwrapResult }; | ||
export { isValidFilePath }; | ||
export { isValidJavascriptName }; | ||
export { isValidPromptbookVersion }; | ||
export { isValidSemanticVersion }; | ||
export { isHostnameOnPrivateNetwork }; | ||
export { isUrlOnPrivateNetwork }; | ||
export { isValidPipelineUrl }; | ||
export { isValidUrl }; | ||
export { isValidUuid }; |
@@ -7,2 +7,4 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* Note: Functions `collectionToJson` and `createCollectionFromJson` are complementary | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -9,0 +11,0 @@ export declare function collectionToJson(collection: PipelineCollection): Promise<Array<PipelineJson>>; |
@@ -42,2 +42,3 @@ import type { PipelineStringToJsonOptions } from '../../conversion/pipelineStringToJson'; | ||
* @returns PipelineCollection | ||
* @public exported from `@promptbook/node` | ||
*/ | ||
@@ -44,0 +45,0 @@ export declare function createCollectionFromDirectory(path: string_folder_path, options?: CreatePipelineCollectionFromDirectoryOptions): Promise<PipelineCollection>; |
@@ -11,3 +11,4 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
* @returns PipelineCollection | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function createCollectionFromJson(...promptbooks: Array<PipelineJson>): PipelineCollection; |
@@ -21,3 +21,4 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
* @deprecated Do not use, it will became internal tool for other constructor functions | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function createCollectionFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PipelineJson>> | (() => Promise<Array<PipelineJson>>)): PipelineCollection; |
@@ -22,4 +22,4 @@ import type { string_url } from '../../types/typeAliases'; | ||
* Constructs Promptbook from remote Promptbase URL | ||
* @returns PipelineCollection | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -26,0 +26,0 @@ export declare function createCollectionFromUrl(url: string_url | URL, options: CreatePipelineCollectionFromUrlyOptions): Promise<PipelineCollection>; |
@@ -11,3 +11,4 @@ import type { string_pipeline_url } from '../../types/typeAliases'; | ||
* @returns PipelineCollection | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function createSubcollection(collection: PipelineCollection, predicate: (url: string_pipeline_url) => boolean): PipelineCollection; |
@@ -6,2 +6,3 @@ import type { TupleToUnion } from 'type-fest'; | ||
* @see https://github.com/webgptorg/promptbook#block-type | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -13,3 +14,4 @@ export type BlockType = TupleToUnion<typeof BlockTypes>; | ||
* @see https://github.com/webgptorg/promptbook#block-type | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare const BlockTypes: readonly ["PROMPT_TEMPLATE", "SIMPLE_TEMPLATE", "SCRIPT", "PROMPT_DIALOG", "SAMPLE", "KNOWLEDGE", "INSTRUMENT", "ACTION"]; |
/** | ||
* The maximum number of iterations for a loops | ||
* | ||
* @private within the repository - too low-level in comparison to other `MAX_...` | ||
*/ | ||
@@ -7,2 +9,4 @@ export declare const LOOP_LIMIT = 1000; | ||
* The maximum number of iterations for a loops which adds characters one by one | ||
* | ||
* @private within the repository - too low-level in comparison to other `MAX_...` | ||
*/ | ||
@@ -12,2 +16,4 @@ export declare const CHARACTER_LOOP_LIMIT = 100000; | ||
* The maximum number of (LLM) tasks running in parallel | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -17,2 +23,4 @@ export declare const MAX_PARALLEL_COUNT = 5; | ||
* The maximum number of attempts to execute LLM task before giving up | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -22,2 +30,4 @@ export declare const MAX_EXECUTION_ATTEMPTS = 3; | ||
* The maximum length of the (generated) filename | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -28,2 +38,4 @@ export declare const MAX_FILENAME_LENGTH = 30; | ||
* TODO: [🐝] !!! Use | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -34,2 +46,4 @@ export declare const MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3; | ||
* TODO: [🐝] !!! Use | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -39,2 +53,4 @@ export declare const MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = 200; | ||
* Where to store the cache of executions for promptbook CLI | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -44,2 +60,4 @@ export declare const EXECUTIONS_CACHE_DIRNAME = "/.promptbook/executions-cache"; | ||
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -53,2 +71,4 @@ export declare const PIPELINE_COLLECTION_BASE_FILENAME = "index"; | ||
* The names of the parameters that are reserved for special purposes | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -58,2 +78,4 @@ export declare const RESERVED_PARAMETER_NAMES: readonly ["content", "context", "knowledge", "samples", "modelName", "currentDate"]; | ||
* @@@ | ||
* | ||
* @private within the repository | ||
*/ | ||
@@ -63,2 +85,4 @@ export declare const RESERVED_PARAMETER_MISSING_VALUE: string; | ||
* @@@ | ||
* | ||
* @private within the repository | ||
*/ | ||
@@ -68,6 +92,8 @@ export declare const RESERVED_PARAMETER_RESTRICTED: string; | ||
* @@@ | ||
* | ||
* @private within the repository | ||
*/ | ||
export declare const DEBUG_ALLOW_PAYED_TESTING: boolean; | ||
/** | ||
* TODO: [🔼] Export all to core | ||
* TODO: !!!!!! Check that all @private contains some normalized explanation | ||
*/ |
@@ -8,2 +8,3 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* @returns Promptbook in string format (.ptbk.md) | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -10,0 +11,0 @@ export declare function pipelineJsonToString(pipelineJson: PipelineJson): PipelineString; |
@@ -6,2 +6,4 @@ import type { LlmExecutionTools } from '../execution/LlmExecutionTools'; | ||
* Options for `pipelineStringToJson` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -24,2 +26,5 @@ export type PipelineStringToJsonOptions = { | ||
* | ||
* Note: This function does not validate logic of the pipeline only the syntax | ||
* Note: This function acts as compilation process | ||
* | ||
* @param pipelineString {Promptbook} in string markdown format (.ptbk.md) | ||
@@ -29,5 +34,3 @@ * @param options - Options and tools for the compilation | ||
* @throws {ParsingError} if the promptbook string is not valid | ||
* | ||
* Note: This function does not validate logic of the pipeline only the syntax | ||
* Note: This function acts as compilation process | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -34,0 +37,0 @@ export declare function pipelineStringToJson(pipelineString: PipelineString, options?: PipelineStringToJsonOptions): Promise<PipelineJson>; |
@@ -11,8 +11,9 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* | ||
* Note: This function does not validate logic of the pipeline only the syntax | ||
* Note: This function acts as compilation process | ||
* | ||
* @param pipelineString {Promptbook} in string markdown format (.ptbk.md) | ||
* @returns {Promptbook} compiled in JSON format (.ptbk.json) | ||
* @throws {ParsingError} if the promptbook string is not valid | ||
* | ||
* Note: This function does not validate logic of the pipeline only the syntax | ||
* Note: This function acts as compilation process | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -19,0 +20,0 @@ export declare function pipelineStringToJsonSync(pipelineString: PipelineString): PipelineJson; |
@@ -5,2 +5,4 @@ import type { PipelineString } from '../../types/PipelineString'; | ||
* Prettyfies Promptbook string and adds Mermaid graph | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -7,0 +9,0 @@ export declare function prettifyPipelineString(pipelineString: PipelineString, options: PrettifyOptions): Promise<PipelineString>; |
@@ -20,2 +20,4 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
* Note: The result is not wrapped in a Markdown code block | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -22,0 +24,0 @@ export declare function renderPromptbookMermaid(pipelineJson: PipelineJson, options?: renderPipelineMermaidOptions): string; |
@@ -9,2 +9,3 @@ import type { PromptTemplateJson } from '../../types/PipelineJson/PromptTemplateJson'; | ||
* @throws {ParsingError} if the script is invalid | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -11,0 +12,0 @@ export declare function extractParameterNamesFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>; |
@@ -9,2 +9,3 @@ import type { string_javascript } from '../../types/typeAliases'; | ||
* @throws {ParsingError} if the script is invalid | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -11,0 +12,0 @@ export declare function extractVariables(script: string_javascript): Set<string_javascript_name>; |
@@ -23,4 +23,5 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
* @throws {PipelineLogicError} If the new parameter name is already used in the pipeline | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function renameParameter(options: RenameParameterOptions): PipelineJson; | ||
export {}; |
@@ -7,2 +7,4 @@ import type { string_json } from '../../types/typeAliases'; | ||
* Note: In contrast to JSON.stringify, this function ensures that **embedding index** is on single line | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -9,0 +11,0 @@ export declare function stringifyPipelineJson<TType>(pipeline: TType): string_json<TType>; |
/** | ||
* Function normalizes title to name which can be used as identifier | ||
* @@@ | ||
* | ||
* @param value @@@ | ||
* @returns @@@ | ||
* @example @@@ | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function titleToName(value: string): string; |
@@ -15,2 +15,3 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
* @throws {PipelineLogicError} on logical error in the pipeline | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -17,0 +18,0 @@ export declare function validatePipeline(pipeline: PipelineJson): PipelineJson; |
/** | ||
* This error indicates that the pipeline collection cannot be propperly loaded | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class CollectionError extends Error { |
/** | ||
* This error type indicates that you try to use a feature that is not available in the current environment | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class EnvironmentMismatchError extends Error { |
/** | ||
* This error type indicates that some limit was reached | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class LimitReachedError extends Error { |
/** | ||
* This error indicates that promptbook not found in the collection | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class NotFoundError extends Error { |
/** | ||
* This error type indicates that some part of the code is not implemented yet | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class NotYetImplementedError extends Error { |
/** | ||
* This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class ParsingError extends Error { |
/** | ||
* This error indicates errors during the execution of the pipeline | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class PipelineExecutionError extends Error { |
/** | ||
* This error indicates that the promptbook object has valid syntax but contains logical errors (like circular dependencies) | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class PipelineLogicError extends Error { |
/** | ||
* This error indicates errors in referencing promptbooks between each other | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class ReferenceError extends Error { |
/** | ||
* This error type indicates that the error should not happen and its last check before crashing with some other error | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class UnexpectedError extends Error { |
import type { string_semantic_version } from '../types/typeAliases'; | ||
/** | ||
* This error type indicates that the version of the pipeline is not matching the expected version | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -5,0 +7,0 @@ export declare class VersionMismatchError extends Error { |
@@ -7,2 +7,3 @@ import type { PipelineExecutor } from './PipelineExecutor'; | ||
* @throws {PipelineExecutionError} If the execution is not successful or if multiple errors occurred | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -9,0 +10,0 @@ export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PipelineExecutor>>, 'isSuccessful' | 'errors'>): void; |
@@ -56,2 +56,3 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* @throws {PipelineLogicError} on logical error in the pipeline | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -58,0 +59,0 @@ export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor; |
import type { EmbeddingVector } from './EmbeddingVector'; | ||
/** | ||
* Pretty print an embedding vector for logging | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function embeddingVectorToString(embeddingVector: EmbeddingVector): string; |
@@ -5,3 +5,3 @@ import type { PromptResultUsage } from '../PromptResultUsage'; | ||
* | ||
* TODO: [🔼] Export with addUsage | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -63,3 +63,5 @@ export declare const ZERO_USAGE: import("type-fest/source/readonly-deep").ReadonlyObjectDeep<{ | ||
* Note: If you provide 0 values, it returns ZERO_USAGE | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function addUsage(...usageItems: Array<PromptResultUsage>): PromptResultUsage; |
@@ -11,2 +11,3 @@ import type { Expectations } from '../../types/PipelineJson/Expectations'; | ||
* @returns {void} Nothing | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -22,2 +23,3 @@ export declare function checkExpectations(expectations: Expectations, value: string): void; | ||
* @returns {boolean} True if the expectations are met | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -24,0 +26,0 @@ export declare function isPassingExpectations(expectations: Expectations, value: string): boolean; |
@@ -16,4 +16,5 @@ import type { Promisable } from 'type-fest'; | ||
* @param callbackfunction - Function to call for each item | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function forEachAsync<TItem>(array: Array<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: Array<TItem>) => Promisable<void>): Promise<void>; | ||
export {}; |
@@ -5,2 +5,4 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* Function `usageToHuman` will take usage and convert it to human readable report | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -7,0 +9,0 @@ export declare function usageToHuman(usage: PromptResultUsage): string_markdown; |
@@ -9,3 +9,5 @@ import type { PromptResultUsage } from '../PromptResultUsage'; | ||
* - https://www.originalnitonery.cz/blog/psani-vsemi-deseti-se-muzete-naucit-i-sami-doma | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function usageToWorktime(usage: PromptResultUsage): UncertainNumber; |
@@ -7,2 +7,3 @@ import type { string_mime_type } from '../../types/typeAliases'; | ||
* @see https://github.com/webgptorg/promptbook/discussions/36 | ||
* @private still an internal experimental | ||
*/ | ||
@@ -70,2 +71,2 @@ export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends string, TSchema extends object> = { | ||
* TODO: [🍓][🔼] Export via some package | ||
*/ | ||
*/ |
/** | ||
* Function isValidJsonString will tell you if the string is valid JSON or not | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidJsonString(value: string): boolean; |
@@ -7,2 +7,4 @@ import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools'; | ||
* You need to provide your own implementation of this callback function and its bind to UI. | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -9,0 +11,0 @@ export declare class CallbackInterfaceTools implements UserInterfaceTools { |
@@ -6,2 +6,4 @@ import type { Promisable } from 'type-fest'; | ||
* Options for `CallbackInterfaceTools` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -8,0 +10,0 @@ export type CallbackInterfaceToolsOptions = CommonExecutionToolsOptions & { |
@@ -9,2 +9,4 @@ import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions'; | ||
* **NOT intended to use in the production** due to its synchronous nature. | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -21,2 +23,2 @@ export declare class SimplePromptInterfaceTools implements UserInterfaceTools { | ||
* Note: [🔵] This code should never be published outside of `@promptbook/browser` | ||
*/ | ||
*/ |
@@ -8,6 +8,6 @@ import type { PrepareOptions } from '../../../prepare/PrepareOptions'; | ||
* @see https://github.com/webgptorg/promptbook/discussions/41 | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function prepareKnowledgePieces(knowledgeSources: Array<KnowledgeSourceJson>, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'preparationIds'>>>; | ||
/** | ||
* TODO: [🐝][🔼] !!! Export via `@promptbook/core` | ||
* TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time | ||
@@ -14,0 +14,0 @@ * Put `knowledgePieces` into `PrepareKnowledgeOptions` |
@@ -10,2 +10,7 @@ import type { Promisable } from 'type-fest'; | ||
import type { really_unknown } from '../../../utils/organization/really_unknown'; | ||
/** | ||
* @@@ | ||
* | ||
* @private still an internal experimental | ||
*/ | ||
export type Scraper = { | ||
@@ -18,2 +23,7 @@ readonly description: string_markdown_text; | ||
}; | ||
/** | ||
* @@@ | ||
* | ||
* @private still an internal experimental | ||
*/ | ||
export type ScraperSourceOptions = { | ||
@@ -20,0 +30,0 @@ readonly source: string_knowledge_source_link; |
@@ -6,2 +6,4 @@ import type { PrepareOptions } from '../../../prepare/PrepareOptions'; | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -8,0 +10,0 @@ export declare function prepareKnowledgeFromMarkdown(knowledgeContent: string_markdown, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>; |
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
/** | ||
* @privxxate <- TODO: !!!!!! Warn that not private or exported | ||
*/ | ||
export type CreateLlmToolsFromEnvOptions = { | ||
@@ -22,2 +25,3 @@ /** | ||
* @returns @@@ | ||
* @public exported from `@promptbook/node` | ||
*/ | ||
@@ -27,3 +31,2 @@ export declare function createLlmToolsFromEnv(options?: CreateLlmToolsFromEnvOptions): LlmExecutionTools; | ||
* TODO: [🍜] Use `createLlmToolsFromConfiguration` | ||
* TODO: [🔼] !!! Export via `@promptbook/node` | ||
* TODO: @@@ write discussion about this - wizzard | ||
@@ -30,0 +33,0 @@ * TODO: Add Azure |
@@ -10,6 +10,6 @@ import type { LlmExecutionTools } from '../../../../execution/LlmExecutionTools'; | ||
* @returns LLM tools with same functionality with added total cost counting | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function cacheLlmTools<TLlmTools extends LlmExecutionTools>(llmTools: TLlmTools, options?: Partial<CacheLlmToolsOptions>): TLlmTools; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
* TODO: [🧠][💸] Maybe make some common abstraction `interceptLlmTools` and use here (or use javascript Proxy?) | ||
@@ -16,0 +16,0 @@ * TODO: [🧠] Is there some meaningfull way how to test this util |
@@ -8,6 +8,6 @@ import type { LlmExecutionTools } from '../../../../execution/LlmExecutionTools'; | ||
* @returns LLM tools with same functionality with added total cost counting | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function countTotalUsage(llmTools: LlmExecutionTools): LlmExecutionToolsWithTotalUsage; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbookcore/` | ||
* TODO: [🧠][💸] Maybe make some common abstraction `interceptLlmTools` and use here (or use javascript Proxy?) | ||
@@ -14,0 +14,0 @@ * TODO: [🧠] Is there some meaningfull way how to test this util |
@@ -25,2 +25,4 @@ import type { LlmExecutionTools } from '../../../../execution/LlmExecutionTools'; | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -30,3 +32,2 @@ export declare function limitTotalUsage(llmTools: LlmExecutionTools, options?: Partial<LimitTotalUsageOptions>): LlmExecutionToolsWithTotalUsage; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbookcore/` | ||
* TODO: Maybe internally use `countTotalUsage` | ||
@@ -33,0 +34,0 @@ * TODO: [🧠][💸] Maybe make some common abstraction `interceptLlmTools` and use here (or use javascript Proxy?) |
@@ -11,2 +11,4 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
* Execution Tools for calling Anthropic Claude API. | ||
* | ||
* @public exported from `@promptbook/anthropic-claude` | ||
*/ | ||
@@ -13,0 +15,0 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools { |
@@ -7,2 +7,3 @@ import type { ClientOptions } from '@anthropic-ai/sdk'; | ||
* This extends Anthropic's `ClientOptions` with are directly passed to the Anthropic client. | ||
* @public exported from `@promptbook/anthropic-claude` | ||
*/ | ||
@@ -12,2 +13,2 @@ export type AnthropicClaudeExecutionToolsOptions = CommonExecutionToolsOptions & ClientOptions; | ||
* TODO: [🍜] Auto add WebGPT / Promptbook.studio anonymous server in browser | ||
*/ | ||
*/ |
@@ -12,2 +12,4 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
* Execution Tools for calling Azure OpenAI API. | ||
* | ||
* @public exported from `@promptbook/azure-openai` | ||
*/ | ||
@@ -14,0 +16,0 @@ export declare class AzureOpenAiExecutionTools implements LlmExecutionTools { |
@@ -8,2 +8,3 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions'; | ||
* @see https://oai.azure.com/portal/ | ||
* @public exported from `@promptbook/azure-openai` | ||
*/ | ||
@@ -10,0 +11,0 @@ export type AzureOpenAiExecutionToolsOptions = CommonExecutionToolsOptions & { |
@@ -8,2 +8,4 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
* Execution Tools for calling OpenAI API. | ||
* | ||
* @public exported from `@promptbook/langtail` | ||
*/ | ||
@@ -10,0 +12,0 @@ export declare class LangtailExecutionTools extends OpenAiExecutionTools implements LlmExecutionTools { |
@@ -7,2 +7,4 @@ import type { OpenAiExecutionToolsOptions } from '../openai/OpenAiExecutionToolsOptions'; | ||
* Rest is used by the `OpenAiExecutionTools`. | ||
* | ||
* @public exported from `@promptbook/langtail` | ||
*/ | ||
@@ -9,0 +11,0 @@ export type LangtailExecutionToolsOptions = OpenAiExecutionToolsOptions; |
@@ -12,2 +12,4 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions'; | ||
* Mocked execution Tools for just echoing the requests for testing purposes. | ||
* | ||
* @public exported from `@promptbook/fake-llm` | ||
*/ | ||
@@ -14,0 +16,0 @@ export declare class MockedEchoLlmExecutionTools implements LlmExecutionTools { |
@@ -13,2 +13,4 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions'; | ||
* Mocked execution Tools for just faking expected responses for testing purposes | ||
* | ||
* @public exported from `@promptbook/fake-llm` | ||
*/ | ||
@@ -15,0 +17,0 @@ export declare class MockedFackedLlmExecutionTools implements LlmExecutionTools { |
@@ -15,2 +15,4 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
* Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -17,0 +19,0 @@ export declare function joinLlmExecutionTools(...llmExecutionTools: Array<LlmExecutionTools>): MultipleLlmExecutionTools; |
@@ -10,2 +10,3 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
* @see https://openai.com/api/pricing/ | ||
* @public exported from `@promptbook/openai` | ||
*/ | ||
@@ -12,0 +13,0 @@ export declare const OPENAI_MODELS: Array<AvailableModel & { |
@@ -13,2 +13,4 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
* Execution Tools for calling OpenAI API. | ||
* | ||
* @public exported from `@promptbook/openai` | ||
*/ | ||
@@ -15,0 +17,0 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools { |
@@ -9,2 +9,4 @@ import type { ClientOptions } from 'openai'; | ||
* Rest is used by the `OpenAiExecutionTools`. | ||
* | ||
* @public exported from `@promptbook/openai` | ||
*/ | ||
@@ -11,0 +13,0 @@ export type OpenAiExecutionToolsOptions = CommonExecutionToolsOptions & ClientOptions & { |
@@ -6,2 +6,8 @@ import type { PipelineCollection } from '../../../collection/PipelineCollection'; | ||
import type { string_uri } from '../../../types/typeAliases'; | ||
/** | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/remote-client` | ||
* @public exported from `@promptbook/remote-server` | ||
*/ | ||
export type RemoteServerOptions = CommonExecutionToolsOptions & { | ||
@@ -32,2 +38,2 @@ /** | ||
* TODO: [🍜] Add anonymous option | ||
*/ | ||
*/ |
@@ -20,2 +20,3 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
* @see https://github.com/webgptorg/promptbook#remote-server | ||
* @public exported from `@promptbook/remote-client` | ||
*/ | ||
@@ -22,0 +23,0 @@ export declare class RemoteLlmExecutionTools implements LlmExecutionTools { |
@@ -6,2 +6,4 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions'; | ||
* Options for `RemoteLlmExecutionTools` | ||
* | ||
* @public exported from `@promptbook/remote-client` | ||
*/ | ||
@@ -8,0 +10,0 @@ export type RemoteLlmExecutionToolsOptions = CommonExecutionToolsOptions & { |
@@ -10,2 +10,3 @@ import type { IDestroyable } from 'destroyable'; | ||
* @see https://github.com/webgptorg/promptbook#remote-server | ||
* @public exported from `@promptbook/remote-server` | ||
*/ | ||
@@ -12,0 +13,0 @@ export declare function startRemoteServer(options: RemoteServerOptions): IDestroyable; |
@@ -8,6 +8,6 @@ import type { PrepareOptions } from '../prepare/PrepareOptions'; | ||
* @see https://github.com/webgptorg/promptbook/discussions/22 | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function preparePersona(personaDescription: string_persona_description, options: PrepareOptions): Promise<PersonaPreparedJson['modelRequirements']>; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
* TODO: [🏢] !! Check validity of `modelName` in pipeline | ||
@@ -14,0 +14,0 @@ * TODO: [🏢] !! Check validity of `systemMessage` in pipeline |
@@ -11,3 +11,8 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function extractBlock(markdown: string_markdown): string; | ||
/** | ||
* TODO: [🧠][🌻] Maybe export through `@promptbook/markdown-utils` not `@promptbook/utils` | ||
*/ |
import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
/** | ||
* Determine if the pipeline is fully prepared | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -8,3 +10,2 @@ export declare function isPipelinePrepared(pipeline: PipelineJson): boolean; | ||
* TODO: [🐠] Maybe base this on `makeValidator` | ||
* TODO: [🔼] Export via core or utils | ||
* TODO: [🧊] Pipeline can be partially prepared, this should return true ONLY if fully prepared | ||
@@ -11,0 +12,0 @@ * TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline` |
@@ -8,6 +8,6 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* Note: This function acts as part of compilation process | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function preparePipeline(pipeline: PipelineJson, options: PrepareOptions): Promise<PipelineJson>; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
* TODO: Write tests for `preparePipeline` | ||
@@ -14,0 +14,0 @@ * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch |
@@ -18,2 +18,4 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -26,3 +28,2 @@ export declare function prepareTemplates(pipeline: PrepareTemplateInput, options: PrepareOptions): Promise<PreparedTemplates>; | ||
* TODO: [♨] !!! Prepare index the samples and maybe templates | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
* TODO: Write tests for `preparePipeline` | ||
@@ -29,0 +30,0 @@ * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch |
import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
/** | ||
* Unprepare just strips the preparation data of the pipeline | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function unpreparePipeline(pipeline: PipelineJson): PipelineJson; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
* TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline` | ||
@@ -9,0 +10,0 @@ * TODO: Write tests for `preparePipeline` |
@@ -8,2 +8,4 @@ import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../../execution/ScriptExecutionTools'; | ||
* **NOT intended to use in the production** due to its unsafe nature, use `JavascriptExecutionTools` instead. | ||
* | ||
* @public exported from `@promptbook/execute-javascript` | ||
*/ | ||
@@ -10,0 +12,0 @@ export declare class JavascriptEvalExecutionTools implements ScriptExecutionTools { |
@@ -6,3 +6,4 @@ import { JavascriptEvalExecutionTools } from './JavascriptEvalExecutionTools'; | ||
* @alias JavascriptExecutionTools | ||
* @public exported from `@promptbook/execute-javascript` | ||
*/ | ||
export declare const JavascriptExecutionTools: typeof JavascriptEvalExecutionTools; |
@@ -23,4 +23,3 @@ import { Promisable } from 'type-fest'; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/types` | ||
* TODO: [🧠][🛫] Constrain `TItem` to JSON-serializable objects only | ||
*/ |
@@ -5,2 +5,4 @@ import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/node` | ||
*/ | ||
@@ -28,5 +30,4 @@ export declare class FilesStorage<TItem> implements PromptbookStorage<TItem> { | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/node` | ||
* TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values | ||
* Note: [🟢] This code should never be published outside of `@promptbook/node` | ||
*/ |
@@ -11,4 +11,1 @@ import type { string_folder_path } from '../../types/typeAliases'; | ||
}; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/types` | ||
*/ |
import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
/** | ||
* Gets wrapper around `localStorage` object which can be used as `PromptbookStorage` | ||
* | ||
* @public exported from `@promptbook/browser` | ||
*/ | ||
export declare function getLocalStorage<TItem>(): PromptbookStorage<TItem>; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/browser` | ||
* Note: [🔵] This code should never be published outside of `@promptbook/browser` | ||
*/ |
import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
/** | ||
* Gets wrapper around `sessionStorage` object which can be used as `PromptbookStorage` | ||
* | ||
* @public exported from `@promptbook/browser` | ||
*/ | ||
export declare function getSessionStorage<TItem>(): PromptbookStorage<TItem>; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/browser` | ||
* Note: [🔵] This code should never be published outside of `@promptbook/browser` | ||
*/ |
import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
/** | ||
* Stores | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -32,4 +34,1 @@ export declare class MemoryStorage<TItem> implements PromptbookStorage<TItem> { | ||
} | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
*/ |
@@ -5,2 +5,4 @@ import { Promisable } from 'type-fest'; | ||
* This class behaves like LocalStorage but separates keys by prefix | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -25,4 +27,1 @@ export declare class PrefixStorage<TItem> implements PromptbookStorage<TItem> { | ||
} | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
*/ |
@@ -6,2 +6,4 @@ import type { ExecutionReportJson } from './ExecutionReportJson'; | ||
* Converts execution report from JSON to string format | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -8,0 +10,0 @@ export declare function executionReportJsonToString(executionReportJson: ExecutionReportJson, options?: Partial<ExecutionReportStringOptions>): ExecutionReportString; |
import type { number_percent } from '../typeAliases'; | ||
/** | ||
* Options for `executionReportJsonToString` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -17,2 +19,4 @@ export type ExecutionReportStringOptions = { | ||
* Default options for generating an execution report string | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -19,0 +23,0 @@ export declare const ExecutionReportStringOptionsDefaults: { |
@@ -94,3 +94,2 @@ import type { ModelVariant } from './ModelVariant'; | ||
/** | ||
* TODO: [🔼] !!!!! (<- To all [🔼]) Export all from `@promptbook/types` | ||
* TODO: [🧠][🈁] `seed` should maybe be somewhere else (not in `ModelRequirements`) (simmilar that `user` identification is not here) | ||
@@ -97,0 +96,0 @@ * TODO: [🧠][💱] Add more model options: `stop_token`, `logit_bias`, `logprobs` (`top_logprobs`), `top_k`, `top_p`, `presence_penalty`, `frequency_penalty`, `bestOf`, `logitBias`, `logitBiasType`,... |
@@ -105,3 +105,2 @@ import type { ExpectFormatCommand } from '../commands/EXPECT/ExpectFormatCommand'; | ||
/** | ||
* TODO: [🔼] !!!! Export all from `@promptbook/types` | ||
* TODO: [🧄] Replace all "github.com/webgptorg/promptbook#xxx" with "ptbk.io/xxx" | ||
@@ -108,0 +107,0 @@ * TODO: [✔] Check ModelRequirements in runtime |
@@ -175,2 +175,4 @@ import { RESERVED_PARAMETER_NAMES } from '../config'; | ||
* For example `"**Hello** World!"` | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -182,2 +184,4 @@ export type string_markdown = string; | ||
* Markdown text with exactly ONE heading on first line NO less NO more | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -190,2 +194,4 @@ export type string_markdown_section = string; | ||
* BUT with formatting, lists, blockquotes, blocks, etc. is allowed | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -200,2 +206,4 @@ export type string_markdown_section_content = string; | ||
* For example `"**Hello** World!"` | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -580,5 +588,4 @@ export type string_markdown_text = string; | ||
* TODO: !!! Change "For example" to @example | ||
* TODO: !! Cleanup | ||
* TODO: !! Change to branded types | ||
* TODO: [📂] Export all this file through `@promptbook/types` | ||
* TODO: Delete type aliases that are not exported or used internally | ||
*/ |
@@ -6,3 +6,4 @@ import type { string_date_iso8601 } from '../types/typeAliases'; | ||
* @returns string_date branded type | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function $currentDate(): string_date_iso8601; |
import type { WritableDeep } from 'type-fest'; | ||
/** | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function deepClone<TObject>(objectValue: TObject): WritableDeep<TObject>; | ||
/** | ||
* TODO: [🔼] Export from `@promptbook/utils` | ||
* TODO: [🧠] Is there a way how to meaningfully test this utility | ||
*/ |
@@ -15,2 +15,3 @@ import type { ReadonlyDeep } from 'type-fest'; | ||
* @returns The same object as the input, but deeply frozen | ||
* @public exported from `@promptbook/utils` | ||
* | ||
@@ -21,4 +22,3 @@ * Note: This function mutates the object and returns the original (but mutated-deep-freezed) object | ||
/** | ||
* TODO: [🔼] Export from `@promptbook/utils` | ||
* TODO: [🧠] Is there a way how to meaningfully test this utility | ||
*/ |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Counts number of characters in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countCharacters(text: string): ExpectationAmount; |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Counts number of lines in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countLines(text: string): ExpectationAmount; |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Counts number of pages in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countPages(text: string): ExpectationAmount; |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Counts number of paragraphs in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countParagraphs(text: string): ExpectationAmount; |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Split text into sentences | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -8,3 +10,5 @@ export declare function splitIntoSentences(text: string): Array<string>; | ||
* Counts number of sentences in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countSentences(text: string): ExpectationAmount; |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Counts number of words in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countWords(text: string): ExpectationAmount; |
@@ -5,3 +5,5 @@ import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
* Index of all counter functions | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare const CountUtils: Record<ExpectationUnit, (text: string) => ExpectationAmount>; |
@@ -8,3 +8,4 @@ import type { string_parameter_name } from '../types/typeAliases'; | ||
* @returns the list of parameter names | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function extractParameterNames(template: string_template): Set<string_parameter_name>; |
/** | ||
* Detects if the code is running in a browser environment in main thread (Not in a web worker) | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -7,2 +9,4 @@ export declare const isRunningInBrowser: Function; | ||
* Detects if the code is running in a Node.js environment | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -12,6 +16,5 @@ export declare const isRunningInNode: Function; | ||
* Detects if the code is running in a web worker | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare const isRunningInWebWorker: Function; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/utils` | ||
*/ |
@@ -6,3 +6,3 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* | ||
* @private within the repository | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -13,1 +13,4 @@ export declare function addAutoGeneratedSection(content: string_markdown, options: { | ||
}): string_markdown; | ||
/** | ||
* TODO: [🏛] This can be part of markdown builder | ||
*/ |
@@ -31,3 +31,3 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* | ||
* @private within the repository | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -34,0 +34,0 @@ export declare function createMarkdownChart(options: CreateMarkdownChartOptions): string_markdown; |
@@ -6,4 +6,7 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* | ||
* @private within the repository | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function createMarkdownTable(table: Array<Array<string_markdown_text>>): string_markdown; | ||
/** | ||
* TODO: [🏛] This can be part of markdown builder | ||
*/ |
@@ -5,3 +5,8 @@ import type { string_markdown_text } from '../../types/typeAliases'; | ||
* It is useful when you want have block in block | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function escapeMarkdownBlock(value: string_markdown_text): string_markdown_text; | ||
/** | ||
* TODO: [🏛] This can be part of markdown builder | ||
*/ |
@@ -29,3 +29,3 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* @returns code blocks with language and content | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -32,0 +32,0 @@ export declare function extractAllBlocksFromMarkdown(markdown: string_markdown): Array<CodeBlock>; |
@@ -12,4 +12,5 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* @param markdown any valid markdown | ||
* @returns | ||
* @returns @@@ | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function extractAllListItemsFromMarkdown(markdown: string_markdown): string_markdown_text[]; |
@@ -15,2 +15,3 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* @returns code block with language and content | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -17,0 +18,0 @@ export declare function extractOneBlockFromMarkdown(markdown: string_markdown): CodeBlock; |
@@ -7,5 +7,8 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* - All other headings are normalized to h2 | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function flattenMarkdown<TContent extends string_markdown>(markdown: TContent): TContent; | ||
/** | ||
* TODO: [🏛] This can be part of markdown builder | ||
* Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more | ||
@@ -12,0 +15,0 @@ * sophisticated implementation of this function through parsing markdown into JSON structure |
@@ -6,2 +6,4 @@ import type { string_markdown_section } from '../../types/typeAliases'; | ||
* Parsed markdown section | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -24,2 +26,4 @@ export type MarkdownSection = { | ||
* Parses markdown section to title its level and content | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -26,0 +30,0 @@ export declare function parseMarkdownSection(value: string_markdown_section): MarkdownSection; |
@@ -8,3 +8,4 @@ import type { string_html } from '../../types/typeAliases'; | ||
* @returns {string} The input string with all comments removed. | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function removeContentComments<TContent extends string_html | string_markdown>(content: TContent): TContent; |
@@ -7,3 +7,4 @@ import type { string_markdown_text } from '../../types/typeAliases'; | ||
* @returns {string} The input string with all Markdown tags removed. | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function removeMarkdownFormatting(str: string_markdown_text): string; |
@@ -5,5 +5,8 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* Splits the markdown into sections by headings | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function splitMarkdownIntoSections(markdown: string_markdown): Array<string_markdown_section>; | ||
/** | ||
* TODO: [🏛] This can be part of markdown builder | ||
* Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more | ||
@@ -10,0 +13,0 @@ * sophisticated implementation of this function through parsing markdown into JSON structure |
/** | ||
* Makes first letter of a string uppercase | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function capitalize(word: string): string; |
/** | ||
* Makes first letter of a string uppercase | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function decapitalize(word: string): string; |
@@ -9,3 +9,5 @@ /** | ||
* > ... | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare const DIACRITIC_VARIANTS_LETTERS: Record<string, string>; |
@@ -8,2 +8,4 @@ /** | ||
* For example `"keyword"` | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -15,2 +17,3 @@ export type string_keyword = string; | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -17,0 +20,0 @@ export type IKeywords = Set<string_keyword>; |
@@ -7,3 +7,5 @@ import type { string_keyword } from './IKeywords'; | ||
* @returns if keyword is valid or not | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidKeyword(keyword: string): keyword is string_keyword; |
@@ -0,1 +1,9 @@ | ||
/** | ||
* @@@ | ||
* | ||
* @param name @@@ | ||
* @returns @@@ | ||
* @example @@@ | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function nameToUriPart(name: string): string; |
@@ -0,1 +1,9 @@ | ||
/** | ||
* @@@ | ||
* | ||
* @param name @@@ | ||
* @returns @@@ | ||
* @example @@@ | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function nameToUriParts(name: string): string[]; |
@@ -6,4 +6,14 @@ /** | ||
* @example 'i-love-promptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export type string_kebab_case = string; | ||
/** | ||
* @@@ | ||
* | ||
* @param text @@@ | ||
* @returns @@@ | ||
* @example 'hello-world' | ||
* @example 'i-love-promptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function normalizeToKebabCase(text: string): string_kebab_case; |
@@ -6,4 +6,15 @@ /** | ||
* @example 'iLovePromptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export type string_camelCase = string; | ||
/** | ||
* @@@ | ||
* | ||
* @param text @@@ | ||
* @param _isFirstLetterCapital @@@ | ||
* @returns @@@ | ||
* @example 'helloWorld' | ||
* @example 'iLovePromptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function normalizeTo_camelCase(text: string, _isFirstLetterCapital?: boolean): string_camelCase; | ||
@@ -10,0 +21,0 @@ /** |
@@ -6,4 +6,13 @@ /** | ||
* @example 'ILovePromptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export type string_PascalCase = string; | ||
/** | ||
* | ||
* @param text @public exported from `@promptbook/utils` | ||
* @returns | ||
* @example 'HelloWorld' | ||
* @example 'ILovePromptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function normalizeTo_PascalCase(text: string): string_PascalCase; |
@@ -6,4 +6,14 @@ /** | ||
* @example 'I_LOVE_PROMPTBOOK' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export type string_SCREAMING_CASE = string; | ||
/** | ||
* @@@ | ||
* | ||
* @param text @@@ | ||
* @returns @@@ | ||
* @example 'HELLO_WORLD' | ||
* @example 'I_LOVE_PROMPTBOOK' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function normalizeTo_SCREAMING_CASE(text: string): string_SCREAMING_CASE; | ||
@@ -10,0 +20,0 @@ /** |
@@ -8,2 +8,11 @@ /** | ||
export type string_snake_case = string; | ||
/** | ||
* @@@ | ||
* | ||
* @param text @@@ | ||
* @returns @@@ | ||
* @example 'hello_world' | ||
* @example 'i_love_promptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function normalizeTo_snake_case(text: string): string_snake_case; |
@@ -10,2 +10,3 @@ import type { really_unknown } from '../organization/really_unknown'; | ||
* @returns {Set} of keywords without diacritics in lowercase | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -12,0 +13,0 @@ export declare function parseKeywords(input: really_unknown): IKeywords; |
@@ -7,3 +7,4 @@ import type { IKeywords } from './IKeywords'; | ||
* @returns {Set} of keywords without diacritics in lowercase | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function parseKeywordsFromString(input: string): IKeywords; |
/** | ||
* @@@ | ||
* | ||
* @param input @@@ | ||
* @returns @@@ | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function removeDiacritics(input: string): string; | ||
/** | ||
* TODO: [Ж] Variant for cyrillic (and in general non-latin) letters | ||
*/ |
import type { IKeywords } from './IKeywords'; | ||
/** | ||
* @@@ | ||
* | ||
* @param haystack | ||
* @param needle | ||
* @returns | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function searchKeywords(haystack: IKeywords, needle: IKeywords): boolean; |
@@ -10,3 +10,3 @@ /** | ||
* | ||
* @private within the parseCommand | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -16,2 +16,3 @@ export declare function parseNumber(value: string | number): number; | ||
* TODO: Maybe use sth. like safe-eval in fraction/calculation case @see https://www.npmjs.com/package/safe-eval | ||
* TODO: [🧠][🌻] Maybe export through `@promptbook/markdown-utils` not `@promptbook/utils` | ||
*/ |
@@ -6,3 +6,4 @@ import type { number_seed } from '../../types/typeAliases'; | ||
* Warning: This function is not cryptographically secure (it uses Math.random internally) | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function $randomSeed(): number_seed; |
@@ -6,3 +6,4 @@ /** | ||
* @returns text without emojis | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function removeEmojis(text: string): string; |
@@ -12,3 +12,4 @@ /** | ||
* @returns text without quotes | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function removeQuotes(text: string): string; |
@@ -10,3 +10,4 @@ import type { Parameters } from '../types/typeAliases'; | ||
* @throws {PipelineExecutionError} if parameter is not defined, not closed, or not opened | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function replaceParameters(template: string_template, parameters: Parameters): string; |
@@ -5,2 +5,3 @@ /** | ||
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -7,0 +8,0 @@ export declare function difference<TItem>(a: Set<TItem>, b: Set<TItem>, isEqual?: (a: TItem, b: TItem) => boolean): Set<TItem>; |
@@ -5,3 +5,4 @@ /** | ||
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function intersection<TItem>(...sets: Array<Set<TItem>>): Set<TItem>; |
@@ -5,3 +5,4 @@ /** | ||
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function union<TItem>(...sets: Array<Set<TItem>>): Set<TItem>; |
@@ -7,3 +7,4 @@ /** | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function trimCodeBlock(value: string): string; |
@@ -6,3 +6,5 @@ /** | ||
* if you want to start code block in the prompt but you don't want to end it in the result. | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function trimEndOfCodeBlock(value: string): string; |
@@ -31,2 +31,3 @@ /** | ||
* @returns text without quotes | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -33,0 +34,0 @@ export declare function unwrapResult(text: string, options?: UnwrapResultOptions): string; |
@@ -7,3 +7,4 @@ import type { string_file_path } from '../../../types/typeAliases'; | ||
* Note: This does not check if the file exists only if the path is valid | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidFilePath(filePath: really_unknown): filePath is string_file_path; |
import type { string_javascript_name } from '../../../types/typeAliases'; | ||
import type { really_unknown } from '../../organization/really_unknown'; | ||
/** | ||
* @@@ | ||
* | ||
* @param javascriptName @@@ | ||
* @returns @@@ | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidJavascriptName(javascriptName: really_unknown): javascriptName is string_javascript_name; |
@@ -12,3 +12,5 @@ import type { string_promptbook_version } from '../../../version'; | ||
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidPromptbookVersion(version: really_unknown): version is string_promptbook_version; |
@@ -9,3 +9,5 @@ import type { string_semantic_version } from '../../../types/typeAliases'; | ||
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidSemanticVersion(version: really_unknown): version is string_semantic_version; |
@@ -8,3 +8,5 @@ import type { string_hostname } from '../../../types/typeAliases'; | ||
* - `isHostnameOnPrivateNetwork` *(this one)* which tests just hostname | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isHostnameOnPrivateNetwork(hostname: string_hostname): boolean; |
@@ -11,3 +11,4 @@ import type { string_url } from '../../../types/typeAliases'; | ||
* @returns {boolean} Returns true if the IP address is reserved for private networks or localhost, otherwise false. | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isUrlOnPrivateNetwork(url: URL | string_url): boolean; |
@@ -9,2 +9,4 @@ import type { string_pipeline_url } from '../../../types/typeAliases'; | ||
* - `isValidPipelineUrl` *(this one)* which tests just pipeline URL | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -11,0 +13,0 @@ export declare function isValidPipelineUrl(url: really_unknown): url is string_pipeline_url; |
@@ -10,3 +10,5 @@ import type { string_url } from '../../../types/typeAliases'; | ||
* - `isValidPipelineUrl` *(this one)* which tests just promptbook URL | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidUrl(url: really_unknown): url is string_url; |
@@ -5,3 +5,5 @@ import type { string_uuid } from '../../../types/typeAliases'; | ||
* Checks if value is valid uuid | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidUuid(value: really_unknown): value is string_uuid; |
import type { string_semantic_version } from './types/typeAliases'; | ||
/** | ||
* The version of the Promptbook library | ||
* | ||
* @public exported from all packages | ||
*/ | ||
export declare const PROMPTBOOK_VERSION: string_promptbook_version; | ||
export type string_promptbook_version = string_semantic_version; |
{ | ||
"name": "@promptbook/remote-client", | ||
"version": "0.62.0", | ||
"version": "0.63.0-0", | ||
"description": "Supercharge your use of large language models", | ||
@@ -50,3 +50,3 @@ "private": false, | ||
"peerDependencies": { | ||
"@promptbook/core": "0.62.0" | ||
"@promptbook/core": "0.63.0-0" | ||
}, | ||
@@ -53,0 +53,0 @@ "main": "./umd/index.umd.js", |
@@ -7,2 +7,10 @@ (function (global, factory) { | ||
/** | ||
* The version of the Promptbook library | ||
* | ||
* @public exported from all packages | ||
*/ | ||
var PROMPTBOOK_VERSION = '0.62.0'; | ||
// TODO: !!!! List here all the versions and annotate + put into script | ||
/*! ***************************************************************************** | ||
@@ -79,2 +87,4 @@ Copyright (c) Microsoft Corporation. | ||
* This error indicates errors during the execution of the pipeline | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -99,2 +109,3 @@ var PipelineExecutionError = /** @class */ (function (_super) { | ||
* @see https://github.com/webgptorg/promptbook#remote-server | ||
* @public exported from `@promptbook/remote-client` | ||
*/ | ||
@@ -222,8 +233,2 @@ var RemoteLlmExecutionTools = /** @class */ (function () { | ||
/** | ||
* The version of the Promptbook library | ||
*/ | ||
var PROMPTBOOK_VERSION = '0.62.0-1'; | ||
// TODO: !!!! List here all the versions and annotate + put into script | ||
exports.PROMPTBOOK_VERSION = PROMPTBOOK_VERSION; | ||
@@ -230,0 +235,0 @@ exports.RemoteLlmExecutionTools = RemoteLlmExecutionTools; |
@@ -0,5 +1,6 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { AnthropicClaudeExecutionTools } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionTools'; | ||
import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { PROMPTBOOK_VERSION }; | ||
export { AnthropicClaudeExecutionTools, AnthropicClaudeExecutionToolsOptions }; | ||
export { AnthropicClaudeExecutionTools }; | ||
export type { AnthropicClaudeExecutionToolsOptions }; |
@@ -0,4 +1,6 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { AzureOpenAiExecutionTools } from '../llm-providers/azure-openai/AzureOpenAiExecutionTools'; | ||
import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { AzureOpenAiExecutionTools, AzureOpenAiExecutionToolsOptions, PROMPTBOOK_VERSION }; | ||
export { PROMPTBOOK_VERSION }; | ||
export { AzureOpenAiExecutionTools }; | ||
export type { AzureOpenAiExecutionToolsOptions }; |
@@ -1,10 +0,4 @@ | ||
import { promptbookCli } from '../cli/promptbookCli'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { __CLI } from '../cli/main'; | ||
export { PROMPTBOOK_VERSION }; | ||
/** | ||
* Hidden utilities which should not be used by external consumers. | ||
*/ | ||
declare const __CLI: { | ||
__initialize: typeof promptbookCli; | ||
}; | ||
export { __CLI }; |
@@ -0,1 +1,2 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { collectionToJson } from '../collection/collectionToJson'; | ||
@@ -6,5 +7,14 @@ import { createCollectionFromJson } from '../collection/constructors/createCollectionFromJson'; | ||
import { createSubcollection } from '../collection/constructors/createSubcollection'; | ||
import type { BlockType } from '../commands/BLOCK/BlockTypes'; | ||
import { BlockTypes } from '../commands/BLOCK/BlockTypes'; | ||
import { MAX_PARALLEL_COUNT } from '../config'; | ||
import { MAX_EXECUTION_ATTEMPTS } from '../config'; | ||
import { MAX_FILENAME_LENGTH } from '../config'; | ||
import { MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH } from '../config'; | ||
import { MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL } from '../config'; | ||
import { EXECUTIONS_CACHE_DIRNAME } from '../config'; | ||
import { PIPELINE_COLLECTION_BASE_FILENAME } from '../config'; | ||
import { RESERVED_PARAMETER_NAMES } from '../config'; | ||
import { pipelineJsonToString } from '../conversion/pipelineJsonToString'; | ||
import type { PipelineStringToJsonOptions } from '../conversion/pipelineStringToJson'; | ||
import { pipelineStringToJson } from '../conversion/pipelineStringToJson'; | ||
@@ -16,3 +26,6 @@ import { pipelineStringToJsonSync } from '../conversion/pipelineStringToJsonSync'; | ||
import { CollectionError } from '../errors/CollectionError'; | ||
import { EnvironmentMismatchError } from '../errors/EnvironmentMismatchError'; | ||
import { LimitReachedError } from '../errors/LimitReachedError'; | ||
import { NotFoundError } from '../errors/NotFoundError'; | ||
import { NotYetImplementedError } from '../errors/NotYetImplementedError'; | ||
import { ParsingError } from '../errors/ParsingError'; | ||
@@ -24,30 +37,91 @@ import { PipelineExecutionError } from '../errors/PipelineExecutionError'; | ||
import { VersionMismatchError } from '../errors/VersionMismatchError'; | ||
import { ExpectError } from '../errors/_ExpectError'; | ||
import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful'; | ||
import { createPipelineExecutor } from '../execution/createPipelineExecutor'; | ||
import { embeddingVectorToString } from '../execution/embeddingVectorToString'; | ||
import { ZERO_USAGE } from '../execution/utils/addUsage'; | ||
import { addUsage } from '../execution/utils/addUsage'; | ||
import { checkExpectations, isPassingExpectations } from '../execution/utils/checkExpectations'; | ||
import { checkExpectations } from '../execution/utils/checkExpectations'; | ||
import { isPassingExpectations } from '../execution/utils/checkExpectations'; | ||
import { usageToHuman } from '../execution/utils/usageToHuman'; | ||
import { usageToWorktime } from '../execution/utils/usageToWorktime'; | ||
import { usageToHuman } from '../execution/utils/usageToHuman'; | ||
import { CallbackInterfaceTools } from '../knowledge/dialogs/callback/CallbackInterfaceTools'; | ||
import type { CallbackInterfaceToolsOptions } from '../knowledge/dialogs/callback/CallbackInterfaceToolsOptions'; | ||
import { SimplePromptInterfaceTools } from '../knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools'; | ||
import { prepareKnowledgePieces } from '../knowledge/prepare-knowledge/_common/prepareKnowledgePieces'; | ||
import { prepareKnowledgeFromMarkdown } from '../knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown'; | ||
import { cacheLlmTools } from '../llm-providers/_common/utils/cache/cacheLlmTools'; | ||
import { countTotalUsage } from '../llm-providers/_common/utils/count-total-usage/countTotalUsage'; | ||
import { limitTotalUsage } from '../llm-providers/_common/utils/count-total-usage/limitTotalUsage'; | ||
import { joinLlmExecutionTools } from '../llm-providers/multiple/joinLlmExecutionTools'; | ||
import { preparePersona } from '../personas/preparePersona'; | ||
import { isPipelinePrepared } from '../prepare/isPipelinePrepared'; | ||
import { preparePipeline } from '../prepare/preparePipeline'; | ||
import { prepareTemplates } from '../prepare/prepareTemplates'; | ||
import { unpreparePipeline } from '../prepare/unpreparePipeline'; | ||
import { MemoryStorage } from '../storage/memory/MemoryStorage'; | ||
import { PrefixStorage } from '../storage/utils/PrefixStorage'; | ||
import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString'; | ||
import type { ExecutionReportStringOptions } from '../types/execution-report/ExecutionReportStringOptions'; | ||
import { ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions'; | ||
import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { PROMPTBOOK_VERSION }; | ||
export { BlockTypes, RESERVED_PARAMETER_NAMES }; | ||
export { addUsage, assertsExecutionSuccessful, checkExpectations, embeddingVectorToString, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPipelineString, usageToWorktime, usageToHuman, }; | ||
export { collectionToJson, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createSubcollection, }; | ||
export { collectionToJson }; | ||
export { createCollectionFromJson }; | ||
export { createCollectionFromPromise }; | ||
export { createCollectionFromUrl }; | ||
export { createSubcollection }; | ||
export type { BlockType }; | ||
export { BlockTypes }; | ||
export { MAX_PARALLEL_COUNT }; | ||
export { MAX_EXECUTION_ATTEMPTS }; | ||
export { MAX_FILENAME_LENGTH }; | ||
export { MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH }; | ||
export { MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL }; | ||
export { EXECUTIONS_CACHE_DIRNAME }; | ||
export { PIPELINE_COLLECTION_BASE_FILENAME }; | ||
export { RESERVED_PARAMETER_NAMES }; | ||
export { pipelineJsonToString }; | ||
export type { PipelineStringToJsonOptions }; | ||
export { pipelineStringToJson }; | ||
export { pipelineStringToJsonSync }; | ||
export { prettifyPipelineString }; | ||
export { stringifyPipelineJson }; | ||
export { validatePipeline }; | ||
export { CollectionError }; | ||
export { EnvironmentMismatchError }; | ||
export { LimitReachedError }; | ||
export { NotFoundError }; | ||
export { NotYetImplementedError }; | ||
export { ParsingError }; | ||
export { PipelineExecutionError }; | ||
export { PipelineLogicError }; | ||
export { ReferenceError }; | ||
export { UnexpectedError }; | ||
export { VersionMismatchError }; | ||
export { assertsExecutionSuccessful }; | ||
export { createPipelineExecutor }; | ||
export { embeddingVectorToString }; | ||
export { ZERO_USAGE }; | ||
export { addUsage }; | ||
export { checkExpectations }; | ||
export { isPassingExpectations }; | ||
export { usageToHuman }; | ||
export { usageToWorktime }; | ||
export { CallbackInterfaceTools }; | ||
export type { CallbackInterfaceToolsOptions }; | ||
export { SimplePromptInterfaceTools }; | ||
export { pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, stringifyPipelineJson, validatePipeline, }; | ||
export { preparePipeline, unpreparePipeline }; | ||
export { createPipelineExecutor, joinLlmExecutionTools }; | ||
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions }; | ||
export { CollectionError, ExpectError, NotFoundError, ParsingError, PipelineExecutionError, PipelineLogicError, ReferenceError, UnexpectedError, VersionMismatchError, }; | ||
export { prepareKnowledgePieces }; | ||
export { prepareKnowledgeFromMarkdown }; | ||
export { cacheLlmTools }; | ||
export { countTotalUsage }; | ||
export { limitTotalUsage }; | ||
export { joinLlmExecutionTools }; | ||
export { preparePersona }; | ||
export { isPipelinePrepared }; | ||
export { preparePipeline }; | ||
export { prepareTemplates }; | ||
export { unpreparePipeline }; | ||
export { MemoryStorage }; | ||
export { PrefixStorage }; | ||
export { executionReportJsonToString }; | ||
export type { ExecutionReportStringOptions }; | ||
export { ExecutionReportStringOptionsDefaults }; |
@@ -1,48 +0,8 @@ | ||
import spaceTrim from 'spacetrim'; | ||
import { extractBlock } from '../postprocessing/utils/extractBlock'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { JavascriptEvalExecutionTools } from '../scripting/javascript/JavascriptEvalExecutionTools'; | ||
import { JavascriptExecutionTools } from '../scripting/javascript/JavascriptExecutionTools'; | ||
import { prettifyMarkdown } from '../utils/markdown/prettifyMarkdown'; | ||
import { capitalize } from '../utils/normalization/capitalize'; | ||
import { decapitalize } from '../utils/normalization/decapitalize'; | ||
import { nameToUriPart } from '../utils/normalization/nameToUriPart'; | ||
import { nameToUriParts } from '../utils/normalization/nameToUriParts'; | ||
import { normalizeToKebabCase } from '../utils/normalization/normalize-to-kebab-case'; | ||
import { normalizeTo_PascalCase } from '../utils/normalization/normalizeTo_PascalCase'; | ||
import { normalizeTo_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import { normalizeTo_camelCase } from '../utils/normalization/normalizeTo_camelCase'; | ||
import { normalizeTo_snake_case } from '../utils/normalization/normalizeTo_snake_case'; | ||
import { normalizeWhitespaces } from '../utils/normalization/normalizeWhitespaces'; | ||
import { removeDiacritics } from '../utils/normalization/removeDiacritics'; | ||
import { removeEmojis } from '../utils/removeEmojis'; | ||
import { removeQuotes } from '../utils/removeQuotes'; | ||
import { trimCodeBlock } from '../utils/trimCodeBlock'; | ||
import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock'; | ||
import { unwrapResult } from '../utils/unwrapResult'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { POSTPROCESSING_FUNCTIONS } from '../scripting/javascript/postprocessing-functions'; | ||
export { PROMPTBOOK_VERSION }; | ||
declare const POSTPROCESSING_FUNCTIONS: { | ||
spaceTrim: typeof spaceTrim; | ||
removeQuotes: typeof removeQuotes; | ||
unwrapResult: typeof unwrapResult; | ||
trimEndOfCodeBlock: typeof trimEndOfCodeBlock; | ||
trimCodeBlock: typeof trimCodeBlock; | ||
trim: (str: string) => string; | ||
reverse: (str: string) => string; | ||
removeEmojis: typeof removeEmojis; | ||
prettifyMarkdown: typeof prettifyMarkdown; | ||
capitalize: typeof capitalize; | ||
decapitalize: typeof decapitalize; | ||
nameToUriPart: typeof nameToUriPart; | ||
nameToUriParts: typeof nameToUriParts; | ||
removeDiacritics: typeof removeDiacritics; | ||
normalizeWhitespaces: typeof normalizeWhitespaces; | ||
normalizeToKebabCase: typeof normalizeToKebabCase; | ||
normalizeTo_camelCase: typeof normalizeTo_camelCase; | ||
normalizeTo_snake_case: typeof normalizeTo_snake_case; | ||
normalizeTo_PascalCase: typeof normalizeTo_PascalCase; | ||
parseKeywords: (input: string) => string; | ||
normalizeTo_SCREAMING_CASE: typeof normalizeTo_SCREAMING_CASE; | ||
extractBlock: typeof extractBlock; | ||
}; | ||
export { JavascriptEvalExecutionTools, JavascriptExecutionTools, POSTPROCESSING_FUNCTIONS }; | ||
export { JavascriptEvalExecutionTools }; | ||
export { JavascriptExecutionTools }; | ||
export { POSTPROCESSING_FUNCTIONS }; |
@@ -0,7 +1,6 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { MockedEchoLlmExecutionTools } from '../llm-providers/mocked/MockedEchoLlmExecutionTools'; | ||
import { MockedFackedLlmExecutionTools } from '../llm-providers/mocked/MockedFackedLlmExecutionTools'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { MockedEchoLlmExecutionTools, MockedFackedLlmExecutionTools, PROMPTBOOK_VERSION }; | ||
/** | ||
* TODO: [🚏] FakeLLM | ||
*/ | ||
export { PROMPTBOOK_VERSION }; | ||
export { MockedEchoLlmExecutionTools }; | ||
export { MockedFackedLlmExecutionTools }; |
@@ -0,4 +1,6 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { LangtailExecutionTools } from '../llm-providers/langtail/LangtailExecutionTools'; | ||
import type { LangtailExecutionToolsOptions } from '../llm-providers/langtail/LangtailExecutionToolsOptions'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { LangtailExecutionTools, LangtailExecutionToolsOptions, PROMPTBOOK_VERSION }; | ||
export { PROMPTBOOK_VERSION }; | ||
export { LangtailExecutionTools }; | ||
export type { LangtailExecutionToolsOptions }; |
@@ -1,2 +0,6 @@ | ||
import type { string_markdown_section, string_markdown_section_content, string_markdown_text } from '../types/typeAliases'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import type { string_markdown } from '../types/typeAliases'; | ||
import type { string_markdown_section } from '../types/typeAliases'; | ||
import type { string_markdown_section_content } from '../types/typeAliases'; | ||
import type { string_markdown_text } from '../types/typeAliases'; | ||
import { addAutoGeneratedSection } from '../utils/markdown/addAutoGeneratedSection'; | ||
@@ -15,4 +19,19 @@ import { createMarkdownChart } from '../utils/markdown/createMarkdownChart'; | ||
import { splitMarkdownIntoSections } from '../utils/markdown/splitMarkdownIntoSections'; | ||
import { string_markdown } from './types.index'; | ||
export { addAutoGeneratedSection, createMarkdownChart, createMarkdownTable, escapeMarkdownBlock, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractOneBlockFromMarkdown, flattenMarkdown, parseMarkdownSection, removeContentComments, removeMarkdownFormatting, splitMarkdownIntoSections, }; | ||
export type { MarkdownSection, string_markdown, string_markdown_section, string_markdown_section_content, string_markdown_text, }; | ||
export { PROMPTBOOK_VERSION }; | ||
export type { string_markdown }; | ||
export type { string_markdown_section }; | ||
export type { string_markdown_section_content }; | ||
export type { string_markdown_text }; | ||
export { addAutoGeneratedSection }; | ||
export { createMarkdownChart }; | ||
export { createMarkdownTable }; | ||
export { escapeMarkdownBlock }; | ||
export { extractAllBlocksFromMarkdown }; | ||
export { extractAllListItemsFromMarkdown }; | ||
export { extractOneBlockFromMarkdown }; | ||
export { flattenMarkdown }; | ||
export type { MarkdownSection }; | ||
export { parseMarkdownSection }; | ||
export { removeContentComments }; | ||
export { removeMarkdownFormatting }; | ||
export { splitMarkdownIntoSections }; |
@@ -0,5 +1,8 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { createCollectionFromDirectory } from '../collection/constructors/createCollectionFromDirectory'; | ||
import { createLlmToolsFromEnv } from '../llm-providers/_common/createLlmToolsFromEnv'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { FilesStorage } from '../storage/files-storage/FilesStorage'; | ||
export { PROMPTBOOK_VERSION }; | ||
export { createCollectionFromDirectory, createLlmToolsFromEnv }; | ||
export { createCollectionFromDirectory }; | ||
export { createLlmToolsFromEnv }; | ||
export { FilesStorage }; |
@@ -0,5 +1,8 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { OPENAI_MODELS } from '../llm-providers/openai/openai-models'; | ||
import { OpenAiExecutionTools } from '../llm-providers/openai/OpenAiExecutionTools'; | ||
import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { OPENAI_MODELS, OpenAiExecutionTools, OpenAiExecutionToolsOptions, PROMPTBOOK_VERSION }; | ||
export { PROMPTBOOK_VERSION }; | ||
export { OPENAI_MODELS }; | ||
export { OpenAiExecutionTools }; | ||
export type { OpenAiExecutionToolsOptions }; |
@@ -0,5 +1,8 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import type { RemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions'; | ||
import { RemoteLlmExecutionTools } from '../llm-providers/remote/RemoteLlmExecutionTools'; | ||
import type { RemoteLlmExecutionToolsOptions } from '../llm-providers/remote/RemoteLlmExecutionToolsOptions'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { PROMPTBOOK_VERSION, RemoteLlmExecutionTools, RemoteLlmExecutionToolsOptions, RemoteServerOptions }; | ||
export { PROMPTBOOK_VERSION }; | ||
export type { RemoteServerOptions }; | ||
export { RemoteLlmExecutionTools }; | ||
export type { RemoteLlmExecutionToolsOptions }; |
@@ -0,4 +1,6 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import type { RemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions'; | ||
import { startRemoteServer } from '../llm-providers/remote/startRemoteServer'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { PROMPTBOOK_VERSION, RemoteServerOptions, startRemoteServer }; | ||
export { PROMPTBOOK_VERSION }; | ||
export type { RemoteServerOptions }; | ||
export { startRemoteServer }; |
@@ -0,25 +1,95 @@ | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import type { PipelineCollection } from '../collection/PipelineCollection'; | ||
import type { BoilerplateCommand } from '../commands/_BOILERPLATE/BoilerplateCommand'; | ||
import type { Command } from '../commands/_common/types/Command'; | ||
import type { CommandParser } from '../commands/_common/types/CommandParser'; | ||
import type { CommandParserInput } from '../commands/_common/types/CommandParser'; | ||
import type { ApplyToPipelineJsonSubjects } from '../commands/_common/types/CommandParser'; | ||
import type { CommandUsagePlace } from '../commands/_common/types/CommandUsagePlaces'; | ||
import type { BlockCommand } from '../commands/BLOCK/BlockCommand'; | ||
import type { BlockType } from '../commands/BLOCK/BlockTypes'; | ||
import type { ExpectAmountCommand } from '../commands/EXPECT/ExpectAmountCommand'; | ||
import type { ExpectCommand } from '../commands/EXPECT/ExpectCommand'; | ||
import type { ExpectFormatCommand } from '../commands/EXPECT/ExpectFormatCommand'; | ||
import type { JokerCommand } from '../commands/JOKER/JokerCommand'; | ||
import type { KnowledgeCommand } from '../commands/KNOWLEDGE/KnowledgeCommand'; | ||
import type { ModelCommand } from '../commands/MODEL/ModelCommand'; | ||
import type { ParameterCommand } from '../commands/PARAMETER/ParameterCommand'; | ||
import type { PersonaCommand } from '../commands/PERSONA/PersonaCommand'; | ||
import type { PostprocessCommand } from '../commands/POSTPROCESS/PostprocessCommand'; | ||
import type { PromptbookVersionCommand } from '../commands/PROMPTBOOK_VERSION/PromptbookVersionCommand'; | ||
import type { UrlCommand } from '../commands/URL/UrlCommand'; | ||
import type { ActionCommand } from '../commands/X_ACTION/ActionCommand'; | ||
import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentCommand'; | ||
import type { PipelineStringToJsonOptions } from '../conversion/pipelineStringToJson'; | ||
import type { PrettifyOptions } from '../conversion/prettify/PrettifyOptions'; | ||
import type { renderPipelineMermaidOptions } from '../conversion/prettify/renderPipelineMermaidOptions'; | ||
import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions'; | ||
import { EmbeddingVector } from '../execution/EmbeddingVector'; | ||
import type { EmbeddingVector } from '../execution/EmbeddingVector'; | ||
import type { ExecutionTools } from '../execution/ExecutionTools'; | ||
import type { AvailableModel, LlmExecutionTools } from '../execution/LlmExecutionTools'; | ||
import type { PipelineExecutor, PipelineExecutorResult } from '../execution/PipelineExecutor'; | ||
import type { ChatPromptResult, CommonPromptResult, CompletionPromptResult, EmbeddingPromptResult, PromptResult } from '../execution/PromptResult'; | ||
import type { PromptResultUsage, PromptResultUsageCounts } from '../execution/PromptResultUsage'; | ||
import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools'; | ||
import type { LlmExecutionTools } from '../execution/LlmExecutionTools'; | ||
import type { AvailableModel } from '../execution/LlmExecutionTools'; | ||
import type { PipelineExecutor } from '../execution/PipelineExecutor'; | ||
import type { PipelineExecutorResult } from '../execution/PipelineExecutor'; | ||
import type { PromptResult } from '../execution/PromptResult'; | ||
import type { CompletionPromptResult } from '../execution/PromptResult'; | ||
import type { ChatPromptResult } from '../execution/PromptResult'; | ||
import type { EmbeddingPromptResult } from '../execution/PromptResult'; | ||
import type { CommonPromptResult } from '../execution/PromptResult'; | ||
import type { PromptResultUsage } from '../execution/PromptResultUsage'; | ||
import type { PromptResultUsageCounts } from '../execution/PromptResultUsage'; | ||
import type { ScriptExecutionTools } from '../execution/ScriptExecutionTools'; | ||
import type { ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools'; | ||
import type { AutomaticTranslator } from '../execution/translation/automatic-translate/automatic-translators/AutomaticTranslator'; | ||
import type { TranslatorOptions } from '../execution/translation/automatic-translate/automatic-translators/TranslatorOptions'; | ||
import type { UncertainNumber } from '../execution/UncertainNumber'; | ||
import type { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools'; | ||
import type { UserInterfaceTools } from '../execution/UserInterfaceTools'; | ||
import type { UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools'; | ||
import type { FormatDefinition } from '../formats/_common/FormatDefinition'; | ||
import type { CallbackInterfaceToolsOptions } from '../knowledge/dialogs/callback/CallbackInterfaceToolsOptions'; | ||
import type { Scraper } from '../knowledge/prepare-knowledge/_common/Scraper'; | ||
import type { ScraperSourceOptions } from '../knowledge/prepare-knowledge/_common/Scraper'; | ||
import type { CreateLlmToolsFromEnvOptions } from '../llm-providers/_common/createLlmToolsFromEnv'; | ||
import type { CacheItem } from '../llm-providers/_common/utils/cache/CacheItem'; | ||
import type { CacheLlmToolsOptions } from '../llm-providers/_common/utils/cache/CacheLlmToolsOptions'; | ||
import type { LlmExecutionToolsWithTotalUsage } from '../llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage'; | ||
import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions'; | ||
import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions'; | ||
import type { LangtailExecutionToolsOptions } from '../llm-providers/langtail/LangtailExecutionToolsOptions'; | ||
import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions'; | ||
import type { Promptbook_Server_Error } from '../llm-providers/remote/interfaces/Promptbook_Server_Error'; | ||
import type { Promptbook_Server_Progress } from '../llm-providers/remote/interfaces/Promptbook_Server_Progress'; | ||
import type { Promptbook_Server_Request } from '../llm-providers/remote/interfaces/Promptbook_Server_Request'; | ||
import type { Promptbook_Server_Response } from '../llm-providers/remote/interfaces/Promptbook_Server_Response'; | ||
import type { RemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions'; | ||
import type { RemoteLlmExecutionToolsOptions } from '../llm-providers/remote/RemoteLlmExecutionToolsOptions'; | ||
import type { PrepareOptions } from '../prepare/PrepareOptions'; | ||
import type { JavascriptExecutionToolsOptions } from '../scripting/javascript/JavascriptExecutionToolsOptions'; | ||
import type { PostprocessingFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions'; | ||
import type { PromptbookStorage } from '../storage/_common/PromptbookStorage'; | ||
import type { FilesStorageOptions } from '../storage/files-storage/FilesStorageOptions'; | ||
import type { Arrayable } from '../types/Arrayable'; | ||
import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson'; | ||
import type { ExecutionReportString } from '../types/execution-report/ExecutionReportString'; | ||
import type { ExecutionReportStringOptions } from '../types/execution-report/ExecutionReportStringOptions'; | ||
import type { ModelRequirements } from '../types/ModelRequirements'; | ||
import type { CompletionModelRequirements } from '../types/ModelRequirements'; | ||
import type { ChatModelRequirements } from '../types/ModelRequirements'; | ||
import type { EmbeddingModelRequirements } from '../types/ModelRequirements'; | ||
import type { CommonModelRequirements } from '../types/ModelRequirements'; | ||
import type { ModelVariant } from '../types/ModelVariant'; | ||
import type { ExpectationAmount, ExpectationUnit, Expectations } from '../types/PipelineJson/Expectations'; | ||
import { EXPECTATION_UNITS } from '../types/PipelineJson/Expectations'; | ||
import { KnowledgePiecePreparedJson } from '../types/PipelineJson/KnowledgePieceJson'; | ||
import { KnowledgeSourceJson, KnowledgeSourcePreparedJson } from '../types/PipelineJson/KnowledgeSourceJson'; | ||
import type { Expectations } from '../types/PipelineJson/Expectations'; | ||
import type { ExpectationUnit } from '../types/PipelineJson/Expectations'; | ||
import type { ExpectationAmount } from '../types/PipelineJson/Expectations'; | ||
import type { KnowledgePiecePreparedJson } from '../types/PipelineJson/KnowledgePieceJson'; | ||
import type { KnowledgeSourceJson } from '../types/PipelineJson/KnowledgeSourceJson'; | ||
import type { KnowledgeSourcePreparedJson } from '../types/PipelineJson/KnowledgeSourceJson'; | ||
import type { LlmTemplateJson } from '../types/PipelineJson/LlmTemplateJson'; | ||
import { PersonaJson, PersonaPreparedJson } from '../types/PipelineJson/PersonaJson'; | ||
import type { PersonaJson } from '../types/PipelineJson/PersonaJson'; | ||
import type { PersonaPreparedJson } from '../types/PipelineJson/PersonaJson'; | ||
import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
import { PreparationJson } from '../types/PipelineJson/PreparationJson'; | ||
import type { PreparationJson } from '../types/PipelineJson/PreparationJson'; | ||
import type { PromptDialogJson } from '../types/PipelineJson/PromptDialogJson'; | ||
import type { PromptTemplateJson } from '../types/PipelineJson/PromptTemplateJson'; | ||
import type { PromptTemplateJsonCommon } from '../types/PipelineJson/PromptTemplateJsonCommon'; | ||
import type { PromptTemplateParameterJson } from '../types/PipelineJson/PromptTemplateParameterJson'; | ||
@@ -30,14 +100,364 @@ import type { ScriptJson } from '../types/PipelineJson/ScriptJson'; | ||
import type { Prompt } from '../types/Prompt'; | ||
import type { CompletionPrompt } from '../types/Prompt'; | ||
import type { ChatPrompt } from '../types/Prompt'; | ||
import type { EmbeddingPrompt } from '../types/Prompt'; | ||
import type { CommonPrompt } from '../types/Prompt'; | ||
import type { ScriptLanguage } from '../types/ScriptLanguage'; | ||
import type { TaskProgress } from '../types/TaskProgress'; | ||
import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson'; | ||
import type { string_char_emoji } from '../types/typeAliasEmoji'; | ||
import type { Parameters, ReservedParameters, client_id, number_model_temperature, number_seed, string_char, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_parameter_name, string_parameter_value, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_documentation_url, string_reserved_parameter_name, string_script, string_semantic_version, string_sha256, string_system_message, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid } from '../types/typeAliases'; | ||
import type { string_business_category_name } from '../types/typeAliases'; | ||
import type { string_model_name } from '../types/typeAliases'; | ||
import type { string_prompt } from '../types/typeAliases'; | ||
import type { string_template } from '../types/typeAliases'; | ||
import type { string_text_prompt } from '../types/typeAliases'; | ||
import type { string_chat_prompt } from '../types/typeAliases'; | ||
import type { string_system_message } from '../types/typeAliases'; | ||
import type { string_completion_prompt } from '../types/typeAliases'; | ||
import type { string_page } from '../types/typeAliases'; | ||
import type { string_mime_type } from '../types/typeAliases'; | ||
import type { string_mime_type_with_wildcard } from '../types/typeAliases'; | ||
import type { string_char } from '../types/typeAliases'; | ||
import type { string_name } from '../types/typeAliases'; | ||
import type { string_parameter_name } from '../types/typeAliases'; | ||
import type { string_parameter_value } from '../types/typeAliases'; | ||
import type { Parameters } from '../types/typeAliases'; | ||
import type { string_reserved_parameter_name } from '../types/typeAliases'; | ||
import type { ReservedParameters } from '../types/typeAliases'; | ||
import type { string_title } from '../types/typeAliases'; | ||
import type { string_persona_description } from '../types/typeAliases'; | ||
import type { string_knowledge_source } from '../types/typeAliases'; | ||
import type { string_knowledge_source_link } from '../types/typeAliases'; | ||
import type { string_html } from '../types/typeAliases'; | ||
import type { string_xml } from '../types/typeAliases'; | ||
import type { string_markdown } from '../types/typeAliases'; | ||
import type { string_markdown_section } from '../types/typeAliases'; | ||
import type { string_markdown_section_content } from '../types/typeAliases'; | ||
import type { string_markdown_text } from '../types/typeAliases'; | ||
import type { string_promptbook_documentation_url } from '../types/typeAliases'; | ||
import type { string_domain } from '../types/typeAliases'; | ||
import type { string_tdl } from '../types/typeAliases'; | ||
import type { string_css } from '../types/typeAliases'; | ||
import type { string_svg } from '../types/typeAliases'; | ||
import type { string_script } from '../types/typeAliases'; | ||
import type { string_javascript } from '../types/typeAliases'; | ||
import type { string_json } from '../types/typeAliases'; | ||
import type { string_css_class } from '../types/typeAliases'; | ||
import type { string_css_property } from '../types/typeAliases'; | ||
import type { string_css_value } from '../types/typeAliases'; | ||
import type { string_css_selector } from '../types/typeAliases'; | ||
import type { string_url } from '../types/typeAliases'; | ||
import type { string_pipeline_url } from '../types/typeAliases'; | ||
import type { string_pipeline_url_with_hashtemplate } from '../types/typeAliases'; | ||
import type { string_data_url } from '../types/typeAliases'; | ||
import type { string_base64 } from '../types/typeAliases'; | ||
import type { string_href } from '../types/typeAliases'; | ||
import type { string_url_image } from '../types/typeAliases'; | ||
import type { string_uri } from '../types/typeAliases'; | ||
import type { string_uri_part } from '../types/typeAliases'; | ||
import type { string_uriid } from '../types/typeAliases'; | ||
import type { string_hostname } from '../types/typeAliases'; | ||
import type { string_host } from '../types/typeAliases'; | ||
import type { string_protocol } from '../types/typeAliases'; | ||
import type { string_email } from '../types/typeAliases'; | ||
import type { string_emails } from '../types/typeAliases'; | ||
import type { string_uuid } from '../types/typeAliases'; | ||
import type { client_id } from '../types/typeAliases'; | ||
import type { string_sha256 } from '../types/typeAliases'; | ||
import type { string_semantic_version } from '../types/typeAliases'; | ||
import type { string_version_dependency } from '../types/typeAliases'; | ||
import type { string_file_extension } from '../types/typeAliases'; | ||
import type { string_file_absolute_path } from '../types/typeAliases'; | ||
import type { string_file_relative_path } from '../types/typeAliases'; | ||
import type { string_file_path } from '../types/typeAliases'; | ||
import type { string_folder_absolute_path } from '../types/typeAliases'; | ||
import type { string_folder_relative_path } from '../types/typeAliases'; | ||
import type { string_folder_path } from '../types/typeAliases'; | ||
import type { string_filename } from '../types/typeAliases'; | ||
import type { string_person_fullname } from '../types/typeAliases'; | ||
import type { string_person_profile } from '../types/typeAliases'; | ||
import type { string_license } from '../types/typeAliases'; | ||
import type { string_attribute } from '../types/typeAliases'; | ||
import type { string_attribute_value_scope } from '../types/typeAliases'; | ||
import type { string_color } from '../types/typeAliases'; | ||
import type { string_translate_name } from '../types/typeAliases'; | ||
import type { string_translate_name_not_normalized } from '../types/typeAliases'; | ||
import type { string_translate_language } from '../types/typeAliases'; | ||
import type { string_javascript_name } from '../types/typeAliases'; | ||
import type { string_token } from '../types/typeAliases'; | ||
import type { string_license_token } from '../types/typeAliases'; | ||
import type { string_password } from '../types/typeAliases'; | ||
import type { string_ssh_key } from '../types/typeAliases'; | ||
import type { string_pgp_key } from '../types/typeAliases'; | ||
import type { string_date_iso8601 } from '../types/typeAliases'; | ||
import type { number_usd } from '../types/typeAliases'; | ||
import type { number_id } from '../types/typeAliases'; | ||
import type { number_linecol_number } from '../types/typeAliases'; | ||
import type { number_tokens } from '../types/typeAliases'; | ||
import type { number_positive } from '../types/typeAliases'; | ||
import type { number_negative } from '../types/typeAliases'; | ||
import type { number_integer } from '../types/typeAliases'; | ||
import type { number_percent } from '../types/typeAliases'; | ||
import type { number_model_temperature } from '../types/typeAliases'; | ||
import type { number_seed } from '../types/typeAliases'; | ||
import type { number_likeness } from '../types/typeAliases'; | ||
import type { number_miliseconds } from '../types/typeAliases'; | ||
import type { number_seconds } from '../types/typeAliases'; | ||
import type { number_minutes } from '../types/typeAliases'; | ||
import type { number_hours } from '../types/typeAliases'; | ||
import type { number_days } from '../types/typeAliases'; | ||
import type { number_weeks } from '../types/typeAliases'; | ||
import type { number_months } from '../types/typeAliases'; | ||
import type { number_years } from '../types/typeAliases'; | ||
import type { number_bytes } from '../types/typeAliases'; | ||
import type { number_kilobytes } from '../types/typeAliases'; | ||
import type { number_megabytes } from '../types/typeAliases'; | ||
import type { number_gigabytes } from '../types/typeAliases'; | ||
import type { number_terabytes } from '../types/typeAliases'; | ||
import type { FromtoItems } from '../utils/FromtoItems'; | ||
import { PROMPTBOOK_VERSION, string_promptbook_version } from '../version'; | ||
import type { CodeBlock } from '../utils/markdown/extractAllBlocksFromMarkdown'; | ||
import type { MarkdownSection } from '../utils/markdown/parseMarkdownSection'; | ||
import type { string_keyword } from '../utils/normalization/IKeywords'; | ||
import type { IKeywords } from '../utils/normalization/IKeywords'; | ||
import type { string_kebab_case } from '../utils/normalization/normalize-to-kebab-case'; | ||
import type { string_camelCase } from '../utils/normalization/normalizeTo_camelCase'; | ||
import type { string_PascalCase } from '../utils/normalization/normalizeTo_PascalCase'; | ||
import type { string_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import type { string_snake_case } from '../utils/normalization/normalizeTo_snake_case'; | ||
import type { ___ } from '../utils/organization/___'; | ||
import type { really_any } from '../utils/organization/really_any'; | ||
import type { really_unknown } from '../utils/organization/really_unknown'; | ||
import type { TODO_any } from '../utils/organization/TODO_any'; | ||
import type { TODO_object } from '../utils/organization/TODO_object'; | ||
import type { TODO_unknown } from '../utils/organization/TODO_unknown'; | ||
import type { string_promptbook_version } from '../version'; | ||
export { PROMPTBOOK_VERSION }; | ||
export { EXPECTATION_UNITS }; | ||
export type { AvailableModel, BlockType, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgePiecePreparedJson, KnowledgeSourceJson, KnowledgeSourcePreparedJson, LlmExecutionTools, LlmTemplateJson, ModelRequirements, ModelVariant, Parameters, PersonaJson, PersonaPreparedJson, PipelineCollection, PipelineExecutor, PipelineExecutorResult, PipelineJson, PipelineString, PreparationJson, Prompt, ChatPromptResult as PromptChatResult, CommonPromptResult as PromptCommonResult, CompletionPromptResult as PromptCompletionResult, PromptDialogJson, EmbeddingPromptResult as PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ReservedParameters, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, number_model_temperature, number_seed, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_emails, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_parameter_name, string_parameter_value, string_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_promptbook_documentation_url, string_promptbook_version, string_reserved_parameter_name, string_script, string_semantic_version, string_sha256, string_system_message, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_uuid, }; | ||
/** | ||
* TODO: Delete type aliases (from ../types/typeAliases) that are not exported here | ||
*/ | ||
export type { PipelineCollection }; | ||
export type { BoilerplateCommand }; | ||
export type { Command }; | ||
export type { CommandParser }; | ||
export type { CommandParserInput }; | ||
export type { ApplyToPipelineJsonSubjects }; | ||
export type { CommandUsagePlace }; | ||
export type { BlockCommand }; | ||
export type { BlockType }; | ||
export type { ExpectAmountCommand }; | ||
export type { ExpectCommand }; | ||
export type { ExpectFormatCommand }; | ||
export type { JokerCommand }; | ||
export type { KnowledgeCommand }; | ||
export type { ModelCommand }; | ||
export type { ParameterCommand }; | ||
export type { PersonaCommand }; | ||
export type { PostprocessCommand }; | ||
export type { PromptbookVersionCommand }; | ||
export type { UrlCommand }; | ||
export type { ActionCommand }; | ||
export type { InstrumentCommand }; | ||
export type { PipelineStringToJsonOptions }; | ||
export type { PrettifyOptions }; | ||
export type { renderPipelineMermaidOptions }; | ||
export type { CommonExecutionToolsOptions }; | ||
export type { EmbeddingVector }; | ||
export type { ExecutionTools }; | ||
export type { LlmExecutionTools }; | ||
export type { AvailableModel }; | ||
export type { PipelineExecutor }; | ||
export type { PipelineExecutorResult }; | ||
export type { PromptResult }; | ||
export type { CompletionPromptResult }; | ||
export type { ChatPromptResult }; | ||
export type { EmbeddingPromptResult }; | ||
export type { CommonPromptResult }; | ||
export type { PromptResultUsage }; | ||
export type { PromptResultUsageCounts }; | ||
export type { ScriptExecutionTools }; | ||
export type { ScriptExecutionToolsExecuteOptions }; | ||
export type { AutomaticTranslator }; | ||
export type { TranslatorOptions }; | ||
export type { UncertainNumber }; | ||
export type { UserInterfaceTools }; | ||
export type { UserInterfaceToolsPromptDialogOptions }; | ||
export type { FormatDefinition }; | ||
export type { CallbackInterfaceToolsOptions }; | ||
export type { Scraper }; | ||
export type { ScraperSourceOptions }; | ||
export type { CreateLlmToolsFromEnvOptions }; | ||
export type { CacheItem }; | ||
export type { CacheLlmToolsOptions }; | ||
export type { LlmExecutionToolsWithTotalUsage }; | ||
export type { AnthropicClaudeExecutionToolsOptions }; | ||
export type { AzureOpenAiExecutionToolsOptions }; | ||
export type { LangtailExecutionToolsOptions }; | ||
export type { OpenAiExecutionToolsOptions }; | ||
export type { Promptbook_Server_Error }; | ||
export type { Promptbook_Server_Progress }; | ||
export type { Promptbook_Server_Request }; | ||
export type { Promptbook_Server_Response }; | ||
export type { RemoteServerOptions }; | ||
export type { RemoteLlmExecutionToolsOptions }; | ||
export type { PrepareOptions }; | ||
export type { JavascriptExecutionToolsOptions }; | ||
export type { PostprocessingFunction }; | ||
export type { PromptbookStorage }; | ||
export type { FilesStorageOptions }; | ||
export type { Arrayable }; | ||
export type { ExecutionReportJson }; | ||
export type { ExecutionReportString }; | ||
export type { ExecutionReportStringOptions }; | ||
export type { ModelRequirements }; | ||
export type { CompletionModelRequirements }; | ||
export type { ChatModelRequirements }; | ||
export type { EmbeddingModelRequirements }; | ||
export type { CommonModelRequirements }; | ||
export type { ModelVariant }; | ||
export type { Expectations }; | ||
export type { ExpectationUnit }; | ||
export type { ExpectationAmount }; | ||
export type { KnowledgePiecePreparedJson }; | ||
export type { KnowledgeSourceJson }; | ||
export type { KnowledgeSourcePreparedJson }; | ||
export type { LlmTemplateJson }; | ||
export type { PersonaJson }; | ||
export type { PersonaPreparedJson }; | ||
export type { PipelineJson }; | ||
export type { PreparationJson }; | ||
export type { PromptDialogJson }; | ||
export type { PromptTemplateJson }; | ||
export type { PromptTemplateJsonCommon }; | ||
export type { PromptTemplateParameterJson }; | ||
export type { ScriptJson }; | ||
export type { SimpleTemplateJson }; | ||
export type { PipelineString }; | ||
export type { Prompt }; | ||
export type { CompletionPrompt }; | ||
export type { ChatPrompt }; | ||
export type { EmbeddingPrompt }; | ||
export type { CommonPrompt }; | ||
export type { ScriptLanguage }; | ||
export type { TaskProgress }; | ||
export type { string_char_emoji }; | ||
export type { string_business_category_name }; | ||
export type { string_model_name }; | ||
export type { string_prompt }; | ||
export type { string_template }; | ||
export type { string_text_prompt }; | ||
export type { string_chat_prompt }; | ||
export type { string_system_message }; | ||
export type { string_completion_prompt }; | ||
export type { string_page }; | ||
export type { string_mime_type }; | ||
export type { string_mime_type_with_wildcard }; | ||
export type { string_char }; | ||
export type { string_name }; | ||
export type { string_parameter_name }; | ||
export type { string_parameter_value }; | ||
export type { Parameters }; | ||
export type { string_reserved_parameter_name }; | ||
export type { ReservedParameters }; | ||
export type { string_title }; | ||
export type { string_persona_description }; | ||
export type { string_knowledge_source }; | ||
export type { string_knowledge_source_link }; | ||
export type { string_html }; | ||
export type { string_xml }; | ||
export type { string_markdown }; | ||
export type { string_markdown_section }; | ||
export type { string_markdown_section_content }; | ||
export type { string_markdown_text }; | ||
export type { string_promptbook_documentation_url }; | ||
export type { string_domain }; | ||
export type { string_tdl }; | ||
export type { string_css }; | ||
export type { string_svg }; | ||
export type { string_script }; | ||
export type { string_javascript }; | ||
export type { string_json }; | ||
export type { string_css_class }; | ||
export type { string_css_property }; | ||
export type { string_css_value }; | ||
export type { string_css_selector }; | ||
export type { string_url }; | ||
export type { string_pipeline_url }; | ||
export type { string_pipeline_url_with_hashtemplate }; | ||
export type { string_data_url }; | ||
export type { string_base64 }; | ||
export type { string_href }; | ||
export type { string_url_image }; | ||
export type { string_uri }; | ||
export type { string_uri_part }; | ||
export type { string_uriid }; | ||
export type { string_hostname }; | ||
export type { string_host }; | ||
export type { string_protocol }; | ||
export type { string_email }; | ||
export type { string_emails }; | ||
export type { string_uuid }; | ||
export type { client_id }; | ||
export type { string_sha256 }; | ||
export type { string_semantic_version }; | ||
export type { string_version_dependency }; | ||
export type { string_file_extension }; | ||
export type { string_file_absolute_path }; | ||
export type { string_file_relative_path }; | ||
export type { string_file_path }; | ||
export type { string_folder_absolute_path }; | ||
export type { string_folder_relative_path }; | ||
export type { string_folder_path }; | ||
export type { string_filename }; | ||
export type { string_person_fullname }; | ||
export type { string_person_profile }; | ||
export type { string_license }; | ||
export type { string_attribute }; | ||
export type { string_attribute_value_scope }; | ||
export type { string_color }; | ||
export type { string_translate_name }; | ||
export type { string_translate_name_not_normalized }; | ||
export type { string_translate_language }; | ||
export type { string_javascript_name }; | ||
export type { string_token }; | ||
export type { string_license_token }; | ||
export type { string_password }; | ||
export type { string_ssh_key }; | ||
export type { string_pgp_key }; | ||
export type { string_date_iso8601 }; | ||
export type { number_usd }; | ||
export type { number_id }; | ||
export type { number_linecol_number }; | ||
export type { number_tokens }; | ||
export type { number_positive }; | ||
export type { number_negative }; | ||
export type { number_integer }; | ||
export type { number_percent }; | ||
export type { number_model_temperature }; | ||
export type { number_seed }; | ||
export type { number_likeness }; | ||
export type { number_miliseconds }; | ||
export type { number_seconds }; | ||
export type { number_minutes }; | ||
export type { number_hours }; | ||
export type { number_days }; | ||
export type { number_weeks }; | ||
export type { number_months }; | ||
export type { number_years }; | ||
export type { number_bytes }; | ||
export type { number_kilobytes }; | ||
export type { number_megabytes }; | ||
export type { number_gigabytes }; | ||
export type { number_terabytes }; | ||
export type { FromtoItems }; | ||
export type { CodeBlock }; | ||
export type { MarkdownSection }; | ||
export type { string_keyword }; | ||
export type { IKeywords }; | ||
export type { string_kebab_case }; | ||
export type { string_camelCase }; | ||
export type { string_PascalCase }; | ||
export type { string_SCREAMING_CASE }; | ||
export type { string_snake_case }; | ||
export type { ___ }; | ||
export type { really_any }; | ||
export type { really_unknown }; | ||
export type { TODO_any }; | ||
export type { TODO_object }; | ||
export type { TODO_unknown }; | ||
export type { string_promptbook_version }; |
@@ -1,2 +0,2 @@ | ||
import { spaceTrim } from 'spacetrim'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { renderPromptbookMermaid } from '../conversion/prettify/renderPipelineMermaidOptions'; | ||
@@ -11,2 +11,4 @@ import { extractParameterNamesFromPromptTemplate } from '../conversion/utils/extractParameterNamesFromPromptTemplate'; | ||
import { $currentDate } from '../utils/currentDate'; | ||
import { deepClone } from '../utils/deepClone'; | ||
import { deepFreezeWithSameType } from '../utils/deepFreeze'; | ||
import { countCharacters } from '../utils/expectation-counters/countCharacters'; | ||
@@ -16,19 +18,27 @@ import { countLines } from '../utils/expectation-counters/countLines'; | ||
import { countParagraphs } from '../utils/expectation-counters/countParagraphs'; | ||
import { countSentences, splitIntoSentences } from '../utils/expectation-counters/countSentences'; | ||
import { splitIntoSentences } from '../utils/expectation-counters/countSentences'; | ||
import { countSentences } from '../utils/expectation-counters/countSentences'; | ||
import { countWords } from '../utils/expectation-counters/countWords'; | ||
import { CountUtils } from '../utils/expectation-counters/index'; | ||
import { extractParameterNames } from '../utils/extractParameterNames'; | ||
import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS'; | ||
import type { IKeywords, string_keyword } from '../utils/normalization/IKeywords'; | ||
import { isRunningInBrowser } from '../utils/isRunningInWhatever'; | ||
import { isRunningInNode } from '../utils/isRunningInWhatever'; | ||
import { isRunningInWebWorker } from '../utils/isRunningInWhatever'; | ||
import { capitalize } from '../utils/normalization/capitalize'; | ||
import { decapitalize } from '../utils/normalization/decapitalize'; | ||
import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS'; | ||
import type { string_keyword } from '../utils/normalization/IKeywords'; | ||
import type { IKeywords } from '../utils/normalization/IKeywords'; | ||
import { isValidKeyword } from '../utils/normalization/isValidKeyword'; | ||
import { nameToUriPart } from '../utils/normalization/nameToUriPart'; | ||
import { nameToUriParts } from '../utils/normalization/nameToUriParts'; | ||
import { normalizeToKebabCase, string_kebab_case } from '../utils/normalization/normalize-to-kebab-case'; | ||
import { normalizeTo_PascalCase, string_PascalCase } from '../utils/normalization/normalizeTo_PascalCase'; | ||
import { normalizeTo_SCREAMING_CASE, string_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import { normalizeTo_camelCase, string_camelCase } from '../utils/normalization/normalizeTo_camelCase'; | ||
import { normalizeTo_snake_case, string_snake_case } from '../utils/normalization/normalizeTo_snake_case'; | ||
import { normalizeWhitespaces } from '../utils/normalization/normalizeWhitespaces'; | ||
import type { string_kebab_case } from '../utils/normalization/normalize-to-kebab-case'; | ||
import { normalizeToKebabCase } from '../utils/normalization/normalize-to-kebab-case'; | ||
import type { string_camelCase } from '../utils/normalization/normalizeTo_camelCase'; | ||
import { normalizeTo_camelCase } from '../utils/normalization/normalizeTo_camelCase'; | ||
import type { string_PascalCase } from '../utils/normalization/normalizeTo_PascalCase'; | ||
import { normalizeTo_PascalCase } from '../utils/normalization/normalizeTo_PascalCase'; | ||
import type { string_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import { normalizeTo_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import { normalizeTo_snake_case } from '../utils/normalization/normalizeTo_snake_case'; | ||
import { parseKeywords } from '../utils/normalization/parseKeywords'; | ||
@@ -58,23 +68,66 @@ import { parseKeywordsFromString } from '../utils/normalization/parseKeywordsFromString'; | ||
import { isValidUuid } from '../utils/validators/uuid/isValidUuid'; | ||
import { PROMPTBOOK_VERSION } from '../version'; | ||
export { forEachAsync, PROMPTBOOK_VERSION }; | ||
export { extractParameterNames, extractVariables, replaceParameters, spaceTrim }; | ||
export { $currentDate, $randomSeed, extractBlock, // <- [🌻] + maybe export through `@promptbook/markdown-utils` | ||
isHostnameOnPrivateNetwork, isUrlOnPrivateNetwork, isValidFilePath, isValidJavascriptName, isValidJsonString, isValidPipelineUrl, isValidPromptbookVersion, isValidSemanticVersion, isValidUrl, isValidUuid, parseNumber, // <- [🌻] | ||
removeEmojis, removeQuotes, trimCodeBlock, trimEndOfCodeBlock, unwrapResult, }; | ||
export { countCharacters, countLines, countPages, countParagraphs, countSentences, CountUtils, countWords }; | ||
export { PROMPTBOOK_VERSION }; | ||
export { renderPromptbookMermaid }; | ||
export { extractParameterNamesFromPromptTemplate }; | ||
export { extractVariables }; | ||
export { renameParameter }; | ||
export { titleToName }; | ||
export { forEachAsync }; | ||
export { isValidJsonString }; | ||
export { extractBlock }; | ||
export { $currentDate }; | ||
export { deepClone }; | ||
export { deepFreezeWithSameType }; | ||
export { countCharacters }; | ||
export { countLines }; | ||
export { countPages }; | ||
export { countParagraphs }; | ||
export { splitIntoSentences }; | ||
export declare const normalizeTo: { | ||
camelCase: typeof normalizeTo_camelCase; | ||
PascalCase: typeof normalizeTo_PascalCase; | ||
SCREAMING_CASE: typeof normalizeTo_SCREAMING_CASE; | ||
snake_case: typeof normalizeTo_snake_case; | ||
'kebab-case': typeof normalizeToKebabCase; | ||
}; | ||
export { capitalize, decapitalize, DIACRITIC_VARIANTS_LETTERS, IKeywords, isValidKeyword, nameToUriPart, nameToUriParts, normalizeTo_camelCase, normalizeTo_PascalCase, normalizeTo_SCREAMING_CASE, normalizeTo_snake_case, normalizeToKebabCase, normalizeWhitespaces, parseKeywords, parseKeywordsFromString, removeDiacritics, searchKeywords, string_keyword, titleToName, }; | ||
export type { string_camelCase, string_kebab_case, string_PascalCase, string_SCREAMING_CASE, string_snake_case }; | ||
export { extractParameterNamesFromPromptTemplate, renameParameter, renderPromptbookMermaid }; | ||
export { difference, intersection, union }; | ||
/** | ||
* Note: [🕙] It does not make sence to have simple lower / UPPER case normalization | ||
*/ | ||
export { countSentences }; | ||
export { countWords }; | ||
export { CountUtils }; | ||
export { extractParameterNames }; | ||
export { isRunningInBrowser }; | ||
export { isRunningInNode }; | ||
export { isRunningInWebWorker }; | ||
export { capitalize }; | ||
export { decapitalize }; | ||
export { DIACRITIC_VARIANTS_LETTERS }; | ||
export type { string_keyword }; | ||
export type { IKeywords }; | ||
export { isValidKeyword }; | ||
export { nameToUriPart }; | ||
export { nameToUriParts }; | ||
export type { string_kebab_case }; | ||
export { normalizeToKebabCase }; | ||
export type { string_camelCase }; | ||
export { normalizeTo_camelCase }; | ||
export type { string_PascalCase }; | ||
export { normalizeTo_PascalCase }; | ||
export type { string_SCREAMING_CASE }; | ||
export { normalizeTo_SCREAMING_CASE }; | ||
export { normalizeTo_snake_case }; | ||
export { parseKeywords }; | ||
export { parseKeywordsFromString }; | ||
export { removeDiacritics }; | ||
export { searchKeywords }; | ||
export { parseNumber }; | ||
export { $randomSeed }; | ||
export { removeEmojis }; | ||
export { removeQuotes }; | ||
export { replaceParameters }; | ||
export { difference }; | ||
export { intersection }; | ||
export { union }; | ||
export { trimCodeBlock }; | ||
export { trimEndOfCodeBlock }; | ||
export { unwrapResult }; | ||
export { isValidFilePath }; | ||
export { isValidJavascriptName }; | ||
export { isValidPromptbookVersion }; | ||
export { isValidSemanticVersion }; | ||
export { isHostnameOnPrivateNetwork }; | ||
export { isUrlOnPrivateNetwork }; | ||
export { isValidPipelineUrl }; | ||
export { isValidUrl }; | ||
export { isValidUuid }; |
@@ -7,2 +7,4 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* Note: Functions `collectionToJson` and `createCollectionFromJson` are complementary | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -9,0 +11,0 @@ export declare function collectionToJson(collection: PipelineCollection): Promise<Array<PipelineJson>>; |
@@ -42,2 +42,3 @@ import type { PipelineStringToJsonOptions } from '../../conversion/pipelineStringToJson'; | ||
* @returns PipelineCollection | ||
* @public exported from `@promptbook/node` | ||
*/ | ||
@@ -44,0 +45,0 @@ export declare function createCollectionFromDirectory(path: string_folder_path, options?: CreatePipelineCollectionFromDirectoryOptions): Promise<PipelineCollection>; |
@@ -11,3 +11,4 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
* @returns PipelineCollection | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function createCollectionFromJson(...promptbooks: Array<PipelineJson>): PipelineCollection; |
@@ -21,3 +21,4 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
* @deprecated Do not use, it will became internal tool for other constructor functions | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function createCollectionFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PipelineJson>> | (() => Promise<Array<PipelineJson>>)): PipelineCollection; |
@@ -22,4 +22,4 @@ import type { string_url } from '../../types/typeAliases'; | ||
* Constructs Promptbook from remote Promptbase URL | ||
* @returns PipelineCollection | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -26,0 +26,0 @@ export declare function createCollectionFromUrl(url: string_url | URL, options: CreatePipelineCollectionFromUrlyOptions): Promise<PipelineCollection>; |
@@ -11,3 +11,4 @@ import type { string_pipeline_url } from '../../types/typeAliases'; | ||
* @returns PipelineCollection | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function createSubcollection(collection: PipelineCollection, predicate: (url: string_pipeline_url) => boolean): PipelineCollection; |
@@ -6,2 +6,3 @@ import type { TupleToUnion } from 'type-fest'; | ||
* @see https://github.com/webgptorg/promptbook#block-type | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -13,3 +14,4 @@ export type BlockType = TupleToUnion<typeof BlockTypes>; | ||
* @see https://github.com/webgptorg/promptbook#block-type | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare const BlockTypes: readonly ["PROMPT_TEMPLATE", "SIMPLE_TEMPLATE", "SCRIPT", "PROMPT_DIALOG", "SAMPLE", "KNOWLEDGE", "INSTRUMENT", "ACTION"]; |
/** | ||
* The maximum number of iterations for a loops | ||
* | ||
* @private within the repository - too low-level in comparison to other `MAX_...` | ||
*/ | ||
@@ -7,2 +9,4 @@ export declare const LOOP_LIMIT = 1000; | ||
* The maximum number of iterations for a loops which adds characters one by one | ||
* | ||
* @private within the repository - too low-level in comparison to other `MAX_...` | ||
*/ | ||
@@ -12,2 +16,4 @@ export declare const CHARACTER_LOOP_LIMIT = 100000; | ||
* The maximum number of (LLM) tasks running in parallel | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -17,2 +23,4 @@ export declare const MAX_PARALLEL_COUNT = 5; | ||
* The maximum number of attempts to execute LLM task before giving up | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -22,2 +30,4 @@ export declare const MAX_EXECUTION_ATTEMPTS = 3; | ||
* The maximum length of the (generated) filename | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -28,2 +38,4 @@ export declare const MAX_FILENAME_LENGTH = 30; | ||
* TODO: [🐝] !!! Use | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -34,2 +46,4 @@ export declare const MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3; | ||
* TODO: [🐝] !!! Use | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -39,2 +53,4 @@ export declare const MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = 200; | ||
* Where to store the cache of executions for promptbook CLI | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -44,2 +60,4 @@ export declare const EXECUTIONS_CACHE_DIRNAME = "/.promptbook/executions-cache"; | ||
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -53,2 +71,4 @@ export declare const PIPELINE_COLLECTION_BASE_FILENAME = "index"; | ||
* The names of the parameters that are reserved for special purposes | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -58,2 +78,4 @@ export declare const RESERVED_PARAMETER_NAMES: readonly ["content", "context", "knowledge", "samples", "modelName", "currentDate"]; | ||
* @@@ | ||
* | ||
* @private within the repository | ||
*/ | ||
@@ -63,2 +85,4 @@ export declare const RESERVED_PARAMETER_MISSING_VALUE: string; | ||
* @@@ | ||
* | ||
* @private within the repository | ||
*/ | ||
@@ -68,6 +92,8 @@ export declare const RESERVED_PARAMETER_RESTRICTED: string; | ||
* @@@ | ||
* | ||
* @private within the repository | ||
*/ | ||
export declare const DEBUG_ALLOW_PAYED_TESTING: boolean; | ||
/** | ||
* TODO: [🔼] Export all to core | ||
* TODO: !!!!!! Check that all @private contains some normalized explanation | ||
*/ |
@@ -8,2 +8,3 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* @returns Promptbook in string format (.ptbk.md) | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -10,0 +11,0 @@ export declare function pipelineJsonToString(pipelineJson: PipelineJson): PipelineString; |
@@ -6,2 +6,4 @@ import type { LlmExecutionTools } from '../execution/LlmExecutionTools'; | ||
* Options for `pipelineStringToJson` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -24,2 +26,5 @@ export type PipelineStringToJsonOptions = { | ||
* | ||
* Note: This function does not validate logic of the pipeline only the syntax | ||
* Note: This function acts as compilation process | ||
* | ||
* @param pipelineString {Promptbook} in string markdown format (.ptbk.md) | ||
@@ -29,5 +34,3 @@ * @param options - Options and tools for the compilation | ||
* @throws {ParsingError} if the promptbook string is not valid | ||
* | ||
* Note: This function does not validate logic of the pipeline only the syntax | ||
* Note: This function acts as compilation process | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -34,0 +37,0 @@ export declare function pipelineStringToJson(pipelineString: PipelineString, options?: PipelineStringToJsonOptions): Promise<PipelineJson>; |
@@ -11,8 +11,9 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* | ||
* Note: This function does not validate logic of the pipeline only the syntax | ||
* Note: This function acts as compilation process | ||
* | ||
* @param pipelineString {Promptbook} in string markdown format (.ptbk.md) | ||
* @returns {Promptbook} compiled in JSON format (.ptbk.json) | ||
* @throws {ParsingError} if the promptbook string is not valid | ||
* | ||
* Note: This function does not validate logic of the pipeline only the syntax | ||
* Note: This function acts as compilation process | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -19,0 +20,0 @@ export declare function pipelineStringToJsonSync(pipelineString: PipelineString): PipelineJson; |
@@ -5,2 +5,4 @@ import type { PipelineString } from '../../types/PipelineString'; | ||
* Prettyfies Promptbook string and adds Mermaid graph | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -7,0 +9,0 @@ export declare function prettifyPipelineString(pipelineString: PipelineString, options: PrettifyOptions): Promise<PipelineString>; |
@@ -20,2 +20,4 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
* Note: The result is not wrapped in a Markdown code block | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -22,0 +24,0 @@ export declare function renderPromptbookMermaid(pipelineJson: PipelineJson, options?: renderPipelineMermaidOptions): string; |
@@ -9,2 +9,3 @@ import type { PromptTemplateJson } from '../../types/PipelineJson/PromptTemplateJson'; | ||
* @throws {ParsingError} if the script is invalid | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -11,0 +12,0 @@ export declare function extractParameterNamesFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>; |
@@ -9,2 +9,3 @@ import type { string_javascript } from '../../types/typeAliases'; | ||
* @throws {ParsingError} if the script is invalid | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -11,0 +12,0 @@ export declare function extractVariables(script: string_javascript): Set<string_javascript_name>; |
@@ -23,4 +23,5 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
* @throws {PipelineLogicError} If the new parameter name is already used in the pipeline | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function renameParameter(options: RenameParameterOptions): PipelineJson; | ||
export {}; |
@@ -7,2 +7,4 @@ import type { string_json } from '../../types/typeAliases'; | ||
* Note: In contrast to JSON.stringify, this function ensures that **embedding index** is on single line | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -9,0 +11,0 @@ export declare function stringifyPipelineJson<TType>(pipeline: TType): string_json<TType>; |
/** | ||
* Function normalizes title to name which can be used as identifier | ||
* @@@ | ||
* | ||
* @param value @@@ | ||
* @returns @@@ | ||
* @example @@@ | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function titleToName(value: string): string; |
@@ -15,2 +15,3 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
* @throws {PipelineLogicError} on logical error in the pipeline | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -17,0 +18,0 @@ export declare function validatePipeline(pipeline: PipelineJson): PipelineJson; |
/** | ||
* This error indicates that the pipeline collection cannot be propperly loaded | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class CollectionError extends Error { |
/** | ||
* This error type indicates that you try to use a feature that is not available in the current environment | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class EnvironmentMismatchError extends Error { |
/** | ||
* This error type indicates that some limit was reached | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class LimitReachedError extends Error { |
/** | ||
* This error indicates that promptbook not found in the collection | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class NotFoundError extends Error { |
/** | ||
* This error type indicates that some part of the code is not implemented yet | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class NotYetImplementedError extends Error { |
/** | ||
* This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class ParsingError extends Error { |
/** | ||
* This error indicates errors during the execution of the pipeline | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class PipelineExecutionError extends Error { |
/** | ||
* This error indicates that the promptbook object has valid syntax but contains logical errors (like circular dependencies) | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class PipelineLogicError extends Error { |
/** | ||
* This error indicates errors in referencing promptbooks between each other | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class ReferenceError extends Error { |
/** | ||
* This error type indicates that the error should not happen and its last check before crashing with some other error | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare class UnexpectedError extends Error { |
import type { string_semantic_version } from '../types/typeAliases'; | ||
/** | ||
* This error type indicates that the version of the pipeline is not matching the expected version | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -5,0 +7,0 @@ export declare class VersionMismatchError extends Error { |
@@ -7,2 +7,3 @@ import type { PipelineExecutor } from './PipelineExecutor'; | ||
* @throws {PipelineExecutionError} If the execution is not successful or if multiple errors occurred | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -9,0 +10,0 @@ export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PipelineExecutor>>, 'isSuccessful' | 'errors'>): void; |
@@ -56,2 +56,3 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* @throws {PipelineLogicError} on logical error in the pipeline | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -58,0 +59,0 @@ export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor; |
import type { EmbeddingVector } from './EmbeddingVector'; | ||
/** | ||
* Pretty print an embedding vector for logging | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function embeddingVectorToString(embeddingVector: EmbeddingVector): string; |
@@ -5,3 +5,3 @@ import type { PromptResultUsage } from '../PromptResultUsage'; | ||
* | ||
* TODO: [🔼] Export with addUsage | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -63,3 +63,5 @@ export declare const ZERO_USAGE: import("type-fest/source/readonly-deep").ReadonlyObjectDeep<{ | ||
* Note: If you provide 0 values, it returns ZERO_USAGE | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function addUsage(...usageItems: Array<PromptResultUsage>): PromptResultUsage; |
@@ -11,2 +11,3 @@ import type { Expectations } from '../../types/PipelineJson/Expectations'; | ||
* @returns {void} Nothing | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -22,2 +23,3 @@ export declare function checkExpectations(expectations: Expectations, value: string): void; | ||
* @returns {boolean} True if the expectations are met | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -24,0 +26,0 @@ export declare function isPassingExpectations(expectations: Expectations, value: string): boolean; |
@@ -16,4 +16,5 @@ import type { Promisable } from 'type-fest'; | ||
* @param callbackfunction - Function to call for each item | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function forEachAsync<TItem>(array: Array<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: Array<TItem>) => Promisable<void>): Promise<void>; | ||
export {}; |
@@ -5,2 +5,4 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* Function `usageToHuman` will take usage and convert it to human readable report | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -7,0 +9,0 @@ export declare function usageToHuman(usage: PromptResultUsage): string_markdown; |
@@ -9,3 +9,5 @@ import type { PromptResultUsage } from '../PromptResultUsage'; | ||
* - https://www.originalnitonery.cz/blog/psani-vsemi-deseti-se-muzete-naucit-i-sami-doma | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function usageToWorktime(usage: PromptResultUsage): UncertainNumber; |
@@ -7,2 +7,3 @@ import type { string_mime_type } from '../../types/typeAliases'; | ||
* @see https://github.com/webgptorg/promptbook/discussions/36 | ||
* @private still an internal experimental | ||
*/ | ||
@@ -70,2 +71,2 @@ export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends string, TSchema extends object> = { | ||
* TODO: [🍓][🔼] Export via some package | ||
*/ | ||
*/ |
/** | ||
* Function isValidJsonString will tell you if the string is valid JSON or not | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidJsonString(value: string): boolean; |
@@ -7,2 +7,4 @@ import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools'; | ||
* You need to provide your own implementation of this callback function and its bind to UI. | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -9,0 +11,0 @@ export declare class CallbackInterfaceTools implements UserInterfaceTools { |
@@ -6,2 +6,4 @@ import type { Promisable } from 'type-fest'; | ||
* Options for `CallbackInterfaceTools` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -8,0 +10,0 @@ export type CallbackInterfaceToolsOptions = CommonExecutionToolsOptions & { |
@@ -9,2 +9,4 @@ import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions'; | ||
* **NOT intended to use in the production** due to its synchronous nature. | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -21,2 +23,2 @@ export declare class SimplePromptInterfaceTools implements UserInterfaceTools { | ||
* Note: [🔵] This code should never be published outside of `@promptbook/browser` | ||
*/ | ||
*/ |
@@ -8,6 +8,6 @@ import type { PrepareOptions } from '../../../prepare/PrepareOptions'; | ||
* @see https://github.com/webgptorg/promptbook/discussions/41 | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function prepareKnowledgePieces(knowledgeSources: Array<KnowledgeSourceJson>, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'preparationIds'>>>; | ||
/** | ||
* TODO: [🐝][🔼] !!! Export via `@promptbook/core` | ||
* TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time | ||
@@ -14,0 +14,0 @@ * Put `knowledgePieces` into `PrepareKnowledgeOptions` |
@@ -10,2 +10,7 @@ import type { Promisable } from 'type-fest'; | ||
import type { really_unknown } from '../../../utils/organization/really_unknown'; | ||
/** | ||
* @@@ | ||
* | ||
* @private still an internal experimental | ||
*/ | ||
export type Scraper = { | ||
@@ -18,2 +23,7 @@ readonly description: string_markdown_text; | ||
}; | ||
/** | ||
* @@@ | ||
* | ||
* @private still an internal experimental | ||
*/ | ||
export type ScraperSourceOptions = { | ||
@@ -20,0 +30,0 @@ readonly source: string_knowledge_source_link; |
@@ -6,2 +6,4 @@ import type { PrepareOptions } from '../../../prepare/PrepareOptions'; | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -8,0 +10,0 @@ export declare function prepareKnowledgeFromMarkdown(knowledgeContent: string_markdown, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>; |
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
/** | ||
* @privxxate <- TODO: !!!!!! Warn that not private or exported | ||
*/ | ||
export type CreateLlmToolsFromEnvOptions = { | ||
@@ -22,2 +25,3 @@ /** | ||
* @returns @@@ | ||
* @public exported from `@promptbook/node` | ||
*/ | ||
@@ -27,3 +31,2 @@ export declare function createLlmToolsFromEnv(options?: CreateLlmToolsFromEnvOptions): LlmExecutionTools; | ||
* TODO: [🍜] Use `createLlmToolsFromConfiguration` | ||
* TODO: [🔼] !!! Export via `@promptbook/node` | ||
* TODO: @@@ write discussion about this - wizzard | ||
@@ -30,0 +33,0 @@ * TODO: Add Azure |
@@ -10,6 +10,6 @@ import type { LlmExecutionTools } from '../../../../execution/LlmExecutionTools'; | ||
* @returns LLM tools with same functionality with added total cost counting | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function cacheLlmTools<TLlmTools extends LlmExecutionTools>(llmTools: TLlmTools, options?: Partial<CacheLlmToolsOptions>): TLlmTools; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
* TODO: [🧠][💸] Maybe make some common abstraction `interceptLlmTools` and use here (or use javascript Proxy?) | ||
@@ -16,0 +16,0 @@ * TODO: [🧠] Is there some meaningfull way how to test this util |
@@ -8,6 +8,6 @@ import type { LlmExecutionTools } from '../../../../execution/LlmExecutionTools'; | ||
* @returns LLM tools with same functionality with added total cost counting | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function countTotalUsage(llmTools: LlmExecutionTools): LlmExecutionToolsWithTotalUsage; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbookcore/` | ||
* TODO: [🧠][💸] Maybe make some common abstraction `interceptLlmTools` and use here (or use javascript Proxy?) | ||
@@ -14,0 +14,0 @@ * TODO: [🧠] Is there some meaningfull way how to test this util |
@@ -25,2 +25,4 @@ import type { LlmExecutionTools } from '../../../../execution/LlmExecutionTools'; | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -30,3 +32,2 @@ export declare function limitTotalUsage(llmTools: LlmExecutionTools, options?: Partial<LimitTotalUsageOptions>): LlmExecutionToolsWithTotalUsage; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbookcore/` | ||
* TODO: Maybe internally use `countTotalUsage` | ||
@@ -33,0 +34,0 @@ * TODO: [🧠][💸] Maybe make some common abstraction `interceptLlmTools` and use here (or use javascript Proxy?) |
@@ -11,2 +11,4 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
* Execution Tools for calling Anthropic Claude API. | ||
* | ||
* @public exported from `@promptbook/anthropic-claude` | ||
*/ | ||
@@ -13,0 +15,0 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools { |
@@ -7,2 +7,3 @@ import type { ClientOptions } from '@anthropic-ai/sdk'; | ||
* This extends Anthropic's `ClientOptions` with are directly passed to the Anthropic client. | ||
* @public exported from `@promptbook/anthropic-claude` | ||
*/ | ||
@@ -12,2 +13,2 @@ export type AnthropicClaudeExecutionToolsOptions = CommonExecutionToolsOptions & ClientOptions; | ||
* TODO: [🍜] Auto add WebGPT / Promptbook.studio anonymous server in browser | ||
*/ | ||
*/ |
@@ -12,2 +12,4 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
* Execution Tools for calling Azure OpenAI API. | ||
* | ||
* @public exported from `@promptbook/azure-openai` | ||
*/ | ||
@@ -14,0 +16,0 @@ export declare class AzureOpenAiExecutionTools implements LlmExecutionTools { |
@@ -8,2 +8,3 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions'; | ||
* @see https://oai.azure.com/portal/ | ||
* @public exported from `@promptbook/azure-openai` | ||
*/ | ||
@@ -10,0 +11,0 @@ export type AzureOpenAiExecutionToolsOptions = CommonExecutionToolsOptions & { |
@@ -8,2 +8,4 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
* Execution Tools for calling OpenAI API. | ||
* | ||
* @public exported from `@promptbook/langtail` | ||
*/ | ||
@@ -10,0 +12,0 @@ export declare class LangtailExecutionTools extends OpenAiExecutionTools implements LlmExecutionTools { |
@@ -7,2 +7,4 @@ import type { OpenAiExecutionToolsOptions } from '../openai/OpenAiExecutionToolsOptions'; | ||
* Rest is used by the `OpenAiExecutionTools`. | ||
* | ||
* @public exported from `@promptbook/langtail` | ||
*/ | ||
@@ -9,0 +11,0 @@ export type LangtailExecutionToolsOptions = OpenAiExecutionToolsOptions; |
@@ -12,2 +12,4 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions'; | ||
* Mocked execution Tools for just echoing the requests for testing purposes. | ||
* | ||
* @public exported from `@promptbook/fake-llm` | ||
*/ | ||
@@ -14,0 +16,0 @@ export declare class MockedEchoLlmExecutionTools implements LlmExecutionTools { |
@@ -13,2 +13,4 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions'; | ||
* Mocked execution Tools for just faking expected responses for testing purposes | ||
* | ||
* @public exported from `@promptbook/fake-llm` | ||
*/ | ||
@@ -15,0 +17,0 @@ export declare class MockedFackedLlmExecutionTools implements LlmExecutionTools { |
@@ -15,2 +15,4 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
* Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -17,0 +19,0 @@ export declare function joinLlmExecutionTools(...llmExecutionTools: Array<LlmExecutionTools>): MultipleLlmExecutionTools; |
@@ -10,2 +10,3 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
* @see https://openai.com/api/pricing/ | ||
* @public exported from `@promptbook/openai` | ||
*/ | ||
@@ -12,0 +13,0 @@ export declare const OPENAI_MODELS: Array<AvailableModel & { |
@@ -13,2 +13,4 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
* Execution Tools for calling OpenAI API. | ||
* | ||
* @public exported from `@promptbook/openai` | ||
*/ | ||
@@ -15,0 +17,0 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools { |
@@ -9,2 +9,4 @@ import type { ClientOptions } from 'openai'; | ||
* Rest is used by the `OpenAiExecutionTools`. | ||
* | ||
* @public exported from `@promptbook/openai` | ||
*/ | ||
@@ -11,0 +13,0 @@ export type OpenAiExecutionToolsOptions = CommonExecutionToolsOptions & ClientOptions & { |
@@ -6,2 +6,8 @@ import type { PipelineCollection } from '../../../collection/PipelineCollection'; | ||
import type { string_uri } from '../../../types/typeAliases'; | ||
/** | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/remote-client` | ||
* @public exported from `@promptbook/remote-server` | ||
*/ | ||
export type RemoteServerOptions = CommonExecutionToolsOptions & { | ||
@@ -32,2 +38,2 @@ /** | ||
* TODO: [🍜] Add anonymous option | ||
*/ | ||
*/ |
@@ -20,2 +20,3 @@ import type { AvailableModel } from '../../execution/LlmExecutionTools'; | ||
* @see https://github.com/webgptorg/promptbook#remote-server | ||
* @public exported from `@promptbook/remote-client` | ||
*/ | ||
@@ -22,0 +23,0 @@ export declare class RemoteLlmExecutionTools implements LlmExecutionTools { |
@@ -6,2 +6,4 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions'; | ||
* Options for `RemoteLlmExecutionTools` | ||
* | ||
* @public exported from `@promptbook/remote-client` | ||
*/ | ||
@@ -8,0 +10,0 @@ export type RemoteLlmExecutionToolsOptions = CommonExecutionToolsOptions & { |
@@ -10,2 +10,3 @@ import type { IDestroyable } from 'destroyable'; | ||
* @see https://github.com/webgptorg/promptbook#remote-server | ||
* @public exported from `@promptbook/remote-server` | ||
*/ | ||
@@ -12,0 +13,0 @@ export declare function startRemoteServer(options: RemoteServerOptions): IDestroyable; |
@@ -8,6 +8,6 @@ import type { PrepareOptions } from '../prepare/PrepareOptions'; | ||
* @see https://github.com/webgptorg/promptbook/discussions/22 | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function preparePersona(personaDescription: string_persona_description, options: PrepareOptions): Promise<PersonaPreparedJson['modelRequirements']>; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
* TODO: [🏢] !! Check validity of `modelName` in pipeline | ||
@@ -14,0 +14,0 @@ * TODO: [🏢] !! Check validity of `systemMessage` in pipeline |
@@ -11,3 +11,8 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function extractBlock(markdown: string_markdown): string; | ||
/** | ||
* TODO: [🧠][🌻] Maybe export through `@promptbook/markdown-utils` not `@promptbook/utils` | ||
*/ |
import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
/** | ||
* Determine if the pipeline is fully prepared | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -8,3 +10,2 @@ export declare function isPipelinePrepared(pipeline: PipelineJson): boolean; | ||
* TODO: [🐠] Maybe base this on `makeValidator` | ||
* TODO: [🔼] Export via core or utils | ||
* TODO: [🧊] Pipeline can be partially prepared, this should return true ONLY if fully prepared | ||
@@ -11,0 +12,0 @@ * TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline` |
@@ -8,6 +8,6 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* Note: This function acts as part of compilation process | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function preparePipeline(pipeline: PipelineJson, options: PrepareOptions): Promise<PipelineJson>; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
* TODO: Write tests for `preparePipeline` | ||
@@ -14,0 +14,0 @@ * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch |
@@ -18,2 +18,4 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -26,3 +28,2 @@ export declare function prepareTemplates(pipeline: PrepareTemplateInput, options: PrepareOptions): Promise<PreparedTemplates>; | ||
* TODO: [♨] !!! Prepare index the samples and maybe templates | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
* TODO: Write tests for `preparePipeline` | ||
@@ -29,0 +30,0 @@ * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch |
import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
/** | ||
* Unprepare just strips the preparation data of the pipeline | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function unpreparePipeline(pipeline: PipelineJson): PipelineJson; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
* TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline` | ||
@@ -9,0 +10,0 @@ * TODO: Write tests for `preparePipeline` |
@@ -8,2 +8,4 @@ import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../../execution/ScriptExecutionTools'; | ||
* **NOT intended to use in the production** due to its unsafe nature, use `JavascriptExecutionTools` instead. | ||
* | ||
* @public exported from `@promptbook/execute-javascript` | ||
*/ | ||
@@ -10,0 +12,0 @@ export declare class JavascriptEvalExecutionTools implements ScriptExecutionTools { |
@@ -6,3 +6,4 @@ import { JavascriptEvalExecutionTools } from './JavascriptEvalExecutionTools'; | ||
* @alias JavascriptExecutionTools | ||
* @public exported from `@promptbook/execute-javascript` | ||
*/ | ||
export declare const JavascriptExecutionTools: typeof JavascriptEvalExecutionTools; |
@@ -23,4 +23,3 @@ import { Promisable } from 'type-fest'; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/types` | ||
* TODO: [🧠][🛫] Constrain `TItem` to JSON-serializable objects only | ||
*/ |
@@ -5,2 +5,4 @@ import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/node` | ||
*/ | ||
@@ -28,5 +30,4 @@ export declare class FilesStorage<TItem> implements PromptbookStorage<TItem> { | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/node` | ||
* TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values | ||
* Note: [🟢] This code should never be published outside of `@promptbook/node` | ||
*/ |
@@ -11,4 +11,1 @@ import type { string_folder_path } from '../../types/typeAliases'; | ||
}; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/types` | ||
*/ |
import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
/** | ||
* Gets wrapper around `localStorage` object which can be used as `PromptbookStorage` | ||
* | ||
* @public exported from `@promptbook/browser` | ||
*/ | ||
export declare function getLocalStorage<TItem>(): PromptbookStorage<TItem>; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/browser` | ||
* Note: [🔵] This code should never be published outside of `@promptbook/browser` | ||
*/ |
import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
/** | ||
* Gets wrapper around `sessionStorage` object which can be used as `PromptbookStorage` | ||
* | ||
* @public exported from `@promptbook/browser` | ||
*/ | ||
export declare function getSessionStorage<TItem>(): PromptbookStorage<TItem>; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/browser` | ||
* Note: [🔵] This code should never be published outside of `@promptbook/browser` | ||
*/ |
import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
/** | ||
* Stores | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -32,4 +34,1 @@ export declare class MemoryStorage<TItem> implements PromptbookStorage<TItem> { | ||
} | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
*/ |
@@ -5,2 +5,4 @@ import { Promisable } from 'type-fest'; | ||
* This class behaves like LocalStorage but separates keys by prefix | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -25,4 +27,1 @@ export declare class PrefixStorage<TItem> implements PromptbookStorage<TItem> { | ||
} | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/core` | ||
*/ |
@@ -6,2 +6,4 @@ import type { ExecutionReportJson } from './ExecutionReportJson'; | ||
* Converts execution report from JSON to string format | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -8,0 +10,0 @@ export declare function executionReportJsonToString(executionReportJson: ExecutionReportJson, options?: Partial<ExecutionReportStringOptions>): ExecutionReportString; |
import type { number_percent } from '../typeAliases'; | ||
/** | ||
* Options for `executionReportJsonToString` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -17,2 +19,4 @@ export type ExecutionReportStringOptions = { | ||
* Default options for generating an execution report string | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
@@ -19,0 +23,0 @@ export declare const ExecutionReportStringOptionsDefaults: { |
@@ -94,3 +94,2 @@ import type { ModelVariant } from './ModelVariant'; | ||
/** | ||
* TODO: [🔼] !!!!! (<- To all [🔼]) Export all from `@promptbook/types` | ||
* TODO: [🧠][🈁] `seed` should maybe be somewhere else (not in `ModelRequirements`) (simmilar that `user` identification is not here) | ||
@@ -97,0 +96,0 @@ * TODO: [🧠][💱] Add more model options: `stop_token`, `logit_bias`, `logprobs` (`top_logprobs`), `top_k`, `top_p`, `presence_penalty`, `frequency_penalty`, `bestOf`, `logitBias`, `logitBiasType`,... |
@@ -105,3 +105,2 @@ import type { ExpectFormatCommand } from '../commands/EXPECT/ExpectFormatCommand'; | ||
/** | ||
* TODO: [🔼] !!!! Export all from `@promptbook/types` | ||
* TODO: [🧄] Replace all "github.com/webgptorg/promptbook#xxx" with "ptbk.io/xxx" | ||
@@ -108,0 +107,0 @@ * TODO: [✔] Check ModelRequirements in runtime |
@@ -175,2 +175,4 @@ import { RESERVED_PARAMETER_NAMES } from '../config'; | ||
* For example `"**Hello** World!"` | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -182,2 +184,4 @@ export type string_markdown = string; | ||
* Markdown text with exactly ONE heading on first line NO less NO more | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -190,2 +194,4 @@ export type string_markdown_section = string; | ||
* BUT with formatting, lists, blockquotes, blocks, etc. is allowed | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -200,2 +206,4 @@ export type string_markdown_section_content = string; | ||
* For example `"**Hello** World!"` | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -580,5 +588,4 @@ export type string_markdown_text = string; | ||
* TODO: !!! Change "For example" to @example | ||
* TODO: !! Cleanup | ||
* TODO: !! Change to branded types | ||
* TODO: [📂] Export all this file through `@promptbook/types` | ||
* TODO: Delete type aliases that are not exported or used internally | ||
*/ |
@@ -6,3 +6,4 @@ import type { string_date_iso8601 } from '../types/typeAliases'; | ||
* @returns string_date branded type | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function $currentDate(): string_date_iso8601; |
import type { WritableDeep } from 'type-fest'; | ||
/** | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function deepClone<TObject>(objectValue: TObject): WritableDeep<TObject>; | ||
/** | ||
* TODO: [🔼] Export from `@promptbook/utils` | ||
* TODO: [🧠] Is there a way how to meaningfully test this utility | ||
*/ |
@@ -15,2 +15,3 @@ import type { ReadonlyDeep } from 'type-fest'; | ||
* @returns The same object as the input, but deeply frozen | ||
* @public exported from `@promptbook/utils` | ||
* | ||
@@ -21,4 +22,3 @@ * Note: This function mutates the object and returns the original (but mutated-deep-freezed) object | ||
/** | ||
* TODO: [🔼] Export from `@promptbook/utils` | ||
* TODO: [🧠] Is there a way how to meaningfully test this utility | ||
*/ |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Counts number of characters in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countCharacters(text: string): ExpectationAmount; |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Counts number of lines in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countLines(text: string): ExpectationAmount; |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Counts number of pages in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countPages(text: string): ExpectationAmount; |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Counts number of paragraphs in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countParagraphs(text: string): ExpectationAmount; |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Split text into sentences | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -8,3 +10,5 @@ export declare function splitIntoSentences(text: string): Array<string>; | ||
* Counts number of sentences in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countSentences(text: string): ExpectationAmount; |
import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
/** | ||
* Counts number of words in the text | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function countWords(text: string): ExpectationAmount; |
@@ -5,3 +5,5 @@ import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
* Index of all counter functions | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare const CountUtils: Record<ExpectationUnit, (text: string) => ExpectationAmount>; |
@@ -8,3 +8,4 @@ import type { string_parameter_name } from '../types/typeAliases'; | ||
* @returns the list of parameter names | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function extractParameterNames(template: string_template): Set<string_parameter_name>; |
/** | ||
* Detects if the code is running in a browser environment in main thread (Not in a web worker) | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -7,2 +9,4 @@ export declare const isRunningInBrowser: Function; | ||
* Detects if the code is running in a Node.js environment | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -12,6 +16,5 @@ export declare const isRunningInNode: Function; | ||
* Detects if the code is running in a web worker | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare const isRunningInWebWorker: Function; | ||
/** | ||
* TODO: [🔼] !!! Export via `@promptbook/utils` | ||
*/ |
@@ -6,3 +6,3 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* | ||
* @private within the repository | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -13,1 +13,4 @@ export declare function addAutoGeneratedSection(content: string_markdown, options: { | ||
}): string_markdown; | ||
/** | ||
* TODO: [🏛] This can be part of markdown builder | ||
*/ |
@@ -31,3 +31,3 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* | ||
* @private within the repository | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -34,0 +34,0 @@ export declare function createMarkdownChart(options: CreateMarkdownChartOptions): string_markdown; |
@@ -6,4 +6,7 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* | ||
* @private within the repository | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function createMarkdownTable(table: Array<Array<string_markdown_text>>): string_markdown; | ||
/** | ||
* TODO: [🏛] This can be part of markdown builder | ||
*/ |
@@ -5,3 +5,8 @@ import type { string_markdown_text } from '../../types/typeAliases'; | ||
* It is useful when you want have block in block | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function escapeMarkdownBlock(value: string_markdown_text): string_markdown_text; | ||
/** | ||
* TODO: [🏛] This can be part of markdown builder | ||
*/ |
@@ -29,3 +29,3 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* @returns code blocks with language and content | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -32,0 +32,0 @@ export declare function extractAllBlocksFromMarkdown(markdown: string_markdown): Array<CodeBlock>; |
@@ -12,4 +12,5 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* @param markdown any valid markdown | ||
* @returns | ||
* @returns @@@ | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function extractAllListItemsFromMarkdown(markdown: string_markdown): string_markdown_text[]; |
@@ -15,2 +15,3 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* @returns code block with language and content | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -17,0 +18,0 @@ export declare function extractOneBlockFromMarkdown(markdown: string_markdown): CodeBlock; |
@@ -7,5 +7,8 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* - All other headings are normalized to h2 | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function flattenMarkdown<TContent extends string_markdown>(markdown: TContent): TContent; | ||
/** | ||
* TODO: [🏛] This can be part of markdown builder | ||
* Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more | ||
@@ -12,0 +15,0 @@ * sophisticated implementation of this function through parsing markdown into JSON structure |
@@ -6,2 +6,4 @@ import type { string_markdown_section } from '../../types/typeAliases'; | ||
* Parsed markdown section | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -24,2 +26,4 @@ export type MarkdownSection = { | ||
* Parses markdown section to title its level and content | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
@@ -26,0 +30,0 @@ export declare function parseMarkdownSection(value: string_markdown_section): MarkdownSection; |
@@ -8,3 +8,4 @@ import type { string_html } from '../../types/typeAliases'; | ||
* @returns {string} The input string with all comments removed. | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function removeContentComments<TContent extends string_html | string_markdown>(content: TContent): TContent; |
@@ -7,3 +7,4 @@ import type { string_markdown_text } from '../../types/typeAliases'; | ||
* @returns {string} The input string with all Markdown tags removed. | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function removeMarkdownFormatting(str: string_markdown_text): string; |
@@ -5,5 +5,8 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
* Splits the markdown into sections by headings | ||
* | ||
* @public exported from `@promptbook/markdown-utils` | ||
*/ | ||
export declare function splitMarkdownIntoSections(markdown: string_markdown): Array<string_markdown_section>; | ||
/** | ||
* TODO: [🏛] This can be part of markdown builder | ||
* Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more | ||
@@ -10,0 +13,0 @@ * sophisticated implementation of this function through parsing markdown into JSON structure |
/** | ||
* Makes first letter of a string uppercase | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function capitalize(word: string): string; |
/** | ||
* Makes first letter of a string uppercase | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function decapitalize(word: string): string; |
@@ -9,3 +9,5 @@ /** | ||
* > ... | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare const DIACRITIC_VARIANTS_LETTERS: Record<string, string>; |
@@ -8,2 +8,4 @@ /** | ||
* For example `"keyword"` | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -15,2 +17,3 @@ export type string_keyword = string; | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -17,0 +20,0 @@ export type IKeywords = Set<string_keyword>; |
@@ -7,3 +7,5 @@ import type { string_keyword } from './IKeywords'; | ||
* @returns if keyword is valid or not | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidKeyword(keyword: string): keyword is string_keyword; |
@@ -0,1 +1,9 @@ | ||
/** | ||
* @@@ | ||
* | ||
* @param name @@@ | ||
* @returns @@@ | ||
* @example @@@ | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function nameToUriPart(name: string): string; |
@@ -0,1 +1,9 @@ | ||
/** | ||
* @@@ | ||
* | ||
* @param name @@@ | ||
* @returns @@@ | ||
* @example @@@ | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function nameToUriParts(name: string): string[]; |
@@ -6,4 +6,14 @@ /** | ||
* @example 'i-love-promptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export type string_kebab_case = string; | ||
/** | ||
* @@@ | ||
* | ||
* @param text @@@ | ||
* @returns @@@ | ||
* @example 'hello-world' | ||
* @example 'i-love-promptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function normalizeToKebabCase(text: string): string_kebab_case; |
@@ -6,4 +6,15 @@ /** | ||
* @example 'iLovePromptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export type string_camelCase = string; | ||
/** | ||
* @@@ | ||
* | ||
* @param text @@@ | ||
* @param _isFirstLetterCapital @@@ | ||
* @returns @@@ | ||
* @example 'helloWorld' | ||
* @example 'iLovePromptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function normalizeTo_camelCase(text: string, _isFirstLetterCapital?: boolean): string_camelCase; | ||
@@ -10,0 +21,0 @@ /** |
@@ -6,4 +6,13 @@ /** | ||
* @example 'ILovePromptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export type string_PascalCase = string; | ||
/** | ||
* | ||
* @param text @public exported from `@promptbook/utils` | ||
* @returns | ||
* @example 'HelloWorld' | ||
* @example 'ILovePromptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function normalizeTo_PascalCase(text: string): string_PascalCase; |
@@ -6,4 +6,14 @@ /** | ||
* @example 'I_LOVE_PROMPTBOOK' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export type string_SCREAMING_CASE = string; | ||
/** | ||
* @@@ | ||
* | ||
* @param text @@@ | ||
* @returns @@@ | ||
* @example 'HELLO_WORLD' | ||
* @example 'I_LOVE_PROMPTBOOK' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function normalizeTo_SCREAMING_CASE(text: string): string_SCREAMING_CASE; | ||
@@ -10,0 +20,0 @@ /** |
@@ -8,2 +8,11 @@ /** | ||
export type string_snake_case = string; | ||
/** | ||
* @@@ | ||
* | ||
* @param text @@@ | ||
* @returns @@@ | ||
* @example 'hello_world' | ||
* @example 'i_love_promptbook' | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function normalizeTo_snake_case(text: string): string_snake_case; |
@@ -10,2 +10,3 @@ import type { really_unknown } from '../organization/really_unknown'; | ||
* @returns {Set} of keywords without diacritics in lowercase | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -12,0 +13,0 @@ export declare function parseKeywords(input: really_unknown): IKeywords; |
@@ -7,3 +7,4 @@ import type { IKeywords } from './IKeywords'; | ||
* @returns {Set} of keywords without diacritics in lowercase | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function parseKeywordsFromString(input: string): IKeywords; |
/** | ||
* @@@ | ||
* | ||
* @param input @@@ | ||
* @returns @@@ | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function removeDiacritics(input: string): string; | ||
/** | ||
* TODO: [Ж] Variant for cyrillic (and in general non-latin) letters | ||
*/ |
import type { IKeywords } from './IKeywords'; | ||
/** | ||
* @@@ | ||
* | ||
* @param haystack | ||
* @param needle | ||
* @returns | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function searchKeywords(haystack: IKeywords, needle: IKeywords): boolean; |
@@ -10,3 +10,3 @@ /** | ||
* | ||
* @private within the parseCommand | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -16,2 +16,3 @@ export declare function parseNumber(value: string | number): number; | ||
* TODO: Maybe use sth. like safe-eval in fraction/calculation case @see https://www.npmjs.com/package/safe-eval | ||
* TODO: [🧠][🌻] Maybe export through `@promptbook/markdown-utils` not `@promptbook/utils` | ||
*/ |
@@ -6,3 +6,4 @@ import type { number_seed } from '../../types/typeAliases'; | ||
* Warning: This function is not cryptographically secure (it uses Math.random internally) | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function $randomSeed(): number_seed; |
@@ -6,3 +6,4 @@ /** | ||
* @returns text without emojis | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function removeEmojis(text: string): string; |
@@ -12,3 +12,4 @@ /** | ||
* @returns text without quotes | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function removeQuotes(text: string): string; |
@@ -10,3 +10,4 @@ import type { Parameters } from '../types/typeAliases'; | ||
* @throws {PipelineExecutionError} if parameter is not defined, not closed, or not opened | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function replaceParameters(template: string_template, parameters: Parameters): string; |
@@ -5,2 +5,3 @@ /** | ||
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -7,0 +8,0 @@ export declare function difference<TItem>(a: Set<TItem>, b: Set<TItem>, isEqual?: (a: TItem, b: TItem) => boolean): Set<TItem>; |
@@ -5,3 +5,4 @@ /** | ||
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function intersection<TItem>(...sets: Array<Set<TItem>>): Set<TItem>; |
@@ -5,3 +5,4 @@ /** | ||
* @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function union<TItem>(...sets: Array<Set<TItem>>): Set<TItem>; |
@@ -7,3 +7,4 @@ /** | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function trimCodeBlock(value: string): string; |
@@ -6,3 +6,5 @@ /** | ||
* if you want to start code block in the prompt but you don't want to end it in the result. | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function trimEndOfCodeBlock(value: string): string; |
@@ -31,2 +31,3 @@ /** | ||
* @returns text without quotes | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -33,0 +34,0 @@ export declare function unwrapResult(text: string, options?: UnwrapResultOptions): string; |
@@ -7,3 +7,4 @@ import type { string_file_path } from '../../../types/typeAliases'; | ||
* Note: This does not check if the file exists only if the path is valid | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidFilePath(filePath: really_unknown): filePath is string_file_path; |
import type { string_javascript_name } from '../../../types/typeAliases'; | ||
import type { really_unknown } from '../../organization/really_unknown'; | ||
/** | ||
* @@@ | ||
* | ||
* @param javascriptName @@@ | ||
* @returns @@@ | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidJavascriptName(javascriptName: really_unknown): javascriptName is string_javascript_name; |
@@ -12,3 +12,5 @@ import type { string_promptbook_version } from '../../../version'; | ||
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidPromptbookVersion(version: really_unknown): version is string_promptbook_version; |
@@ -9,3 +9,5 @@ import type { string_semantic_version } from '../../../types/typeAliases'; | ||
* - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidSemanticVersion(version: really_unknown): version is string_semantic_version; |
@@ -8,3 +8,5 @@ import type { string_hostname } from '../../../types/typeAliases'; | ||
* - `isHostnameOnPrivateNetwork` *(this one)* which tests just hostname | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isHostnameOnPrivateNetwork(hostname: string_hostname): boolean; |
@@ -11,3 +11,4 @@ import type { string_url } from '../../../types/typeAliases'; | ||
* @returns {boolean} Returns true if the IP address is reserved for private networks or localhost, otherwise false. | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isUrlOnPrivateNetwork(url: URL | string_url): boolean; |
@@ -9,2 +9,4 @@ import type { string_pipeline_url } from '../../../types/typeAliases'; | ||
* - `isValidPipelineUrl` *(this one)* which tests just pipeline URL | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
@@ -11,0 +13,0 @@ export declare function isValidPipelineUrl(url: really_unknown): url is string_pipeline_url; |
@@ -10,3 +10,5 @@ import type { string_url } from '../../../types/typeAliases'; | ||
* - `isValidPipelineUrl` *(this one)* which tests just promptbook URL | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidUrl(url: really_unknown): url is string_url; |
@@ -5,3 +5,5 @@ import type { string_uuid } from '../../../types/typeAliases'; | ||
* Checks if value is valid uuid | ||
* | ||
* @public exported from `@promptbook/utils` | ||
*/ | ||
export declare function isValidUuid(value: really_unknown): value is string_uuid; |
import type { string_semantic_version } from './types/typeAliases'; | ||
/** | ||
* The version of the Promptbook library | ||
* | ||
* @public exported from all packages | ||
*/ | ||
export declare const PROMPTBOOK_VERSION: string_promptbook_version; | ||
export type string_promptbook_version = string_semantic_version; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
742315
844
15257