@promptbook/azure-openai
Advanced tools
Comparing version 0.71.0-0 to 0.71.0-7
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { SimplePromptInterfaceTools } from '../knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools'; | ||
import { SimplePromptInterfaceTools } from '../dialogs/simple-prompt/SimplePromptInterfaceTools'; | ||
import { getLocalStorage } from '../storage/local-storage/getLocalStorage'; | ||
@@ -4,0 +4,0 @@ import { getSessionStorage } from '../storage/local-storage/getSessionStorage'; |
@@ -16,2 +16,3 @@ import { PROMPTBOOK_VERSION } from '../version'; | ||
import { EXECUTIONS_CACHE_DIRNAME } from '../config'; | ||
import { SCRAPE_CACHE_DIRNAME } from '../config'; | ||
import { PIPELINE_COLLECTION_BASE_FILENAME } from '../config'; | ||
@@ -24,3 +25,2 @@ import { RESERVED_PARAMETER_NAMES } from '../config'; | ||
import { pipelineJsonToString } from '../conversion/pipelineJsonToString'; | ||
import type { PipelineStringToJsonOptions } from '../conversion/pipelineStringToJson'; | ||
import { pipelineStringToJson } from '../conversion/pipelineStringToJson'; | ||
@@ -31,2 +31,5 @@ import { pipelineStringToJsonSync } from '../conversion/pipelineStringToJsonSync'; | ||
import { validatePipeline } from '../conversion/validation/validatePipeline'; | ||
import { CallbackInterfaceTools } from '../dialogs/callback/CallbackInterfaceTools'; | ||
import type { CallbackInterfaceToolsOptions } from '../dialogs/callback/CallbackInterfaceToolsOptions'; | ||
import { AbstractFormatError } from '../errors/AbstractFormatError'; | ||
import { CollectionError } from '../errors/CollectionError'; | ||
@@ -36,3 +39,5 @@ import { EnvironmentMismatchError } from '../errors/EnvironmentMismatchError'; | ||
import { ERRORS } from '../errors/index'; | ||
import { KnowledgeScrapeError } from '../errors/KnowledgeScrapeError'; | ||
import { LimitReachedError } from '../errors/LimitReachedError'; | ||
import { MissingToolsError } from '../errors/MissingToolsError'; | ||
import { NotFoundError } from '../errors/NotFoundError'; | ||
@@ -54,8 +59,5 @@ import { NotYetImplementedError } from '../errors/NotYetImplementedError'; | ||
import { CsvFormatDefinition } from '../formats/csv/CsvFormatDefinition'; | ||
import { CsvFormatError } from '../formats/csv/CsvFormatError'; | ||
import { MANDATORY_CSV_SETTINGS } from '../formats/csv/CsvSettings'; | ||
import { TextFormatDefinition } from '../formats/text/TextFormatDefinition'; | ||
import { CallbackInterfaceTools } from '../knowledge/dialogs/callback/CallbackInterfaceTools'; | ||
import type { CallbackInterfaceToolsOptions } from '../knowledge/dialogs/callback/CallbackInterfaceToolsOptions'; | ||
import { prepareKnowledgePieces } from '../knowledge/prepare-knowledge/_common/prepareKnowledgePieces'; | ||
import { prepareKnowledgeFromMarkdown } from '../knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown'; | ||
import { $llmToolsMetadataRegister } from '../llm-providers/_common/$llmToolsMetadataRegister'; | ||
@@ -76,2 +78,9 @@ import { $llmToolsRegister } from '../llm-providers/_common/$llmToolsRegister'; | ||
import { unpreparePipeline } from '../prepare/unpreparePipeline'; | ||
import { prepareKnowledgePieces } from '../scrapers/_common/prepareKnowledgePieces'; | ||
import { legacyDocumentScraper } from '../scrapers/document-legacy/legacyDocumentScraper'; | ||
import { documentScraper } from '../scrapers/document/documentScraper'; | ||
import { SCRAPERS } from '../scrapers/index'; | ||
import { markdownScraper } from '../scrapers/markdown/markdownScraper'; | ||
import { pdfScraper } from '../scrapers/pdf/pdfScraper'; | ||
import { websiteScraper } from '../scrapers/website/websiteScraper'; | ||
import { MemoryStorage } from '../storage/memory/MemoryStorage'; | ||
@@ -99,2 +108,3 @@ import { PrefixStorage } from '../storage/utils/PrefixStorage'; | ||
export { EXECUTIONS_CACHE_DIRNAME }; | ||
export { SCRAPE_CACHE_DIRNAME }; | ||
export { PIPELINE_COLLECTION_BASE_FILENAME }; | ||
@@ -107,3 +117,2 @@ export { RESERVED_PARAMETER_NAMES }; | ||
export { pipelineJsonToString }; | ||
export type { PipelineStringToJsonOptions }; | ||
export { pipelineStringToJson }; | ||
@@ -114,2 +123,5 @@ export { pipelineStringToJsonSync }; | ||
export { validatePipeline }; | ||
export { CallbackInterfaceTools }; | ||
export type { CallbackInterfaceToolsOptions }; | ||
export { AbstractFormatError }; | ||
export { CollectionError }; | ||
@@ -119,3 +131,5 @@ export { EnvironmentMismatchError }; | ||
export { ERRORS }; | ||
export { KnowledgeScrapeError }; | ||
export { LimitReachedError }; | ||
export { MissingToolsError }; | ||
export { NotFoundError }; | ||
@@ -137,8 +151,5 @@ export { NotYetImplementedError }; | ||
export { CsvFormatDefinition }; | ||
export { CsvFormatError }; | ||
export { MANDATORY_CSV_SETTINGS }; | ||
export { TextFormatDefinition }; | ||
export { CallbackInterfaceTools }; | ||
export type { CallbackInterfaceToolsOptions }; | ||
export { prepareKnowledgePieces }; | ||
export { prepareKnowledgeFromMarkdown }; | ||
export { $llmToolsMetadataRegister }; | ||
@@ -159,2 +170,9 @@ export { $llmToolsRegister }; | ||
export { unpreparePipeline }; | ||
export { prepareKnowledgePieces }; | ||
export { legacyDocumentScraper }; | ||
export { documentScraper }; | ||
export { SCRAPERS }; | ||
export { markdownScraper }; | ||
export { pdfScraper }; | ||
export { websiteScraper }; | ||
export { MemoryStorage }; | ||
@@ -161,0 +179,0 @@ export { PrefixStorage }; |
@@ -5,3 +5,5 @@ import { PROMPTBOOK_VERSION } from '../version'; | ||
import { createLlmToolsFromEnv } from '../llm-providers/_common/createLlmToolsFromEnv'; | ||
import { FilesStorage } from '../storage/files-storage/FilesStorage'; | ||
import { FileCacheStorage } from '../storage/file-cache-storage/FileCacheStorage'; | ||
import { $execCommand } from '../utils/execCommand/$execCommand'; | ||
import { $execCommands } from '../utils/execCommand/$execCommands'; | ||
export { PROMPTBOOK_VERSION }; | ||
@@ -11,2 +13,4 @@ export { createCollectionFromDirectory }; | ||
export { createLlmToolsFromEnv }; | ||
export { FilesStorage }; | ||
export { FileCacheStorage }; | ||
export { $execCommand }; | ||
export { $execCommands }; |
@@ -13,5 +13,5 @@ import type { PipelineCollection } from '../collection/PipelineCollection'; | ||
import type { TemplateType } from '../commands/TEMPLATE/TemplateTypes'; | ||
import type { PipelineStringToJsonOptions } from '../conversion/pipelineStringToJson'; | ||
import type { PrettifyOptions } from '../conversion/prettify/PrettifyOptions'; | ||
import type { renderPipelineMermaidOptions } from '../conversion/prettify/renderPipelineMermaidOptions'; | ||
import type { CallbackInterfaceToolsOptions } from '../dialogs/callback/CallbackInterfaceToolsOptions'; | ||
import type { ErrorJson } from '../errors/utils/ErrorJson'; | ||
@@ -41,3 +41,2 @@ import type { AvailableModel } from '../execution/AvailableModel'; | ||
import type { CsvSettings } from '../formats/csv/CsvSettings'; | ||
import type { CallbackInterfaceToolsOptions } from '../knowledge/dialogs/callback/CallbackInterfaceToolsOptions'; | ||
import type { LlmToolsConfiguration } from '../llm-providers/_common/LlmToolsConfiguration'; | ||
@@ -70,7 +69,11 @@ import type { LlmToolsMetadata } from '../llm-providers/_common/LlmToolsMetadata'; | ||
import type { CollectionRemoteServerOptions } from '../llm-providers/remote/interfaces/RemoteServerOptions'; | ||
import type { PrepareOptions } from '../prepare/PrepareOptions'; | ||
import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions'; | ||
import type { Converter } from '../scrapers/_common/Converter'; | ||
import type { Scraper } from '../scrapers/_common/Scraper'; | ||
import type { ScraperSourceHandler } from '../scrapers/_common/Scraper'; | ||
import type { ScraperIntermediateSource } from '../scrapers/_common/ScraperIntermediateSource'; | ||
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 { FileCacheStorageOptions } from '../storage/file-cache-storage/FileCacheStorageOptions'; | ||
import type { ExecutionPromptReportJson } from '../types/execution-report/ExecutionPromptReportJson'; | ||
@@ -172,9 +175,8 @@ import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson'; | ||
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_absolute_filename } from '../types/typeAliases'; | ||
import type { string_relative_filename } from '../types/typeAliases'; | ||
import type { string_filename } from '../types/typeAliases'; | ||
import type { string_absolute_dirname } from '../types/typeAliases'; | ||
import type { string_relative_dirname } from '../types/typeAliases'; | ||
import type { string_dirname } from '../types/typeAliases'; | ||
import type { string_person_fullname } from '../types/typeAliases'; | ||
@@ -222,2 +224,4 @@ import type { string_person_profile } from '../types/typeAliases'; | ||
import type { Registered } from '../utils/$Register'; | ||
import type { IExecCommandOptions } from '../utils/execCommand/IExecCommandOptions'; | ||
import type { IExecCommandOptionsAdvanced } from '../utils/execCommand/IExecCommandOptions'; | ||
import type { FromtoItems } from '../utils/FromtoItems'; | ||
@@ -249,5 +253,5 @@ import type { CodeBlock } from '../utils/markdown/extractAllBlocksFromMarkdown'; | ||
export type { TemplateType }; | ||
export type { PipelineStringToJsonOptions }; | ||
export type { PrettifyOptions }; | ||
export type { renderPipelineMermaidOptions }; | ||
export type { CallbackInterfaceToolsOptions }; | ||
export type { ErrorJson }; | ||
@@ -277,3 +281,2 @@ export type { AvailableModel }; | ||
export type { CsvSettings }; | ||
export type { CallbackInterfaceToolsOptions }; | ||
export type { LlmToolsConfiguration }; | ||
@@ -306,7 +309,11 @@ export type { LlmToolsMetadata }; | ||
export type { CollectionRemoteServerOptions }; | ||
export type { PrepareOptions }; | ||
export type { PrepareAndScrapeOptions }; | ||
export type { Converter }; | ||
export type { Scraper }; | ||
export type { ScraperSourceHandler }; | ||
export type { ScraperIntermediateSource }; | ||
export type { JavascriptExecutionToolsOptions }; | ||
export type { PostprocessingFunction }; | ||
export type { PromptbookStorage }; | ||
export type { FilesStorageOptions }; | ||
export type { FileCacheStorageOptions }; | ||
export type { ExecutionPromptReportJson }; | ||
@@ -408,9 +415,8 @@ export type { ExecutionReportJson }; | ||
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_absolute_filename }; | ||
export type { string_relative_filename }; | ||
export type { string_filename }; | ||
export type { string_absolute_dirname }; | ||
export type { string_relative_dirname }; | ||
export type { string_dirname }; | ||
export type { string_person_fullname }; | ||
@@ -458,2 +464,4 @@ export type { string_person_profile }; | ||
export type { Registered }; | ||
export type { IExecCommandOptions }; | ||
export type { IExecCommandOptionsAdvanced }; | ||
export type { FromtoItems }; | ||
@@ -460,0 +468,0 @@ export type { CodeBlock }; |
@@ -10,3 +10,3 @@ import type { Command as Program } from 'commander'; | ||
* TODO: [🗽] Unite branding and make single place for it | ||
* Note: [🟡] This code should never be published outside of `@promptbook/cli` | ||
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli` | ||
*/ |
@@ -9,3 +9,3 @@ import type { Command as Program } from 'commander'; | ||
/** | ||
* Note: [🟡] This code should never be published outside of `@promptbook/cli` | ||
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli` | ||
*/ |
@@ -12,4 +12,4 @@ import type { Command as Program } from 'commander'; | ||
* TODO: [0] DRY Javascript and typescript - Maybe make ONLY typescript and for javascript just remove types | ||
* Note: [🟡] This code should never be published outside of `@promptbook/cli` | ||
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli` | ||
* TODO: [🖇] What about symlinks? Maybe flag --follow-symlinks | ||
*/ |
@@ -9,4 +9,4 @@ import type { Command as Program } from 'commander'; | ||
/** | ||
* Note: [🟡] This code should never be published outside of `@promptbook/cli` | ||
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli` | ||
* TODO: [🖇] What about symlinks? Maybe flag --follow-symlinks | ||
*/ |
@@ -11,3 +11,3 @@ import { promptbookCli } from './promptbookCli'; | ||
/** | ||
* Note: [🟡] This code should never be published outside of `@promptbook/cli` | ||
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli` | ||
*/ |
@@ -11,3 +11,3 @@ /** | ||
* Note: 11:11 | ||
* Note: [🟡] This code should never be published outside of `@promptbook/cli` | ||
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli` | ||
*/ |
@@ -1,8 +0,11 @@ | ||
import type { PipelineStringToJsonOptions } from '../../conversion/pipelineStringToJson'; | ||
import type { string_folder_path } from '../../types/typeAliases'; | ||
import type { PrepareAndScrapeOptions } from '../../prepare/PrepareAndScrapeOptions'; | ||
import type { string_dirname } from '../../types/typeAliases'; | ||
import type { PipelineCollection } from '../PipelineCollection'; | ||
/** | ||
* Options for `createCollectionFromDirectory` function | ||
* | ||
* Note: `rootDirname` is not needed because it is the folder in which `.ptbk.md` file is located | ||
* This is not same as `path` which is the first argument of `createCollectionFromDirectory` - it can be a subfolder | ||
*/ | ||
type CreatePipelineCollectionFromDirectoryOptions = PipelineStringToJsonOptions & { | ||
type CreatePipelineCollectionFromDirectoryOptions = Omit<PrepareAndScrapeOptions, 'rootDirname'> & { | ||
/** | ||
@@ -44,7 +47,7 @@ * If true, the directory is searched recursively for pipelines | ||
*/ | ||
export declare function createCollectionFromDirectory(path: string_folder_path, options?: CreatePipelineCollectionFromDirectoryOptions): Promise<PipelineCollection>; | ||
export declare function createCollectionFromDirectory(path: string_dirname, options?: CreatePipelineCollectionFromDirectoryOptions): Promise<PipelineCollection>; | ||
export {}; | ||
/** | ||
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli` | ||
* Note: [🟢] Code in this file should never be published outside of `@promptbook/node` and `@promptbook/cli` | ||
* TODO: [🖇] What about symlinks? Maybe option isSymlinksFollowed | ||
*/ |
@@ -28,3 +28,3 @@ import type { string_url } from '../../types/typeAliases'; | ||
/** | ||
* TODO:[main] !!!! [🧠] Library precompilation and do not mix markdown and json promptbooks | ||
* TODO: [main] !!!! [🧠] Library precompilation and do not mix markdown and json promptbooks | ||
*/ |
@@ -8,5 +8,5 @@ import type { PipelineBothCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./BOILERPLATE-README.md for more details <- TODO: @@@ Write theese README files OR remove this link + add annotation here (to all commands) | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
*/ | ||
export declare const boilerplateCommandParser: PipelineBothCommandParser<BoilerplateCommand>; |
@@ -6,5 +6,5 @@ import type { PipelineTemplateCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./EXPECT-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
*/ | ||
export declare const expectCommandParser: PipelineTemplateCommandParser<ExpectCommand>; |
@@ -8,3 +8,3 @@ import type { PipelineTemplateCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./FOREACH-README.md for more details <- TODO: @@@ Write theese README files OR remove this link + add annotation here (to all commands) | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
@@ -11,0 +11,0 @@ */ |
@@ -22,3 +22,7 @@ import type { string_parameter_name } from '../../types/typeAliases'; | ||
*/ | ||
readonly subparameterNames: Array<string_parameter_name>; | ||
readonly inputSubparameterNames: Array<string_parameter_name>; | ||
/** | ||
* @@@ | ||
*/ | ||
readonly outputSubparameterName: string_parameter_name; | ||
}; |
@@ -6,5 +6,5 @@ import type { PipelineTemplateCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./FORMAT-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
*/ | ||
export declare const formatCommandParser: PipelineTemplateCommandParser<FormatCommand>; |
@@ -6,5 +6,5 @@ import type { PipelineTemplateCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./JOKER-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
*/ | ||
export declare const jokerCommandParser: PipelineTemplateCommandParser<JokerCommand>; |
@@ -6,3 +6,3 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./KNOWLEDGE-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,5 +6,5 @@ import type { PipelineBothCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./MODEL-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
*/ | ||
export declare const modelCommandParser: PipelineBothCommandParser<ModelCommand>; |
@@ -6,5 +6,5 @@ import type { PipelineBothCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./PARAMETER-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
*/ | ||
export declare const parameterCommandParser: PipelineBothCommandParser<ParameterCommand>; |
@@ -6,5 +6,5 @@ import type { PipelineBothCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./PERSONA-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
*/ | ||
export declare const personaCommandParser: PipelineBothCommandParser<PersonaCommand>; |
@@ -6,5 +6,5 @@ import type { PipelineTemplateCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./POSTPROCESS-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
*/ | ||
export declare const postprocessCommandParser: PipelineTemplateCommandParser<PostprocessCommand>; |
@@ -6,5 +6,5 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./PROMPTBOOK_VERSION-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
*/ | ||
export declare const promptbookVersionCommandParser: PipelineHeadCommandParser<PromptbookVersionCommand>; |
@@ -6,3 +6,3 @@ import type { PipelineTemplateCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./TEMPLATE-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,5 +6,5 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./URL-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
*/ | ||
export declare const urlCommandParser: PipelineHeadCommandParser<UrlCommand>; |
@@ -6,3 +6,3 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./ACTION-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser'; | ||
* | ||
* @see ./INSTRUMENT-README.md for more details | ||
* @see `documentationUrl` for more details | ||
* @private within the commands folder | ||
@@ -9,0 +9,0 @@ */ |
@@ -87,2 +87,4 @@ import type { CsvSettings } from './formats/csv/CsvSettings'; | ||
* | ||
* Note: When the folder does not exist, it is created recursively | ||
* | ||
* @public exported from `@promptbook/core` | ||
@@ -92,2 +94,10 @@ */ | ||
/** | ||
* Where to store the scrape cache | ||
* | ||
* Note: When the folder does not exist, it is created recursively | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare const SCRAPE_CACHE_DIRNAME = "/.promptbook/scrape-cache"; | ||
/** | ||
* The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory` | ||
@@ -94,0 +104,0 @@ * |
@@ -1,18 +0,5 @@ | ||
import type { LlmExecutionTools } from '../execution/LlmExecutionTools'; | ||
import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions'; | ||
import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
import type { PipelineString } from '../types/PipelineString'; | ||
/** | ||
* Options for `pipelineStringToJson` | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export type PipelineStringToJsonOptions = { | ||
/** | ||
* Tools for processing required for preparation of knowledge *(not for actual execution)* | ||
* | ||
* Note: If you provide `null`, the knowledge will not be prepared | ||
*/ | ||
readonly llmTools: LlmExecutionTools | null; | ||
}; | ||
/** | ||
* Compile pipeline from string (markdown) format to JSON format | ||
@@ -34,3 +21,3 @@ * | ||
*/ | ||
export declare function pipelineStringToJson(pipelineString: PipelineString, options?: PipelineStringToJsonOptions): Promise<PipelineJson>; | ||
export declare function pipelineStringToJson(pipelineString: PipelineString, options?: PrepareAndScrapeOptions): Promise<PipelineJson>; | ||
/** | ||
@@ -37,0 +24,0 @@ * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch |
@@ -21,3 +21,3 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
/** | ||
* TODO:[main] !!!! Warn if used only sync version | ||
* TODO: [main] !!!! Warn if used only sync version | ||
* TODO: [🚞] Report here line/column of error | ||
@@ -24,0 +24,0 @@ * TODO: Use spaceTrim more effectively |
@@ -28,3 +28,3 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
/** | ||
* TODO: [🥯] This should be part of scripting + testing utilities set which are not builded into packages | ||
* Note: [⚫] Code in this file should never be published in any package | ||
*/ |
@@ -11,1 +11,4 @@ import type { PipelineExecutor } from '../PipelineExecutor'; | ||
export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor; | ||
/** | ||
* TODO: [🐚] Change onProgress to object that represents the running execution, can be subscribed via RxJS to and also awaited | ||
*/ |
@@ -7,3 +7,3 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
*/ | ||
export interface CreatePipelineExecutorOptions { | ||
export type CreatePipelineExecutorOptions = { | ||
/** | ||
@@ -21,2 +21,5 @@ * The pipeline to be executed | ||
readonly settings?: Partial<CreatePipelineExecutorSettings>; | ||
} | ||
}; | ||
/** | ||
* TODO: !!!!!! Unite `CreatePipelineExecutorOptions` and `CreatePipelineExecutorSettings` OR describe the difference | ||
*/ |
import type { CsvSettings } from '../../formats/csv/CsvSettings'; | ||
export type CreatePipelineExecutorSettings = { | ||
import type { PrepareAndScrapeOptions } from '../../prepare/PrepareAndScrapeOptions'; | ||
export type CreatePipelineExecutorSettings = Omit<PrepareAndScrapeOptions, 'llmTools'> & { | ||
/** | ||
@@ -10,14 +11,2 @@ * When executor does not satisfy expectations it will be retried this amount of times | ||
/** | ||
* Maximum number of tasks running in parallel | ||
* | ||
* @default MAX_PARALLEL_COUNT | ||
*/ | ||
readonly maxParallelCount: number; | ||
/** | ||
* If true, the preparation logs additional information | ||
* | ||
* @default false | ||
*/ | ||
readonly isVerbose: boolean; | ||
/** | ||
* Settings for CSV format | ||
@@ -24,0 +13,0 @@ * |
@@ -25,3 +25,3 @@ import type { Promisable, ReadonlyDeep } from 'type-fest'; | ||
*/ | ||
readonly onProgress?: (taskProgress: TaskProgress) => Promisable<void>; | ||
onProgress?(taskProgress: TaskProgress): Promisable<void>; | ||
/** | ||
@@ -57,1 +57,4 @@ * @@@ | ||
export {}; | ||
/** | ||
* TODO: [🐚] Change onProgress to object that represents the running execution, can be subscribed via RxJS to and also awaited | ||
*/ |
@@ -63,1 +63,4 @@ import { Promisable, ReadonlyDeep } from 'type-fest'; | ||
*/ | ||
/** | ||
* TODO: [🐚] Change onProgress to object that represents the running execution, can be subscribed via RxJS to and also awaited | ||
*/ |
@@ -7,2 +7,2 @@ import type { EmbeddingVector } from './EmbeddingVector'; | ||
*/ | ||
export declare function embeddingVectorToString(embeddingVector: EmbeddingVector): string; | ||
export declare function embeddingVectorToString(embeddingVector: Readonly<EmbeddingVector>): string; |
@@ -17,3 +17,3 @@ import type { Arrayable } from '../types/Arrayable'; | ||
*/ | ||
llm?: Arrayable<LlmExecutionTools>; | ||
readonly llm?: Arrayable<LlmExecutionTools>; | ||
/** | ||
@@ -29,3 +29,3 @@ * Tools for executing scripts | ||
*/ | ||
script?: Arrayable<ScriptExecutionTools>; | ||
readonly script?: Arrayable<ScriptExecutionTools>; | ||
/** | ||
@@ -37,3 +37,3 @@ * Tools for interacting with the user | ||
*/ | ||
userInterface?: UserInterfaceTools; | ||
readonly userInterface?: UserInterfaceTools; | ||
}; |
@@ -17,3 +17,4 @@ import type { Promisable } from 'type-fest'; | ||
/** | ||
* TODO: [🐚] Change onProgress to object that represents the running execution, can be subscribed via RxJS to and also awaited | ||
* TODO: [🧠] Should this file be in /execution or /types folder? | ||
*/ |
@@ -17,4 +17,5 @@ import type { Promisable } from 'type-fest'; | ||
* @public exported from `@promptbook/utils` | ||
* @deprecated [🪂] Use queues instead | ||
*/ | ||
export declare function forEachAsync<TItem>(array: Array<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: Array<TItem>) => Promisable<void>): Promise<void>; | ||
export {}; |
import type { Promisable } from 'type-fest'; | ||
import type { Parameters } from '../../types/typeAliases'; | ||
import type { string_parameter_name } from '../../types/typeAliases'; | ||
import type { string_name } from '../../types/typeAliases'; | ||
@@ -26,3 +27,3 @@ import type { string_SCREAMING_CASE } from '../../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
*/ | ||
mapValues(value: TValue, settings: TSettings, mapCallback: (subvalues: Parameters, index: number) => Promisable<string>): Promise<string>; | ||
mapValues(value: TValue, outputParameterName: string_parameter_name, settings: TSettings, mapCallback: (subvalues: Parameters, index: number) => Promisable<string>): Promise<string>; | ||
}; | ||
@@ -29,0 +30,0 @@ /** |
@@ -20,3 +20,3 @@ import type { LlmToolsConfiguration } from './LlmToolsConfiguration'; | ||
* TODO: [🧠] Is there some meaningfull way how to test this util | ||
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli` | ||
* Note: [🟢] Code in this file should never be published outside of `@promptbook/node` and `@promptbook/cli` | ||
* TODO: [👷♂️] @@@ Manual about construction of llmTools | ||
@@ -23,0 +23,0 @@ * TODO: This should be maybe not under `_common` but under `utils` |
@@ -22,5 +22,5 @@ import { MultipleLlmExecutionTools } from '../multiple/MultipleLlmExecutionTools'; | ||
* TODO: [🧠] Is there some meaningfull way how to test this util | ||
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli` | ||
* Note: [🟢] Code in this file should never be published outside of `@promptbook/node` and `@promptbook/cli` | ||
* TODO: [🥃] Allow `ptbk make` without llm tools | ||
* TODO: This should be maybe not under `_common` but under `utils` | ||
*/ |
@@ -18,3 +18,3 @@ import type { LlmExecutionToolsWithTotalUsage } from './utils/count-total-usage/LlmExecutionToolsWithTotalUsage'; | ||
/** | ||
* Note: [🟡] This code should never be published outside of `@promptbook/cli` | ||
* Note: [🟡] Code in this file should never be published outside of `@promptbook/cli` | ||
* TODO: [👷♂️] @@@ Manual about construction of llmTools | ||
@@ -21,0 +21,0 @@ * TODO: [🥃] Allow `ptbk make` without llm tools |
@@ -0,1 +1,2 @@ | ||
import Anthropic from '@anthropic-ai/sdk'; | ||
import type { AvailableModel } from '../../execution/AvailableModel'; | ||
@@ -29,3 +30,3 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
get description(): string_markdown; | ||
private getClient; | ||
getClient(): Promise<Anthropic>; | ||
/** | ||
@@ -32,0 +33,0 @@ * Check the `options` passed to `constructor` |
#!/usr/bin/env ts-node | ||
export {}; | ||
/** | ||
* TODO:[main] !!! Playground with WebGPT / Promptbook.studio anonymous server | ||
* TODO:[main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* TODO: [main] !!! Playground with WebGPT / Promptbook.studio anonymous server | ||
* TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* Note: [⚫] Code in this file should never be published in any package | ||
*/ |
@@ -0,1 +1,2 @@ | ||
import { OpenAIClient } from '@azure/openai'; | ||
import type { AvailableModel } from '../../execution/AvailableModel'; | ||
@@ -29,3 +30,3 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
get description(): string_markdown; | ||
private getClient; | ||
getClient(): Promise<OpenAIClient>; | ||
/** | ||
@@ -48,2 +49,8 @@ * Check the `options` passed to `constructor` | ||
/** | ||
* Library `@azure/openai` has bug/weird behavior that it does not throw error but hangs forever | ||
* | ||
* This method wraps the promise with timeout | ||
*/ | ||
private withTimeout; | ||
/** | ||
* Changes Azure error (which is not propper Error but object) to propper Error | ||
@@ -50,0 +57,0 @@ */ |
@@ -5,2 +5,3 @@ #!/usr/bin/env ts-node | ||
* TODO: Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* Note: [⚫] Code in this file should never be published in any package | ||
*/ |
#!/usr/bin/env ts-node | ||
export {}; | ||
/** | ||
* Note: [⚫] Code in this file should never be published in any package | ||
*/ |
#!/usr/bin/env ts-node | ||
export {}; | ||
/** | ||
* Note: [⚫] Code in this file should never be published in any package | ||
*/ |
@@ -0,1 +1,2 @@ | ||
import OpenAI from 'openai'; | ||
import type { AvailableModel } from '../../execution/AvailableModel'; | ||
@@ -30,3 +31,3 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
get description(): string_markdown; | ||
private getClient; | ||
getClient(): Promise<OpenAI>; | ||
/** | ||
@@ -33,0 +34,0 @@ * Check the `options` passed to `constructor` |
#!/usr/bin/env ts-node | ||
export {}; | ||
/** | ||
* TODO:[main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* Note: [⚫] Code in this file should never be published in any package | ||
*/ |
#!/usr/bin/env ts-node | ||
import '../../openai/register-constructor'; | ||
/** | ||
* Note: [⚫] Code in this file should never be published in any package | ||
*/ |
@@ -1,2 +0,2 @@ | ||
import type { PrepareOptions } from '../prepare/PrepareOptions'; | ||
import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions'; | ||
import type { PersonaPreparedJson } from '../types/PipelineJson/PersonaJson'; | ||
@@ -10,3 +10,3 @@ import type { string_persona_description } from '../types/typeAliases'; | ||
*/ | ||
export declare function preparePersona(personaDescription: string_persona_description, options: PrepareOptions): Promise<PersonaPreparedJson['modelRequirements']>; | ||
export declare function preparePersona(personaDescription: string_persona_description, options: PrepareAndScrapeOptions): Promise<PersonaPreparedJson['modelRequirements']>; | ||
/** | ||
@@ -13,0 +13,0 @@ * TODO: [🔃][main] !!!!! If the persona was prepared with different version or different set of models, prepare it once again |
import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
import type { PrepareOptions } from './PrepareOptions'; | ||
import type { PrepareAndScrapeOptions } from './PrepareAndScrapeOptions'; | ||
/** | ||
@@ -11,3 +11,3 @@ * Prepare pipeline from string (markdown) format to JSON format | ||
*/ | ||
export declare function preparePipeline(pipeline: PipelineJson, options: PrepareOptions): Promise<PipelineJson>; | ||
export declare function preparePipeline(pipeline: PipelineJson, options: PrepareAndScrapeOptions): Promise<PipelineJson>; | ||
/** | ||
@@ -14,0 +14,0 @@ * TODO: Write tests for `preparePipeline` |
import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
import type { TemplateJson } from '../types/PipelineJson/TemplateJson'; | ||
import type { PrepareOptions } from './PrepareOptions'; | ||
import type { PrepareAndScrapeOptions } from './PrepareAndScrapeOptions'; | ||
type PrepareTemplateInput = Pick<PipelineJson, 'templates' | 'parameters'> & { | ||
@@ -21,3 +21,3 @@ /** | ||
*/ | ||
export declare function prepareTemplates(pipeline: PrepareTemplateInput, options: PrepareOptions): Promise<PreparedTemplates>; | ||
export declare function prepareTemplates(pipeline: PrepareTemplateInput, options: PrepareAndScrapeOptions): Promise<PreparedTemplates>; | ||
export {}; | ||
@@ -24,0 +24,0 @@ /** |
@@ -9,3 +9,3 @@ import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
/** | ||
* Note: [🔵] This code should never be published outside of `@promptbook/browser` | ||
* Note: [🔵] Code in this file should never be published outside of `@promptbook/browser` | ||
*/ |
@@ -9,3 +9,3 @@ import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
/** | ||
* Note: [🔵] This code should never be published outside of `@promptbook/browser` | ||
* Note: [🔵] Code in this file should never be published outside of `@promptbook/browser` | ||
*/ |
@@ -42,4 +42,1 @@ import type { string_markdown_text } from '../typeAliases'; | ||
}; | ||
/** | ||
* TODO: !!!!!! FOREACH in report | ||
*/ |
@@ -0,1 +1,2 @@ | ||
import type { ReadonlyDeep } from 'type-fest'; | ||
import type { ExecutionReportJson } from './ExecutionReportJson'; | ||
@@ -9,3 +10,3 @@ import type { ExecutionReportString } from './ExecutionReportString'; | ||
*/ | ||
export declare function executionReportJsonToString(executionReportJson: ExecutionReportJson, options?: Partial<ExecutionReportStringOptions>): ExecutionReportString; | ||
export declare function executionReportJsonToString(executionReportJson: ReadonlyDeep<ExecutionReportJson>, options?: Partial<ExecutionReportStringOptions>): ExecutionReportString; | ||
/** | ||
@@ -12,0 +13,0 @@ * TODO: Add mermaid chart for every report |
@@ -36,5 +36,5 @@ import type { string_markdown_text } from '../typeAliases'; | ||
/** | ||
* TODO: [🧠] !!!!!! Should be here registered subparameter from foreach or not? | ||
* TODO: [🧠] Should be here registered subparameters from foreach or not? | ||
* TODO: [♈] Probbably move expectations from templates to parameters | ||
* TODO: [🍙] Make some standard order of json properties | ||
*/ |
import type { ModelRequirements } from '../ModelRequirements'; | ||
import type { string_file_path } from '../typeAliases'; | ||
import type { string_filename } from '../typeAliases'; | ||
import type { string_markdown_text } from '../typeAliases'; | ||
@@ -36,3 +36,3 @@ import type { string_pipeline_url } from '../typeAliases'; | ||
*/ | ||
readonly sourceFile?: string_file_path; | ||
readonly sourceFile?: string_filename; | ||
/** | ||
@@ -39,0 +39,0 @@ * Title of the promptbook |
@@ -159,3 +159,3 @@ import type { TupleToUnion } from 'type-fest'; | ||
*/ | ||
export type string_knowledge_source_link = string_url | string_file_path; | ||
export type string_knowledge_source_link = string_url | string_filename; | ||
/** | ||
@@ -390,2 +390,3 @@ * Semantic helper | ||
* For example `"5a0a153d-7be9-4018-9eda-e0e2e2b89bd9"` | ||
* TODO: [🥬] Make some system for hashes and ids of promptbook | ||
*/ | ||
@@ -428,3 +429,3 @@ export type string_uuid = string & { | ||
*/ | ||
export type string_file_absolute_path = string; | ||
export type string_absolute_filename = string; | ||
/** | ||
@@ -435,7 +436,7 @@ * Semantic helper | ||
*/ | ||
export type string_file_relative_path = string; | ||
export type string_relative_filename = string; | ||
/** | ||
* Semantic helper | ||
*/ | ||
export type string_file_path = string_file_absolute_path | string_file_relative_path; | ||
export type string_filename = string_absolute_filename | string_relative_filename; | ||
/** | ||
@@ -446,3 +447,3 @@ * Semantic helper | ||
*/ | ||
export type string_folder_absolute_path = string; | ||
export type string_absolute_dirname = string; | ||
/** | ||
@@ -453,13 +454,9 @@ * Semantic helper | ||
*/ | ||
export type string_folder_relative_path = string; | ||
export type string_relative_dirname = string; | ||
/** | ||
* Semantic helper | ||
*/ | ||
export type string_folder_path = string_file_absolute_path | string_file_relative_path; | ||
export type string_dirname = string_absolute_dirname | string_relative_dirname; | ||
/** | ||
* Semantic helper | ||
*/ | ||
export type string_filename = string; | ||
/** | ||
* Semantic helper | ||
* | ||
@@ -601,5 +598,5 @@ * For example `"John Smith"` | ||
/**. | ||
* TODO:[main] !!! Change "For example" to @example | ||
* TODO: [main] !!! Change "For example" to @example | ||
* TODO: !! Change to branded types | ||
* TODO: Delete type aliases that are not exported or used internally | ||
*/ |
@@ -1,2 +0,2 @@ | ||
import type { string_folder_path } from '../../types/typeAliases'; | ||
import type { string_dirname } from '../../types/typeAliases'; | ||
/** | ||
@@ -9,5 +9,5 @@ * Checks if the directory exists | ||
*/ | ||
export declare function $isDirectoryExisting(directoryPath: string_folder_path): Promise<boolean>; | ||
export declare function $isDirectoryExisting(directoryPath: string_dirname): Promise<boolean>; | ||
/** | ||
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli` | ||
* Note: [🟢 <- TODO: [🦖] !!!!!! Split scrapers into packages and enable] Code in this file should never be published outside of `@promptbook/node` and `@promptbook/cli` | ||
* TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages | ||
@@ -14,0 +14,0 @@ * TODO: [🧠][📂] "directory" vs "folder" |
@@ -1,2 +0,2 @@ | ||
import type { string_file_path } from '../../types/typeAliases'; | ||
import type { string_filename } from '../../types/typeAliases'; | ||
/** | ||
@@ -9,7 +9,7 @@ * Checks if the file exists | ||
*/ | ||
export declare function $isFileExisting(filePath: string_file_path): Promise<boolean>; | ||
export declare function $isFileExisting(filename: string_filename): Promise<boolean>; | ||
/** | ||
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli` | ||
* Note: [🟢 <- TODO: [🦖] !!!!!! Split scrapers into packages and enable] Code in this file should never be published outside of `@promptbook/node` and `@promptbook/cli` | ||
* TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages | ||
* TODO: [🖇] What about symlinks? | ||
*/ |
@@ -1,3 +0,3 @@ | ||
import type { string_file_path } from '../../types/typeAliases'; | ||
import type { string_folder_path } from '../../types/typeAliases'; | ||
import type { string_dirname } from '../../types/typeAliases'; | ||
import type { string_filename } from '../../types/typeAliases'; | ||
/** | ||
@@ -13,6 +13,6 @@ * Reads all files in the directory | ||
*/ | ||
export declare function $listAllFiles(path: string_folder_path, isRecursive: boolean): Promise<Array<string_file_path>>; | ||
export declare function $listAllFiles(path: string_dirname, isRecursive: boolean): Promise<Array<string_filename>>; | ||
/** | ||
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli` | ||
* Note: [🟢 <- TODO: [🦖] !!!!!! Split scrapers into packages and enable] Code in this file should never be published outside of `@promptbook/node` and `@promptbook/cli` | ||
* TODO: [🖇] What about symlinks? | ||
*/ |
@@ -1,2 +0,2 @@ | ||
import type { string_file_path } from '../../../types/typeAliases'; | ||
import type { string_filename } from '../../../types/typeAliases'; | ||
import type { really_unknown } from '../../organization/really_unknown'; | ||
@@ -9,2 +9,2 @@ /** | ||
*/ | ||
export declare function isValidFilePath(filePath: really_unknown): filePath is string_file_path; | ||
export declare function isValidFilePath(filename: really_unknown): filename is string_filename; |
{ | ||
"name": "@promptbook/azure-openai", | ||
"version": "0.71.0-0", | ||
"version": "0.71.0-7", | ||
"description": "Supercharge your use of large language models", | ||
@@ -54,3 +54,3 @@ "private": false, | ||
"peerDependencies": { | ||
"@promptbook/core": "0.71.0-0" | ||
"@promptbook/core": "0.71.0-7" | ||
}, | ||
@@ -57,0 +57,0 @@ "dependencies": { |
@@ -23,2 +23,8 @@ <!-- ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten --> | ||
<blockquote style="color: #ff8811"> | ||
<b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>. | ||
</blockquote> | ||
## 📦 Package `@promptbook/azure-openai` | ||
@@ -25,0 +31,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
671428
537
12896
569