@promptbook/remote-client
Advanced tools
Comparing version 0.71.0-0 to 0.72.0-0
@@ -8,3 +8,3 @@ import { io } from 'socket.io-client'; | ||
*/ | ||
var PROMPTBOOK_VERSION = '0.70.0-1'; | ||
var PROMPTBOOK_VERSION = '0.68.5'; | ||
// TODO:[main] !!!! List here all the versions and annotate + put into script | ||
@@ -327,19 +327,6 @@ | ||
'currentDate', | ||
// <- TODO: !!!!! list here all command names | ||
// <- TODO: Add more like 'date', 'modelName',... | ||
// <- TODO: Add [emoji] + instructions ACRY when adding new reserved parameter | ||
]); | ||
// <- TODO: [🧜♂️] | ||
/** | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
Object.freeze({ | ||
delimiter: ',', | ||
quoteChar: '"', | ||
newline: '\n', | ||
skipEmptyLines: true, | ||
}); | ||
/** | ||
* TODO: [🧠][🧜♂️] Maybe join remoteUrl and path into single value | ||
@@ -346,0 +333,0 @@ */ |
@@ -20,3 +20,2 @@ import { PROMPTBOOK_VERSION } from '../version'; | ||
import { DEFAULT_REMOTE_URL_PATH } from '../config'; | ||
import { DEFAULT_CSV_SETTINGS } from '../config'; | ||
import { IS_VERBOSE } from '../config'; | ||
@@ -43,12 +42,10 @@ import { pipelineJsonToString } from '../conversion/pipelineJsonToString'; | ||
import { assertsExecutionSuccessful } from '../execution/assertsExecutionSuccessful'; | ||
import { createPipelineExecutor } from '../execution/createPipelineExecutor/00-createPipelineExecutor'; | ||
import { createPipelineExecutor } from '../execution/createPipelineExecutor'; | ||
import { embeddingVectorToString } from '../execution/embeddingVectorToString'; | ||
import { ZERO_USAGE } from '../execution/utils/addUsage'; | ||
import { addUsage } from '../execution/utils/addUsage'; | ||
import { isPassingExpectations } from '../execution/utils/checkExpectations'; | ||
import { ZERO_USAGE } from '../execution/utils/usage-constants'; | ||
import { UNCERTAIN_USAGE } from '../execution/utils/usage-constants'; | ||
import { usageToHuman } from '../execution/utils/usageToHuman'; | ||
import { usageToWorktime } from '../execution/utils/usageToWorktime'; | ||
import { CsvFormatDefinition } from '../formats/csv/CsvFormatDefinition'; | ||
import { MANDATORY_CSV_SETTINGS } from '../formats/csv/CsvSettings'; | ||
import { TextFormatDefinition } from '../formats/text/TextFormatDefinition'; | ||
import { CallbackInterfaceTools } from '../knowledge/dialogs/callback/CallbackInterfaceTools'; | ||
@@ -99,3 +96,2 @@ import type { CallbackInterfaceToolsOptions } from '../knowledge/dialogs/callback/CallbackInterfaceToolsOptions'; | ||
export { DEFAULT_REMOTE_URL_PATH }; | ||
export { DEFAULT_CSV_SETTINGS }; | ||
export { IS_VERBOSE }; | ||
@@ -124,10 +120,8 @@ export { pipelineJsonToString }; | ||
export { embeddingVectorToString }; | ||
export { ZERO_USAGE }; | ||
export { addUsage }; | ||
export { isPassingExpectations }; | ||
export { ZERO_USAGE }; | ||
export { UNCERTAIN_USAGE }; | ||
export { usageToHuman }; | ||
export { usageToWorktime }; | ||
export { CsvFormatDefinition }; | ||
export { MANDATORY_CSV_SETTINGS }; | ||
export { TextFormatDefinition }; | ||
export { CallbackInterfaceTools }; | ||
@@ -134,0 +128,0 @@ export type { CallbackInterfaceToolsOptions }; |
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { createOpenAiExecutionTools } from '../llm-providers/openai/createOpenAiExecutionTools'; | ||
import { OPENAI_MODELS } from '../llm-providers/openai/openai-models'; | ||
import { OpenAiAssistantExecutionTools } from '../llm-providers/openai/OpenAiAssistantExecutionTools'; | ||
import type { OpenAiAssistantExecutionToolsOptions } from '../llm-providers/openai/OpenAiAssistantExecutionToolsOptions'; | ||
import { OpenAiExecutionTools } from '../llm-providers/openai/OpenAiExecutionTools'; | ||
@@ -10,4 +12,6 @@ import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions'; | ||
export { OPENAI_MODELS }; | ||
export { OpenAiAssistantExecutionTools }; | ||
export type { OpenAiAssistantExecutionToolsOptions }; | ||
export { OpenAiExecutionTools }; | ||
export type { OpenAiExecutionToolsOptions }; | ||
export { _OpenAiRegistration }; |
@@ -10,3 +10,2 @@ import type { PipelineCollection } from '../collection/PipelineCollection'; | ||
import type { ExpectCommand } from '../commands/EXPECT/ExpectCommand'; | ||
import type { ForeachJson } from '../commands/FOREACH/ForeachJson'; | ||
import type { FormatCommand } from '../commands/FORMAT/FormatCommand'; | ||
@@ -20,4 +19,2 @@ import type { TemplateType } from '../commands/TEMPLATE/TemplateTypes'; | ||
import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions'; | ||
import type { CreatePipelineExecutorOptions } from '../execution/createPipelineExecutor/00-CreatePipelineExecutorOptions'; | ||
import type { CreatePipelineExecutorSettings } from '../execution/createPipelineExecutor/00-CreatePipelineExecutorSettings'; | ||
import type { EmbeddingVector } from '../execution/EmbeddingVector'; | ||
@@ -40,4 +37,2 @@ import type { ExecutionTools } from '../execution/ExecutionTools'; | ||
import type { UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools'; | ||
import type { FormatSubvalueDefinition } from '../formats/_common/FormatSubvalueDefinition'; | ||
import type { CsvSettings } from '../formats/csv/CsvSettings'; | ||
import type { CallbackInterfaceToolsOptions } from '../knowledge/dialogs/callback/CallbackInterfaceToolsOptions'; | ||
@@ -56,2 +51,3 @@ import type { LlmToolsConfiguration } from '../llm-providers/_common/LlmToolsConfiguration'; | ||
import type { MultipleLlmExecutionTools } from '../llm-providers/multiple/MultipleLlmExecutionTools'; | ||
import type { OpenAiAssistantExecutionToolsOptions } from '../llm-providers/openai/OpenAiAssistantExecutionToolsOptions'; | ||
import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions'; | ||
@@ -232,3 +228,2 @@ import type { PromptbookServer_Error } from '../llm-providers/remote/interfaces/PromptbookServer_Error'; | ||
import type { string_snake_case } from '../utils/normalization/normalizeTo_snake_case'; | ||
import type { empty_object } from '../utils/organization/empty_object'; | ||
import type { really_any } from '../utils/organization/really_any'; | ||
@@ -246,3 +241,2 @@ import type { TODO_any } from '../utils/organization/TODO_any'; | ||
export type { ExpectCommand }; | ||
export type { ForeachJson }; | ||
export type { FormatCommand }; | ||
@@ -256,4 +250,2 @@ export type { TemplateType }; | ||
export type { CommonExecutionToolsOptions }; | ||
export type { CreatePipelineExecutorOptions }; | ||
export type { CreatePipelineExecutorSettings }; | ||
export type { EmbeddingVector }; | ||
@@ -276,4 +268,2 @@ export type { ExecutionTools }; | ||
export type { UserInterfaceToolsPromptDialogOptions }; | ||
export type { FormatSubvalueDefinition }; | ||
export type { CsvSettings }; | ||
export type { CallbackInterfaceToolsOptions }; | ||
@@ -292,2 +282,3 @@ export type { LlmToolsConfiguration }; | ||
export type { MultipleLlmExecutionTools }; | ||
export type { OpenAiAssistantExecutionToolsOptions }; | ||
export type { OpenAiExecutionToolsOptions }; | ||
@@ -468,5 +459,4 @@ export type { PromptbookServer_Error }; | ||
export type { string_snake_case }; | ||
export type { empty_object }; | ||
export type { really_any }; | ||
export type { TODO_any }; | ||
export type { string_promptbook_version }; |
@@ -23,2 +23,3 @@ import { PROMPTBOOK_VERSION } from '../version'; | ||
import { CountUtils } from '../utils/expectation-counters/index'; | ||
import { extractParameterNames } from '../utils/extractParameterNames'; | ||
import { capitalize } from '../utils/normalization/capitalize'; | ||
@@ -46,4 +47,2 @@ import { decapitalize } from '../utils/normalization/decapitalize'; | ||
import { searchKeywords } from '../utils/normalization/searchKeywords'; | ||
import { extractParameterNames } from '../utils/parameters/extractParameterNames'; | ||
import { replaceParameters } from '../utils/parameters/replaceParameters'; | ||
import { parseNumber } from '../utils/parseNumber'; | ||
@@ -53,2 +52,3 @@ import { $randomSeed } from '../utils/random/$randomSeed'; | ||
import { removeQuotes } from '../utils/removeQuotes'; | ||
import { replaceParameters } from '../utils/replaceParameters'; | ||
import { $deepFreeze } from '../utils/serialization/$deepFreeze'; | ||
@@ -97,2 +97,3 @@ import { checkSerializableAsJson } from '../utils/serialization/checkSerializableAsJson'; | ||
export { CountUtils }; | ||
export { extractParameterNames }; | ||
export { capitalize }; | ||
@@ -120,4 +121,2 @@ export { decapitalize }; | ||
export { searchKeywords }; | ||
export { extractParameterNames }; | ||
export { replaceParameters }; | ||
export { parseNumber }; | ||
@@ -127,2 +126,3 @@ export { $randomSeed }; | ||
export { removeQuotes }; | ||
export { replaceParameters }; | ||
export { $deepFreeze }; | ||
@@ -129,0 +129,0 @@ export { checkSerializableAsJson }; |
@@ -150,5 +150,2 @@ import type { WritableDeep } from 'type-fest'; | ||
* @@@ | ||
* | ||
* @example 'PIPELINE_HEAD' | ||
* @example 'PIPELINE_TEMPLATE' | ||
*/ | ||
@@ -158,5 +155,2 @@ readonly usagePlace: CommandUsagePlace; | ||
* @@@ | ||
* | ||
* @example 'promptbook version 0.62.0' | ||
* @example 'FOREACH Text Line `{customers}` -> `{customer}`' | ||
*/ | ||
@@ -166,5 +160,2 @@ readonly raw: string_markdown_text; | ||
* @@@ | ||
* | ||
* @example '0.62.0' | ||
* @example 'List Line `{customers}` -> `{customer}`' | ||
*/ | ||
@@ -174,5 +165,2 @@ readonly rawArgs: string_markdown_text; | ||
* @@@ | ||
* | ||
* @example 'PROMPTBOOK_VERSION_0_62_0' | ||
* @example 'FOREACH_LIST_LINE_CUSTOMERS_CUSTOMER' | ||
*/ | ||
@@ -182,7 +170,4 @@ readonly normalized: string_name & string_SCREAMING_CASE; | ||
* @@@ | ||
* | ||
* @example [ '0.62.0' ] | ||
* @example [ 'List', 'Line', '{customers}', '', '{customer}' ] | ||
*/ | ||
readonly args: Array<string_name>; | ||
readonly args: Array<string_name & string_SCREAMING_CASE>; | ||
}; | ||
@@ -189,0 +174,0 @@ /** |
@@ -1,4 +0,3 @@ | ||
import type { ForeachJson } from './ForeachJson'; | ||
/** | ||
* Parsed FOREACH command which is used to iterate over a table of values | ||
* Parsed FOREACH command <- Write [🍭] | ||
* | ||
@@ -10,2 +9,2 @@ * @see ./foreachCommandParser.ts for more details | ||
readonly type: 'FOREACH'; | ||
} & ForeachJson; | ||
}; |
@@ -13,3 +13,3 @@ import type { PipelineTemplateCommandParser } from '../_common/types/CommandParser'; | ||
/** | ||
* TODO: [🍭] Make .ptbk.md file with examples of the FOREACH with wrong parsing and logic | ||
* TODO: [🍭] Make .ptbk.md file with examples of the FOREACH command and also with wrong parsing and logic | ||
*/ |
@@ -1,2 +0,1 @@ | ||
import type { CsvSettings } from './formats/csv/CsvSettings'; | ||
/** | ||
@@ -146,8 +145,2 @@ * Warning message for the generated sections and files files | ||
*/ | ||
export declare const DEFAULT_CSV_SETTINGS: CsvSettings; | ||
/** | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare const IS_VERBOSE = false; | ||
@@ -159,11 +152,5 @@ /** | ||
*/ | ||
export declare const IS_PIPELINE_LOGIC_VALIDATED: boolean; | ||
export declare const DEBUG_ALLOW_PAYED_TESTING: boolean; | ||
/** | ||
* @@@ | ||
* | ||
* @private within the repository | ||
*/ | ||
export declare const IS_COST_PREVENTED: boolean; | ||
/** | ||
* TODO: [🧠][🧜♂️] Maybe join remoteUrl and path into single value | ||
*/ |
@@ -25,7 +25,4 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
/** | ||
* TODO: !!!!! FOREACH in mermaid graph | ||
* TODO: !!!!! Knowledge in mermaid graph | ||
* TODO: !!!!! Personas in mermaid graph | ||
* TODO: Maybe use some Mermaid package instead of string templating | ||
* TODO: [🕌] When more than 2 functionalities, split into separate functions | ||
*/ |
@@ -1,2 +0,1 @@ | ||
import type { ReadonlyDeep } from 'type-fest'; | ||
import type { TemplateJson } from '../../types/PipelineJson/TemplateJson'; | ||
@@ -12,5 +11,5 @@ import type { string_parameter_name } from '../../types/typeAliases'; | ||
*/ | ||
export declare function extractParameterNamesFromTemplate(template: ReadonlyDeep<Pick<TemplateJson, 'title' | 'description' | 'templateType' | 'content' | 'preparedContent' | 'jokerParameterNames' | 'foreach'>>): Set<string_parameter_name>; | ||
export declare function extractParameterNamesFromTemplate(template: Pick<TemplateJson, 'title' | 'description' | 'templateType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>; | ||
/** | ||
* TODO: [🔣] If script require contentLanguage | ||
*/ |
@@ -19,7 +19,2 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson'; | ||
/** | ||
* @private internal function for `validatePipeline` | ||
*/ | ||
export declare function validatePipelineCore(pipeline: PipelineJson): void; | ||
/** | ||
* TODO: !!!!! [🧞♀️] Do not allow joker + foreach | ||
* TODO: [🧠] Work with promptbookVersion | ||
@@ -26,0 +21,0 @@ * TODO: Use here some json-schema, Zod or something similar and change it to: |
@@ -1,6 +0,5 @@ | ||
import { ReadonlyDeep } from 'type-fest'; | ||
import type { ErrorJson } from '../errors/utils/ErrorJson'; | ||
import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson'; | ||
import type { Parameters } from '../types/typeAliases'; | ||
import type { PipelineJson } from '../types/PipelineJson/PipelineJson'; | ||
import type { Parameters } from '../types/typeAliases'; | ||
import type { ErrorJson } from '../errors/utils/ErrorJson'; | ||
import type { PromptResultUsage } from './PromptResultUsage'; | ||
@@ -18,3 +17,3 @@ /** | ||
*/ | ||
readonly outputParameters: Readonly<Parameters>; | ||
readonly outputParameters: Parameters; | ||
/** | ||
@@ -27,15 +26,15 @@ * Whether the execution was successful, details are aviable in `executionReport` | ||
*/ | ||
readonly usage: ReadonlyDeep<PromptResultUsage>; | ||
readonly usage: PromptResultUsage; | ||
/** | ||
* Errors that occured during the execution, details are aviable in `executionReport` | ||
*/ | ||
readonly errors: ReadonlyDeep<Array<ErrorJson>>; | ||
readonly errors: Array<ErrorJson>; | ||
/** | ||
* Warnings that occured during the execution, details are aviable in `executionReport` | ||
*/ | ||
readonly warnings: ReadonlyDeep<Array<ErrorJson>>; | ||
readonly warnings: Array<ErrorJson>; | ||
/** | ||
* The report of the execution with all details | ||
*/ | ||
readonly executionReport: ReadonlyDeep<ExecutionReportJson>; | ||
readonly executionReport: ExecutionReportJson; | ||
/** | ||
@@ -47,3 +46,3 @@ * The prepared pipeline that was used for the execution | ||
*/ | ||
readonly preparedPipeline: ReadonlyDeep<PipelineJson>; | ||
readonly preparedPipeline: PipelineJson; | ||
}; | ||
@@ -50,0 +49,0 @@ /** |
@@ -10,3 +10,3 @@ import type { AutomaticTranslator } from './AutomaticTranslator'; | ||
export declare class LindatAutomaticTranslator implements AutomaticTranslator { | ||
private readonly options; | ||
protected readonly options: LindatAutomaticTranslatorOptions; | ||
constructor(options: LindatAutomaticTranslatorOptions); | ||
@@ -13,0 +13,0 @@ translate(message: string): Promise<string>; |
import type { PromptResultUsage } from '../PromptResultUsage'; | ||
/** | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare const ZERO_USAGE: import("type-fest/source/readonly-deep").ReadonlyObjectDeep<{ | ||
readonly price: { | ||
readonly value: 0; | ||
}; | ||
readonly input: { | ||
readonly tokensCount: { | ||
readonly value: 0; | ||
}; | ||
readonly charactersCount: { | ||
readonly value: 0; | ||
}; | ||
readonly wordsCount: { | ||
readonly value: 0; | ||
}; | ||
readonly sentencesCount: { | ||
readonly value: 0; | ||
}; | ||
readonly linesCount: { | ||
readonly value: 0; | ||
}; | ||
readonly paragraphsCount: { | ||
readonly value: 0; | ||
}; | ||
readonly pagesCount: { | ||
readonly value: 0; | ||
}; | ||
}; | ||
readonly output: { | ||
readonly tokensCount: { | ||
readonly value: 0; | ||
}; | ||
readonly charactersCount: { | ||
readonly value: 0; | ||
}; | ||
readonly wordsCount: { | ||
readonly value: 0; | ||
}; | ||
readonly sentencesCount: { | ||
readonly value: 0; | ||
}; | ||
readonly linesCount: { | ||
readonly value: 0; | ||
}; | ||
readonly paragraphsCount: { | ||
readonly value: 0; | ||
}; | ||
readonly pagesCount: { | ||
readonly value: 0; | ||
}; | ||
}; | ||
}>; | ||
/** | ||
* Function `addUsage` will add multiple usages into one | ||
@@ -60,0 +4,0 @@ * |
@@ -27,4 +27,2 @@ import type { Expectations } from '../../types/PipelineJson/Expectations'; | ||
* TODO: [💝] Unite object for expecting amount and format | ||
* TODO: [🧠][🤠] This should be part of `TextFormatDefinition` | ||
* Note: [💝] and [🤠] are interconnected together | ||
*/ |
@@ -10,8 +10,9 @@ import type { string_markdown } from '../../types/typeAliases'; | ||
/** | ||
* TODO: [🍓][🧞♂️] Use "$1" not "1 USD" | ||
* TODO: [🍓][🧞♂️] Use markdown formatting like "Cost approximately **$1**" | ||
* TODO: [🍓][🧞♂️] Report in minutes, seconds, days NOT 0.1 hours | ||
* TODO: Use "$1" not "1 USD" | ||
* TODO: Use markdown formatting like "Cost approximately **$1**" | ||
* TODO: Report in minutes, seconds, days NOT 0.1 hours | ||
* TODO: [🧠] Maybe make from `uncertainNumberToHuman` separate exported utility | ||
* TODO: When negligible usage, report "Negligible" or just don't report it | ||
* TODO: [🧠] Maybe use "~" instead of "approximately" | ||
* TODO: [🏛] Maybe make some markdown builder | ||
*/ |
import type { string_mime_type } from '../../types/typeAliases'; | ||
import type { string_name } from '../../types/typeAliases'; | ||
import type { string_SCREAMING_CASE } from '../../utils/normalization/normalizeTo_SCREAMING_CASE'; | ||
import type { empty_object } from '../../utils/organization/empty_object'; | ||
import type { FormatSubvalueDefinition } from './FormatSubvalueDefinition'; | ||
/** | ||
* A format definition is a set of functions that define how to validate, heal and convert response from LLM | ||
* | ||
* @@@ Describe setting vs schema | ||
* | ||
* @see https://github.com/webgptorg/promptbook/discussions/36 | ||
* @private still in development [🏢] | ||
*/ | ||
export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends string, TSettings extends empty_object, TSchema extends empty_object> = { | ||
export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends string, TSchema extends object> = { | ||
/** | ||
@@ -20,7 +15,7 @@ * The name of the format used in .ptbk.md files | ||
*/ | ||
readonly formatName: string_name & string_SCREAMING_CASE; | ||
readonly name: string_name; | ||
/** | ||
* Aliases for the `formatName` | ||
* Aliases for the name | ||
*/ | ||
readonly aliases?: Array<string_name & string_SCREAMING_CASE>; | ||
readonly aliases?: Array<string_name>; | ||
/** | ||
@@ -38,3 +33,3 @@ * The mime type of the format (if any) | ||
*/ | ||
isValid(value: string, settings?: TSettings, schema?: TSchema): value is TValue; | ||
isValid(value: string, schema?: TSchema): value is TValue; | ||
/** | ||
@@ -48,3 +43,3 @@ * Check if a first part of a value is valid | ||
*/ | ||
canBeValid(partialValue: string, settings?: TSettings, schema?: TSchema): partialValue is TPartialValue; | ||
canBeValid(partialValue: string, schema?: TSchema): partialValue is TPartialValue; | ||
/** | ||
@@ -60,7 +55,13 @@ * Heal a value to make it valid if possible | ||
*/ | ||
heal(value: string, settings?: TSettings, scheme?: TSchema): TValue; | ||
heal(value: string, scheme?: TSchema): TValue; | ||
/** | ||
* @@@ | ||
* Parses just the values and removes structural information | ||
* | ||
* Note: This is useful when you want to combine format expectations with counting words, characters,... | ||
* | ||
* @param value The value to check, for example "{\"name\": "John Smith"}" | ||
* @param schema Optional schema | ||
* @example "{\"name\": "John Smith"}" -> ["John Smith"] | ||
*/ | ||
readonly subvalueDefinitions: Array<FormatSubvalueDefinition<TValue, TSettings>>; | ||
extractValues(value: string, schema?: TSchema): Array<string>; | ||
}; | ||
@@ -67,0 +68,0 @@ /** |
@@ -6,2 +6,2 @@ /** | ||
*/ | ||
export declare const FORMAT_DEFINITIONS: readonly [import("./_common/FormatDefinition").FormatDefinition<string, string, any, any>, import("./_common/FormatDefinition").FormatDefinition<string, string, any, any>, import("./_common/FormatDefinition").FormatDefinition<string, string, any, any>, import("./_common/FormatDefinition").FormatDefinition<string, string, import("./csv/CsvSettings").CsvSettings, any>]; | ||
export declare const FORMAT_DEFINITIONS: import("./_common/FormatDefinition").FormatDefinition<string, string, object>[]; |
@@ -1,2 +0,1 @@ | ||
import type { TODO_any } from '../../utils/organization/TODO_any'; | ||
import type { FormatDefinition } from '../_common/FormatDefinition'; | ||
@@ -8,7 +7,7 @@ /** | ||
*/ | ||
export declare const JsonFormatDefinition: FormatDefinition<string, string, TODO_any, TODO_any>; | ||
export declare const JsonFormatDefinition: FormatDefinition<string, string, object>; | ||
/** | ||
* TODO: [🧠] Maybe propper instance of object | ||
* TODO: [0] Make string_serialized_json | ||
* TODO: [1] Make type for JSON Settings and Schema | ||
* TODO: [1] Make type for JSON Schema | ||
* TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...? | ||
@@ -18,4 +17,4 @@ * TODO: [🍓] In `JsonFormatDefinition` implement simple `isValid` | ||
* TODO: [🍓] In `JsonFormatDefinition` implement `heal | ||
* TODO: [🍓] In `JsonFormatDefinition` implement `subvalueDefinitions` | ||
* TODO: [🍓] In `JsonFormatDefinition` implement `extractValues` | ||
* TODO: [🏢] Allow to expect something inside JSON objects and other formats | ||
*/ |
@@ -1,2 +0,1 @@ | ||
import type { TODO_any } from '../../utils/organization/TODO_any'; | ||
import type { FormatDefinition } from '../_common/FormatDefinition'; | ||
@@ -8,7 +7,7 @@ /** | ||
*/ | ||
export declare const XmlFormatDefinition: FormatDefinition<string, string, TODO_any, TODO_any>; | ||
export declare const XmlFormatDefinition: FormatDefinition<string, string, object>; | ||
/** | ||
* TODO: [🧠] Maybe propper instance of object | ||
* TODO: [0] Make string_serialized_xml | ||
* TODO: [1] Make type for XML Settings and Schema | ||
* TODO: [1] Make type for XML Schema | ||
* TODO: [🧠] What to use for validating XMLs - XSD,... | ||
@@ -18,4 +17,4 @@ * TODO: [🍓] In `XmlFormatDefinition` implement simple `isValid` | ||
* TODO: [🍓] In `XmlFormatDefinition` implement `heal | ||
* TODO: [🍓] In `XmlFormatDefinition` implement `subvalueDefinitions` | ||
* TODO: [🍓] In `XmlFormatDefinition` implement `extractValues` | ||
* TODO: [🏢] Allow to expect something inside XML and other formats | ||
*/ |
@@ -11,3 +11,3 @@ import type { UserInterfaceTools } from '../../../execution/UserInterfaceTools'; | ||
export declare class CallbackInterfaceTools implements UserInterfaceTools { | ||
private readonly options; | ||
protected readonly options: CallbackInterfaceToolsOptions; | ||
constructor(options: CallbackInterfaceToolsOptions); | ||
@@ -14,0 +14,0 @@ /** |
@@ -13,3 +13,3 @@ import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions'; | ||
export declare class SimplePromptInterfaceTools implements UserInterfaceTools { | ||
private readonly options; | ||
protected readonly options: CommonExecutionToolsOptions; | ||
constructor(options?: CommonExecutionToolsOptions); | ||
@@ -16,0 +16,0 @@ /** |
@@ -0,1 +1,2 @@ | ||
import Anthropic from '@anthropic-ai/sdk'; | ||
import type { AvailableModel } from '../../execution/AvailableModel'; | ||
@@ -16,3 +17,3 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools { | ||
private readonly options; | ||
protected readonly options: AnthropicClaudeExecutionToolsDirectOptions; | ||
/** | ||
@@ -30,3 +31,3 @@ * Anthropic Claude API client. | ||
get description(): string_markdown; | ||
private getClient; | ||
getClient(): Promise<Anthropic>; | ||
/** | ||
@@ -33,0 +34,0 @@ * Check the `options` passed to `constructor` |
@@ -0,1 +1,2 @@ | ||
import { OpenAIClient } from '@azure/openai'; | ||
import type { AvailableModel } from '../../execution/AvailableModel'; | ||
@@ -16,3 +17,3 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
export declare class AzureOpenAiExecutionTools implements LlmExecutionTools { | ||
private readonly options; | ||
protected readonly options: AzureOpenAiExecutionToolsOptions; | ||
/** | ||
@@ -30,3 +31,3 @@ * OpenAI Azure API client. | ||
get description(): string_markdown; | ||
private getClient; | ||
getClient(): Promise<OpenAIClient>; | ||
/** | ||
@@ -33,0 +34,0 @@ * Check the `options` passed to `constructor` |
@@ -16,3 +16,3 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
export declare class MockedEchoLlmExecutionTools implements LlmExecutionTools { | ||
private readonly options; | ||
protected readonly options: CommonExecutionToolsOptions; | ||
constructor(options?: CommonExecutionToolsOptions); | ||
@@ -19,0 +19,0 @@ get title(): string_title & string_markdown_text; |
@@ -17,3 +17,3 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
export declare class MockedFackedLlmExecutionTools implements LlmExecutionTools { | ||
private readonly options; | ||
protected readonly options: CommonExecutionToolsOptions; | ||
constructor(options?: CommonExecutionToolsOptions); | ||
@@ -20,0 +20,0 @@ get title(): string_title & string_markdown_text; |
@@ -0,1 +1,2 @@ | ||
import OpenAI from 'openai'; | ||
import type { AvailableModel } from '../../execution/AvailableModel'; | ||
@@ -17,3 +18,3 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; | ||
export declare class OpenAiExecutionTools implements LlmExecutionTools { | ||
private readonly options; | ||
protected readonly options: OpenAiExecutionToolsOptions; | ||
/** | ||
@@ -31,3 +32,3 @@ * OpenAI API client. | ||
get description(): string_markdown; | ||
private getClient; | ||
getClient(): Promise<OpenAI>; | ||
/** | ||
@@ -34,0 +35,0 @@ * Check the `options` passed to `constructor` |
@@ -23,3 +23,3 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
export declare class RemoteLlmExecutionTools implements LlmExecutionTools { | ||
private readonly options; | ||
protected readonly options: RemoteLlmExecutionToolsOptions; | ||
constructor(options: RemoteLlmExecutionToolsOptions); | ||
@@ -26,0 +26,0 @@ get title(): string_title & string_markdown_text; |
@@ -12,3 +12,3 @@ import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../../execution/ScriptExecutionTools'; | ||
export declare class JavascriptEvalExecutionTools implements ScriptExecutionTools { | ||
private readonly options; | ||
protected readonly options: JavascriptExecutionToolsOptions; | ||
constructor(options?: JavascriptExecutionToolsOptions); | ||
@@ -15,0 +15,0 @@ /** |
@@ -12,3 +12,3 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions'; | ||
export declare class PythonExecutionTools implements ScriptExecutionTools { | ||
private readonly options; | ||
protected readonly options: CommonExecutionToolsOptions; | ||
constructor(options?: CommonExecutionToolsOptions); | ||
@@ -15,0 +15,0 @@ /** |
@@ -12,3 +12,3 @@ import type { CommonExecutionToolsOptions } from '../../execution/CommonExecutionToolsOptions'; | ||
export declare class TypescriptExecutionTools implements ScriptExecutionTools { | ||
private readonly options; | ||
protected readonly options: CommonExecutionToolsOptions; | ||
constructor(options?: CommonExecutionToolsOptions); | ||
@@ -15,0 +15,0 @@ /** |
@@ -9,3 +9,3 @@ import type { PromptbookStorage } from '../_common/PromptbookStorage'; | ||
export declare class FilesStorage<TItem> implements PromptbookStorage<TItem> { | ||
private readonly options; | ||
protected readonly options: FilesStorageOptions; | ||
constructor(options: FilesStorageOptions); | ||
@@ -12,0 +12,0 @@ /** |
@@ -42,4 +42,1 @@ import type { string_markdown_text } from '../typeAliases'; | ||
}; | ||
/** | ||
* TODO: !!!!!! FOREACH in report | ||
*/ |
@@ -14,14 +14,7 @@ import type { number_id } from '../typeAliases'; | ||
/** | ||
* Unique identifier of the knowledge source | ||
* @@@ | ||
*/ | ||
readonly name: string_name; | ||
/** | ||
* Source of one knowledge | ||
* | ||
* It can be a link, a relative path to file or direct text or combination of those | ||
* | ||
* For example `"https://pavolhejny.com/"` | ||
* For example `"./pavol-hejny-cv.pdf"` | ||
* For example `"Pavol Hejný has web https://pavolhejny.com/"` | ||
* For example `"Pavol Hejný is web developer and creator of Promptbook and Collboard"` | ||
* @@@ | ||
*/ | ||
@@ -28,0 +21,0 @@ readonly sourceContent: string_knowledge_source_content; |
@@ -36,5 +36,4 @@ import type { string_markdown_text } from '../typeAliases'; | ||
/** | ||
* TODO: [🧠] !!!!!! Should be here registered subparameter from foreach or not? | ||
* TODO: [♈] Probbably move expectations from templates to parameters | ||
* TODO: [🍙] Make some standard order of json properties | ||
*/ |
@@ -1,2 +0,1 @@ | ||
import type { ForeachJson } from '../../commands/FOREACH/ForeachJson'; | ||
import type { FormatCommand } from '../../commands/FORMAT/FormatCommand'; | ||
@@ -47,6 +46,2 @@ import type { TemplateType } from '../../commands/TEMPLATE/TemplateTypes'; | ||
/** | ||
* @@@ | ||
*/ | ||
readonly foreach?: ForeachJson; | ||
/** | ||
* Type of the execution | ||
@@ -53,0 +48,0 @@ * This determines if the template is send to LLM, user or some scripting evaluation |
@@ -9,4 +9,1 @@ import type { ExpectationAmount } from '../../types/PipelineJson/Expectations'; | ||
export declare const CountUtils: Record<ExpectationUnit, (text: string) => ExpectationAmount>; | ||
/** | ||
* TODO: [🧠][🤠] This should be probbably as part of `TextFormatDefinition` | ||
*/ |
{ | ||
"name": "@promptbook/remote-client", | ||
"version": "0.71.0-0", | ||
"version": "0.72.0-0", | ||
"description": "Supercharge your use of large language models", | ||
@@ -15,21 +15,17 @@ "private": false, | ||
"keywords": [ | ||
"autogpt", | ||
"openai", | ||
"gpt-3", | ||
"gpt-4", | ||
"chatgpt", | ||
"ai", | ||
"llm", | ||
"prompt", | ||
"template", | ||
"language-model", | ||
"chatgpt", | ||
"autogpt", | ||
"machine-learning", | ||
"natural-language-processing", | ||
"nlp", | ||
"openai", | ||
"gpt-3", | ||
"gpt-4", | ||
"gpt-4o", | ||
"gpt-4o-mini", | ||
"o1", | ||
"o1-mini", | ||
"o1-preview", | ||
"anthropic" | ||
"prompt", | ||
"template", | ||
"pipeline", | ||
"automation", | ||
"text-generation", | ||
"language-model" | ||
], | ||
@@ -55,3 +51,3 @@ "license": "CC-BY-4.0", | ||
"peerDependencies": { | ||
"@promptbook/core": "0.71.0-0" | ||
"@promptbook/core": "0.72.0-0" | ||
}, | ||
@@ -58,0 +54,0 @@ "dependencies": { |
@@ -19,6 +19,2 @@ <!-- ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten --> | ||
## ✨ New Features | ||
- ✨ **Support of [OpenAI o1 model](https://openai.com/o1/)** | ||
## 📦 Package `@promptbook/remote-client` | ||
@@ -36,3 +32,3 @@ | ||
# Install just this package to save space | ||
npm install @promptbook/remote-client | ||
npm i @promptbook/remote-client | ||
``` | ||
@@ -47,2 +43,6 @@ | ||
# ✨ New Features | ||
- ✨ **Support [OpenAI o1 model](https://openai.com/o1/)** | ||
## 🤍 The Promptbook Whitepaper | ||
@@ -94,2 +94,3 @@ | ||
> - PIPELINE URL https://promptbook.studio/webgpt/write-website-content.ptbk.md | ||
> - PROMPTBOOK VERSION 0.0.1 | ||
> - INPUT PARAM `{rawTitle}` Automatically suggested a site name or empty text | ||
@@ -96,0 +97,0 @@ > - INPUT PARAM `{rawAssigment}` Automatically generated site entry from image recognition |
@@ -15,3 +15,3 @@ (function (global, factory) { | ||
*/ | ||
var PROMPTBOOK_VERSION = '0.70.0-1'; | ||
var PROMPTBOOK_VERSION = '0.68.5'; | ||
// TODO:[main] !!!! List here all the versions and annotate + put into script | ||
@@ -334,19 +334,6 @@ | ||
'currentDate', | ||
// <- TODO: !!!!! list here all command names | ||
// <- TODO: Add more like 'date', 'modelName',... | ||
// <- TODO: Add [emoji] + instructions ACRY when adding new reserved parameter | ||
]); | ||
// <- TODO: [🧜♂️] | ||
/** | ||
* @@@ | ||
* | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
Object.freeze({ | ||
delimiter: ',', | ||
quoteChar: '"', | ||
newline: '\n', | ||
skipEmptyLines: true, | ||
}); | ||
/** | ||
* TODO: [🧠][🧜♂️] Maybe join remoteUrl and path into single value | ||
@@ -353,0 +340,0 @@ */ |
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
440
518213
488
10004