Socket
Socket
Sign inDemoInstall

@promptbook/remote-client

Package Overview
Dependencies
Maintainers
0
Versions
365
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@promptbook/remote-client - npm Package Compare versions

Comparing version 0.60.0-4 to 0.60.0-5

esm/typings/src/collection/collectionToJson.d.ts

2

esm/index.es.js

@@ -159,5 +159,5 @@ import { io } from 'socket.io-client';

*/
var PROMPTBOOK_VERSION = '0.60.0-3';
var PROMPTBOOK_VERSION = '0.60.0-4';
export { PROMPTBOOK_VERSION, RemoteLlmExecutionTools };
//# sourceMappingURL=index.es.js.map
declare const _default: {
title: string;
promptbookUrl: string;
pipelineUrl: string;
promptbookVersion: string;

@@ -5,0 +5,0 @@ parameters: {

@@ -0,1 +1,6 @@

import { collectionToJson } from '../collection/collectionToJson';
import { createCollectionFromJson } from '../collection/constructors/createCollectionFromJson';
import { createCollectionFromPromise } from '../collection/constructors/createCollectionFromPromise';
import { createCollectionFromUrl } from '../collection/constructors/createCollectionFromUrl';
import { createSubcollection } from '../collection/constructors/createSubcollection';
import { pipelineJsonToString } from '../conversion/pipelineJsonToString';

@@ -16,3 +21,3 @@ import { pipelineStringToJson } from '../conversion/pipelineStringToJson';

import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
import { createPromptbookExecutor } from '../execution/createPromptbookExecutor';
import { createPipelineExecutor } from '../execution/createPipelineExecutor';
import { embeddingVectorToString } from '../execution/embeddingVectorToString';

@@ -26,7 +31,2 @@ import { addUsage } from '../execution/utils/addUsage';

import { prepareKnowledgeFromMarkdown } from '../knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown';
import { createCollectionFromJson } from '../library/constructors/createCollectionFromJson';
import { createCollectionFromPromise } from '../library/constructors/createCollectionFromPromise';
import { createCollectionFromUrl } from '../library/constructors/createCollectionFromUrl';
import { createSubcollection } from '../library/constructors/createSubcollection';
import { libraryToJson } from '../library/libraryToJson';
import { MultipleLlmExecutionTools } from '../llm-providers/multiple/MultipleLlmExecutionTools';

@@ -40,8 +40,8 @@ import { ExecutionTypes } from '../types/ExecutionTypes';

export { ExecutionTypes };
export { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, addUsage, assertsExecutionSuccessful, checkExpectations, embeddingVectorToString, executionReportJsonToString, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPipelineString, usageToWorktime, };
export { createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createSubcollection as createSublibrary, libraryToJson, };
export { addUsage, assertsExecutionSuccessful, checkExpectations, embeddingVectorToString, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPipelineString, usageToWorktime, };
export { collectionToJson, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createSubcollection as createSublibrary, };
export { SimplePromptInterfaceTools };
export { pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, validatePipeline };
export { MultipleLlmExecutionTools, createPromptbookExecutor };
export { createPipelineExecutor, MultipleLlmExecutionTools };
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
export { CollectionError, ExecutionError, ExpectError, NotFoundError, PipelineLogicError, ReferenceError, SyntaxError, TemplateError, UnexpectedError, };

@@ -1,4 +0,4 @@

import { createCollectionFromDirectory } from '../library/constructors/createCollectionFromDirectory';
import { createCollectionFromDirectory } from '../collection/constructors/createCollectionFromDirectory';
import { PROMPTBOOK_VERSION } from '../version';
export { PROMPTBOOK_VERSION };
export { createCollectionFromDirectory };

@@ -0,1 +1,2 @@

import type { PipelineCollection } from '../collection/PipelineCollection';
import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions';

@@ -5,7 +6,6 @@ import { EmbeddingVector } from '../execution/EmbeddingVector';

import type { AvailableModel, LlmExecutionTools } from '../execution/LlmExecutionTools';
import type { PipelineExecutor } from '../execution/PipelineExecutor';
import type { PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, UncertainNumber } from '../execution/PromptResult';
import type { PromptbookExecutor } from '../execution/PromptbookExecutor';
import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools';
import type { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools';
import type { PipelineCollection } from '../library/PipelineCollection';
import type { ExecutionType } from '../types/ExecutionTypes';

@@ -31,5 +31,5 @@ import type { ModelRequirements, ModelVariant } from '../types/ModelRequirements';

export { EXPECTATION_UNITS };
export type { AvailableModel, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgeJson, LlmExecutionTools, LlmTemplateJson, MaterialKnowledgePieceJson, ModelRequirements, ModelVariant, Parameters, PipelineCollection, PipelineJson, PipelineString, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptDialogJson, PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, PromptbookExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, 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_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_script, string_sha256, 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_version, };
export type { AvailableModel, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgeJson, LlmExecutionTools, LlmTemplateJson, MaterialKnowledgePieceJson, ModelRequirements, ModelVariant, Parameters, PipelineCollection, PipelineExecutor, PipelineJson, PipelineString, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptDialogJson, PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, 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_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_script, string_sha256, 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_version, };
/**
* TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
*/

@@ -10,4 +10,4 @@ /**

/**
* The name of the builded promptbook library made by CLI `promptbook make` and for lookup in `createCollectionFromDirectory`
* The name of the builded pipeline collection made by CLI `promptbook make` and for lookup in `createCollectionFromDirectory`
*/
export declare const PROMPTBOOK_MAKED_BASE_FILENAME = "index";
export declare const PIPELINE_COLLECTION_BASE_FILENAME = "index";

@@ -8,4 +8,4 @@ import type { PipelineString } from '../../types/PipelineString';

/**
* TODO: Maybe use some Mermaid library instead of string templating
* TODO: Maybe use some Mermaid package instead of string templating
* TODO: [๐Ÿ•Œ] When more than 2 functionalities, split into separate functions
*/

@@ -23,4 +23,4 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';

/**
* TODO: Maybe use some Mermaid library instead of string templating
* TODO: Maybe use some Mermaid package instead of string templating
* TODO: [๐Ÿ•Œ] When more than 2 functionalities, split into separate functions
*/
/**
* This error indicates that the promptbook library cannot be propperly loaded
* This error indicates that the pipeline collection cannot be propperly loaded
*/

@@ -4,0 +4,0 @@ export declare class CollectionError extends Error {

/**
* This error indicates errors during the execution of the promptbook
* This error indicates errors during the execution of the pipeline
*/

@@ -4,0 +4,0 @@ export declare class ExecutionError extends Error {

/**
* This error indicates that promptbook not found in the library
* This error indicates that promptbook not found in the collection
*/

@@ -4,0 +4,0 @@ export declare class NotFoundError extends Error {

@@ -1,2 +0,2 @@

import type { PromptbookExecutor } from './PromptbookExecutor';
import type { PipelineExecutor } from './PipelineExecutor';
/**

@@ -8,5 +8,5 @@ * Asserts that the execution of a promptnook is successful

*/
export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PromptbookExecutor>>, 'isSuccessful' | 'errors'>): void;
export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PipelineExecutor>>, 'isSuccessful' | 'errors'>): void;
/**
* TODO: [๐Ÿง ] Can this return type be better typed than void
*/

@@ -6,4 +6,4 @@ /**

/**
* TODO: Figure out how to use library xyzt
* TODO: Figure out how to use NPM package xyzt
* Not using IVectorData due to HUGE dimensionality
*/

@@ -11,4 +11,4 @@ import type { Parameters } from '../../types/Parameters';

*
* @private within the createPromptbookExecutor
* @private within the createPipelineExecutor
*/
export declare function replaceParameters(template: string_template, parameters: Parameters): string;
export {};
/**
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPromptbookExecutor.test.ts"
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPipelineExecutor.test.ts"
*/
export {};
/**
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPromptbookExecutor.test.ts"
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPipelineExecutor.test.ts"
*/
export {};
/**
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPromptbookExecutor.test.ts"
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPipelineExecutor.test.ts"
*/

@@ -0,4 +1,4 @@

import type { PipelineCollection } from '../../../collection/PipelineCollection';
import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
import type { PipelineCollection } from '../../../library/PipelineCollection';
import type { client_id } from '../../../types/typeAliases';

@@ -19,7 +19,7 @@ import type { string_uri } from '../../../types/typeAliases';

/**
* Promptbook library to use
* Promptbook collection to use
*
* This is used to checkl validity of the prompt to prevent DDoS
* This is used to check validity of the prompt to prevent DDoS
*/
readonly library: PipelineCollection;
readonly collection: PipelineCollection;
/**

@@ -26,0 +26,0 @@ * Creates llm execution tools for each client

@@ -13,3 +13,3 @@ import type { IDestroyable } from 'destroyable';

/**
* TODO: [โš–] Expose the library to be able to connect to same library via createCollectionFromUrl
* TODO: [โš–] Expose the collection to be able to connect to same collection via createCollectionFromUrl
* TODO: Handle progress - support streaming

@@ -16,0 +16,0 @@ * TODO: [๐Ÿคนโ€โ™‚๏ธ] Do not hang up immediately but wait until client closes OR timeout

@@ -20,4 +20,4 @@ import type { ExecutionType } from './ExecutionTypes';

export type PromptbookUrlCommand = {
readonly type: 'PROMPTBOOK_URL';
readonly promptbookUrl: URL;
readonly type: 'PIPELINE_URL';
readonly pipelineUrl: URL;
};

@@ -24,0 +24,0 @@ /**

/**
* The thresholds for the relative time in the `moment` library.
* The thresholds for the relative time in the `moment` NPM package.
*

@@ -4,0 +4,0 @@ * @see https://momentjscom.readthedocs.io/en/latest/moment/07-customization/13-relative-time-threshold/

@@ -18,5 +18,5 @@ import type { PromptResult } from '../../execution/PromptResult';

/**
* Unique identifier of the promptbook from promptbook which was executed
* Unique identifier of the pipeline from promptbook which was executed
*/
readonly promptbookUrl?: string_pipeline_url;
readonly pipelineUrl?: string_pipeline_url;
/**

@@ -45,3 +45,3 @@ * Title of from promptbook which was executed

*/
prompt: Omit<Prompt, 'promptbookUrl' | 'parameters'>;
prompt: Omit<Prompt, 'pipelineUrl' | 'parameters'>;
/**

@@ -48,0 +48,0 @@ * Result of the prompt execution (if not failed during LLM execution)

@@ -8,3 +8,3 @@ import type { string_markdown_text } from '../typeAliases';

/**
* Promptbook is the **core concept of this library**.
* Promptbook is the **core concept of this package**.
* It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.

@@ -16,5 +16,5 @@ *

/**
* Unique identifier of the promptbook
* Unique identifier of the pipeline
*
* Note: It must be unique across all promptbooks libraries
* Note: It must be unique across all pipeline collections
* Note: It must use HTTPs URL

@@ -25,3 +25,3 @@ * Tip: You can do versioning in the URL

*/
readonly promptbookUrl?: string_pipeline_url;
readonly pipelineUrl?: string_pipeline_url;
/**

@@ -57,3 +57,3 @@ * Title of the promptbook

* But then immediately reverted back to the single type
* With knowledge as part of the promptbook and library just as a collection of promptbooks
* With knowledge as part of the promptbook and collection just as a collection of promptbooks
*/

@@ -84,3 +84,3 @@ import type { ExpectFormatCommand } from '../Command';

* - It should start uppercase and contain letters and numbers
* - The promptbookUrl together with hash and name are used to identify the prompt template in the pipeline
* - The pipelineUrl together with hash and name are used to identify the prompt template in the pipeline
*/

@@ -87,0 +87,0 @@ readonly name: string_name;

/**
* Promptbook is the **core concept of this library**.
* Promptbook is the **core concept of this package**.
* It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.

@@ -4,0 +4,0 @@ *

@@ -51,11 +51,11 @@ import type { PostprocessingFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions';

/**
* Unique identifier of the promptbook with specific template name as hash
* Unique identifier of the pipeline with specific template name as hash
*
* @example https://promptbook.studio/webgpt/write-website-content-cs.ptbk.md#keywords
*/
readonly promptbookUrl: string_pipeline_url_with_hashtemplate;
readonly pipelineUrl: string_pipeline_url_with_hashtemplate;
/**
* Parameters used in the prompt
*
* Note: This is redundant (same information is in promptbookUrl+content) but useful for logging and debugging
* Note: This is redundant (same information is in pipelineUrl+content) but useful for logging and debugging
*/

@@ -62,0 +62,0 @@ readonly parameters: Record<string_name, string>;

@@ -32,3 +32,3 @@ import type { ExecutionType } from './ExecutionTypes';

* The type of the execution.
* Note: The Promptbook library reports everything, in the app level you can filter out the execution types that you don't want to show to the user.
* Note: The pipeline executor reports everything, in the app level you can filter out the execution types that you don't want to show to the user.
*/

@@ -35,0 +35,0 @@ readonly executionType: ExecutionType;

@@ -21,3 +21,3 @@ import type { string_char_emoji } from '../types/typeAliasEmoji';

/**
* TODO: Mirror from Collboard or some common library
* TODO: Mirror from Collboard or some common package
*/
{
"name": "@promptbook/remote-client",
"version": "0.60.0-4",
"version": "0.60.0-5",
"description": "Supercharge your use of large language models",

@@ -50,3 +50,3 @@ "private": false,

"peerDependencies": {
"@promptbook/core": "0.60.0-4"
"@promptbook/core": "0.60.0-5"
},

@@ -53,0 +53,0 @@ "main": "./umd/index.umd.js",

@@ -38,4 +38,2 @@ # ![Promptbook logo - cube with letters P and B](./other/design/logo-h1.png) Promptbook

## ๐Ÿค The Promptbook Whitepaper

@@ -85,3 +83,3 @@

>
> - PROMPTBOOK URL https://promptbook.studio/webgpt/write-website-content.ptbk.md
> - PIPELINE URL https://promptbook.studio/webgpt/write-website-content.ptbk.md
> - PROMPTBOOK VERSION 0.0.1

@@ -440,3 +438,3 @@ > - INPUTโ€ฏโ€ฏPARAM `{rawTitle}` Automatically suggested a site name or empty text

Library of all promptbooks used in your application.
Each promptbook is a separate `.ptbk.md` file with unique `PROMPTBOOK URL`. Theese urls are used to reference promptbooks in other promptbooks or in the application code.
Each promptbook is a separate `.ptbk.md` file with unique `PIPELINE URL`. Theese urls are used to reference promptbooks in other promptbooks or in the application code.

@@ -579,3 +577,3 @@ ### Prompt Result

Execution report is a simple object or markdown that contains information about the execution of the promptbook.
Execution report is a simple object or markdown that contains information about the execution of the pipeline.

@@ -582,0 +580,0 @@ [See the example of such a report](/samples/templates/50-advanced.report.md)

@@ -163,3 +163,3 @@ (function (global, factory) {

*/
var PROMPTBOOK_VERSION = '0.60.0-3';
var PROMPTBOOK_VERSION = '0.60.0-4';

@@ -166,0 +166,0 @@ exports.PROMPTBOOK_VERSION = PROMPTBOOK_VERSION;

declare const _default: {
title: string;
promptbookUrl: string;
pipelineUrl: string;
promptbookVersion: string;

@@ -5,0 +5,0 @@ parameters: {

@@ -0,1 +1,6 @@

import { collectionToJson } from '../collection/collectionToJson';
import { createCollectionFromJson } from '../collection/constructors/createCollectionFromJson';
import { createCollectionFromPromise } from '../collection/constructors/createCollectionFromPromise';
import { createCollectionFromUrl } from '../collection/constructors/createCollectionFromUrl';
import { createSubcollection } from '../collection/constructors/createSubcollection';
import { pipelineJsonToString } from '../conversion/pipelineJsonToString';

@@ -16,3 +21,3 @@ import { pipelineStringToJson } from '../conversion/pipelineStringToJson';

import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful';
import { createPromptbookExecutor } from '../execution/createPromptbookExecutor';
import { createPipelineExecutor } from '../execution/createPipelineExecutor';
import { embeddingVectorToString } from '../execution/embeddingVectorToString';

@@ -26,7 +31,2 @@ import { addUsage } from '../execution/utils/addUsage';

import { prepareKnowledgeFromMarkdown } from '../knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown';
import { createCollectionFromJson } from '../library/constructors/createCollectionFromJson';
import { createCollectionFromPromise } from '../library/constructors/createCollectionFromPromise';
import { createCollectionFromUrl } from '../library/constructors/createCollectionFromUrl';
import { createSubcollection } from '../library/constructors/createSubcollection';
import { libraryToJson } from '../library/libraryToJson';
import { MultipleLlmExecutionTools } from '../llm-providers/multiple/MultipleLlmExecutionTools';

@@ -40,8 +40,8 @@ import { ExecutionTypes } from '../types/ExecutionTypes';

export { ExecutionTypes };
export { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, addUsage, assertsExecutionSuccessful, checkExpectations, embeddingVectorToString, executionReportJsonToString, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPipelineString, usageToWorktime, };
export { createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createSubcollection as createSublibrary, libraryToJson, };
export { addUsage, assertsExecutionSuccessful, checkExpectations, embeddingVectorToString, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prepareKnowledgeFromMarkdown, prettifyPipelineString, usageToWorktime, };
export { collectionToJson, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createSubcollection as createSublibrary, };
export { SimplePromptInterfaceTools };
export { pipelineJsonToString, pipelineStringToJson, pipelineStringToJsonSync, validatePipeline };
export { MultipleLlmExecutionTools, createPromptbookExecutor };
export { createPipelineExecutor, MultipleLlmExecutionTools };
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
export { CollectionError, ExecutionError, ExpectError, NotFoundError, PipelineLogicError, ReferenceError, SyntaxError, TemplateError, UnexpectedError, };

@@ -1,4 +0,4 @@

import { createCollectionFromDirectory } from '../library/constructors/createCollectionFromDirectory';
import { createCollectionFromDirectory } from '../collection/constructors/createCollectionFromDirectory';
import { PROMPTBOOK_VERSION } from '../version';
export { PROMPTBOOK_VERSION };
export { createCollectionFromDirectory };

@@ -0,1 +1,2 @@

import type { PipelineCollection } from '../collection/PipelineCollection';
import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions';

@@ -5,7 +6,6 @@ import { EmbeddingVector } from '../execution/EmbeddingVector';

import type { AvailableModel, LlmExecutionTools } from '../execution/LlmExecutionTools';
import type { PipelineExecutor } from '../execution/PipelineExecutor';
import type { PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, UncertainNumber } from '../execution/PromptResult';
import type { PromptbookExecutor } from '../execution/PromptbookExecutor';
import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools';
import type { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools';
import type { PipelineCollection } from '../library/PipelineCollection';
import type { ExecutionType } from '../types/ExecutionTypes';

@@ -31,5 +31,5 @@ import type { ModelRequirements, ModelVariant } from '../types/ModelRequirements';

export { EXPECTATION_UNITS };
export type { AvailableModel, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgeJson, LlmExecutionTools, LlmTemplateJson, MaterialKnowledgePieceJson, ModelRequirements, ModelVariant, Parameters, PipelineCollection, PipelineJson, PipelineString, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptDialogJson, PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, PromptbookExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, 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_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_script, string_sha256, 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_version, };
export type { AvailableModel, CommonExecutionToolsOptions, EmbeddingVector, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, Expectations, FromtoItems, KnowledgeJson, LlmExecutionTools, LlmTemplateJson, MaterialKnowledgePieceJson, ModelRequirements, ModelVariant, Parameters, PipelineCollection, PipelineExecutor, PipelineJson, PipelineString, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptDialogJson, PromptEmbeddingResult, PromptResult, PromptResultUsage, PromptResultUsageCounts, PromptTemplateJson, PromptTemplateParameterJson, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptJson, ScriptLanguage, SimpleTemplateJson, TaskProgress, UncertainNumber, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, 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_person_fullname, string_pipeline_url, string_pipeline_url_with_hashtemplate, string_prompt, string_script, string_sha256, 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_version, };
/**
* TODO: Delete type aliases (from ../types/typeAliases) that are not exported here
*/

@@ -10,4 +10,4 @@ /**

/**
* The name of the builded promptbook library made by CLI `promptbook make` and for lookup in `createCollectionFromDirectory`
* The name of the builded pipeline collection made by CLI `promptbook make` and for lookup in `createCollectionFromDirectory`
*/
export declare const PROMPTBOOK_MAKED_BASE_FILENAME = "index";
export declare const PIPELINE_COLLECTION_BASE_FILENAME = "index";

@@ -8,4 +8,4 @@ import type { PipelineString } from '../../types/PipelineString';

/**
* TODO: Maybe use some Mermaid library instead of string templating
* TODO: Maybe use some Mermaid package instead of string templating
* TODO: [๐Ÿ•Œ] When more than 2 functionalities, split into separate functions
*/

@@ -23,4 +23,4 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';

/**
* TODO: Maybe use some Mermaid library instead of string templating
* TODO: Maybe use some Mermaid package instead of string templating
* TODO: [๐Ÿ•Œ] When more than 2 functionalities, split into separate functions
*/
/**
* This error indicates that the promptbook library cannot be propperly loaded
* This error indicates that the pipeline collection cannot be propperly loaded
*/

@@ -4,0 +4,0 @@ export declare class CollectionError extends Error {

/**
* This error indicates errors during the execution of the promptbook
* This error indicates errors during the execution of the pipeline
*/

@@ -4,0 +4,0 @@ export declare class ExecutionError extends Error {

/**
* This error indicates that promptbook not found in the library
* This error indicates that promptbook not found in the collection
*/

@@ -4,0 +4,0 @@ export declare class NotFoundError extends Error {

@@ -1,2 +0,2 @@

import type { PromptbookExecutor } from './PromptbookExecutor';
import type { PipelineExecutor } from './PipelineExecutor';
/**

@@ -8,5 +8,5 @@ * Asserts that the execution of a promptnook is successful

*/
export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PromptbookExecutor>>, 'isSuccessful' | 'errors'>): void;
export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PipelineExecutor>>, 'isSuccessful' | 'errors'>): void;
/**
* TODO: [๐Ÿง ] Can this return type be better typed than void
*/

@@ -6,4 +6,4 @@ /**

/**
* TODO: Figure out how to use library xyzt
* TODO: Figure out how to use NPM package xyzt
* Not using IVectorData due to HUGE dimensionality
*/

@@ -11,4 +11,4 @@ import type { Parameters } from '../../types/Parameters';

*
* @private within the createPromptbookExecutor
* @private within the createPipelineExecutor
*/
export declare function replaceParameters(template: string_template, parameters: Parameters): string;
export {};
/**
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPromptbookExecutor.test.ts"
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPipelineExecutor.test.ts"
*/
export {};
/**
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPromptbookExecutor.test.ts"
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPipelineExecutor.test.ts"
*/
export {};
/**
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPromptbookExecutor.test.ts"
* TODO: [๐Ÿง ] What should be name of this test "MockedEchoExecutionTools.test.ts" or "createPipelineExecutor.test.ts"
*/

@@ -0,4 +1,4 @@

import type { PipelineCollection } from '../../../collection/PipelineCollection';
import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
import type { PipelineCollection } from '../../../library/PipelineCollection';
import type { client_id } from '../../../types/typeAliases';

@@ -19,7 +19,7 @@ import type { string_uri } from '../../../types/typeAliases';

/**
* Promptbook library to use
* Promptbook collection to use
*
* This is used to checkl validity of the prompt to prevent DDoS
* This is used to check validity of the prompt to prevent DDoS
*/
readonly library: PipelineCollection;
readonly collection: PipelineCollection;
/**

@@ -26,0 +26,0 @@ * Creates llm execution tools for each client

@@ -13,3 +13,3 @@ import type { IDestroyable } from 'destroyable';

/**
* TODO: [โš–] Expose the library to be able to connect to same library via createCollectionFromUrl
* TODO: [โš–] Expose the collection to be able to connect to same collection via createCollectionFromUrl
* TODO: Handle progress - support streaming

@@ -16,0 +16,0 @@ * TODO: [๐Ÿคนโ€โ™‚๏ธ] Do not hang up immediately but wait until client closes OR timeout

@@ -20,4 +20,4 @@ import type { ExecutionType } from './ExecutionTypes';

export type PromptbookUrlCommand = {
readonly type: 'PROMPTBOOK_URL';
readonly promptbookUrl: URL;
readonly type: 'PIPELINE_URL';
readonly pipelineUrl: URL;
};

@@ -24,0 +24,0 @@ /**

/**
* The thresholds for the relative time in the `moment` library.
* The thresholds for the relative time in the `moment` NPM package.
*

@@ -4,0 +4,0 @@ * @see https://momentjscom.readthedocs.io/en/latest/moment/07-customization/13-relative-time-threshold/

@@ -18,5 +18,5 @@ import type { PromptResult } from '../../execution/PromptResult';

/**
* Unique identifier of the promptbook from promptbook which was executed
* Unique identifier of the pipeline from promptbook which was executed
*/
readonly promptbookUrl?: string_pipeline_url;
readonly pipelineUrl?: string_pipeline_url;
/**

@@ -45,3 +45,3 @@ * Title of from promptbook which was executed

*/
prompt: Omit<Prompt, 'promptbookUrl' | 'parameters'>;
prompt: Omit<Prompt, 'pipelineUrl' | 'parameters'>;
/**

@@ -48,0 +48,0 @@ * Result of the prompt execution (if not failed during LLM execution)

@@ -8,3 +8,3 @@ import type { string_markdown_text } from '../typeAliases';

/**
* Promptbook is the **core concept of this library**.
* Promptbook is the **core concept of this package**.
* It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.

@@ -16,5 +16,5 @@ *

/**
* Unique identifier of the promptbook
* Unique identifier of the pipeline
*
* Note: It must be unique across all promptbooks libraries
* Note: It must be unique across all pipeline collections
* Note: It must use HTTPs URL

@@ -25,3 +25,3 @@ * Tip: You can do versioning in the URL

*/
readonly promptbookUrl?: string_pipeline_url;
readonly pipelineUrl?: string_pipeline_url;
/**

@@ -57,3 +57,3 @@ * Title of the promptbook

* But then immediately reverted back to the single type
* With knowledge as part of the promptbook and library just as a collection of promptbooks
* With knowledge as part of the promptbook and collection just as a collection of promptbooks
*/

@@ -84,3 +84,3 @@ import type { ExpectFormatCommand } from '../Command';

* - It should start uppercase and contain letters and numbers
* - The promptbookUrl together with hash and name are used to identify the prompt template in the pipeline
* - The pipelineUrl together with hash and name are used to identify the prompt template in the pipeline
*/

@@ -87,0 +87,0 @@ readonly name: string_name;

/**
* Promptbook is the **core concept of this library**.
* Promptbook is the **core concept of this package**.
* It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.

@@ -4,0 +4,0 @@ *

@@ -51,11 +51,11 @@ import type { PostprocessingFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions';

/**
* Unique identifier of the promptbook with specific template name as hash
* Unique identifier of the pipeline with specific template name as hash
*
* @example https://promptbook.studio/webgpt/write-website-content-cs.ptbk.md#keywords
*/
readonly promptbookUrl: string_pipeline_url_with_hashtemplate;
readonly pipelineUrl: string_pipeline_url_with_hashtemplate;
/**
* Parameters used in the prompt
*
* Note: This is redundant (same information is in promptbookUrl+content) but useful for logging and debugging
* Note: This is redundant (same information is in pipelineUrl+content) but useful for logging and debugging
*/

@@ -62,0 +62,0 @@ readonly parameters: Record<string_name, string>;

@@ -32,3 +32,3 @@ import type { ExecutionType } from './ExecutionTypes';

* The type of the execution.
* Note: The Promptbook library reports everything, in the app level you can filter out the execution types that you don't want to show to the user.
* Note: The pipeline executor reports everything, in the app level you can filter out the execution types that you don't want to show to the user.
*/

@@ -35,0 +35,0 @@ readonly executionType: ExecutionType;

@@ -21,3 +21,3 @@ import type { string_char_emoji } from '../types/typeAliasEmoji';

/**
* TODO: Mirror from Collboard or some common library
* TODO: Mirror from Collboard or some common package
*/
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc