@promptbook/types
Advanced tools
Comparing version 0.8.0 to 0.9.0
import { PromptTemplatePipeline } from '../classes/PromptTemplatePipeline'; | ||
import { PromptTemplatePipelineLibrary } from '../classes/PromptTemplatePipelineLibrary'; | ||
import { PTP_VERSION } from '../config'; | ||
import { PTBK_VERSION } from '../config'; | ||
import { promptTemplatePipelineStringToJson } from '../conversion/promptTemplatePipelineStringToJson'; | ||
@@ -12,3 +12,3 @@ import { validatePromptTemplatePipelineJson } from '../conversion/validatePromptTemplatePipelineJson'; | ||
import { ExecutionTypes } from '../types/ExecutionTypes'; | ||
export { ExecutionTypes, PTP_VERSION, PromptTemplatePipeline, PromptTemplatePipelineLibrary }; | ||
export { ExecutionTypes, PTBK_VERSION, PromptTemplatePipeline, PromptTemplatePipelineLibrary }; | ||
export { SimplePromptInterfaceTools }; | ||
@@ -15,0 +15,0 @@ export { promptTemplatePipelineStringToJson, validatePromptTemplatePipelineJson }; |
@@ -19,3 +19,3 @@ import { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions'; | ||
import { string_char_emoji } from '../types/typeAliasEmoji'; | ||
import { ILicense, IPersonProfile, IRepository, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_cursor, string_css_property, string_css_selector, string_css_value, 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_image_prompt, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_midjourney_prompt, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptp_url, string_ptp_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_wallpaper_id, string_xml, uuid, uuid_first_segment } from '../types/typeAliases'; | ||
export { CommonExecutionToolsOptions, DoneTaskProgress, ExecutionTools, ExecutionType, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, PendingTaskProgress, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_cursor, string_css_property, string_css_selector, string_css_value, 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_image_prompt, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_midjourney_prompt, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptp_url, string_ptp_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_wallpaper_id, string_xml, uuid, uuid_first_segment, }; | ||
import { ILicense, IPersonProfile, IRepository, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_cursor, string_css_property, string_css_selector, string_css_value, 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_image_prompt, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_midjourney_prompt, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_wallpaper_id, string_xml, uuid, uuid_first_segment } from '../types/typeAliases'; | ||
export { CommonExecutionToolsOptions, DoneTaskProgress, ExecutionTools, ExecutionType, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, PendingTaskProgress, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_cursor, string_css_property, string_css_selector, string_css_value, 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_image_prompt, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_midjourney_prompt, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_wallpaper_id, string_xml, uuid, uuid_first_segment, }; |
@@ -11,4 +11,4 @@ import { string_name } from '.././types/typeAliases'; | ||
* It can have 3 formats: | ||
* - **.ptp.md file** in custom markdown format described above | ||
* - **JSON** format, parsed from the .ptp.md file | ||
* - **.ptbk.md file** in custom markdown format described above | ||
* - **JSON** format, parsed from the .ptbk.md file | ||
* - _(this)_ **Object** which is created from JSON format and bound with tools around (but not the execution logic) | ||
@@ -19,3 +19,3 @@ * | ||
export declare class PromptTemplatePipeline { | ||
readonly ptpUrl: URL | null; | ||
readonly ptbkUrl: URL | null; | ||
readonly parameters: Record<string_name, PromptTemplateParameterJson>; | ||
@@ -28,6 +28,6 @@ readonly promptTemplates: Array<PromptTemplateJson>; | ||
* | ||
* @param source content of .ptp.md or .ptp.json file | ||
* @param source content of .ptbk.md or .ptbk.json file | ||
* @returns PromptTemplatePipeline | ||
*/ | ||
static fromSource(ptpSource: PromptTemplatePipelineString | PromptTemplatePipelineJson): PromptTemplatePipeline; | ||
static fromSource(ptbkSource: PromptTemplatePipelineString | PromptTemplatePipelineJson): PromptTemplatePipeline; | ||
/** | ||
@@ -38,6 +38,6 @@ * Constructs PromptTemplatePipeline from markdown source | ||
* | ||
* @param ptpString content of .ptp.md file | ||
* @param ptbkString content of .ptbk.md file | ||
* @returns PromptTemplatePipeline | ||
*/ | ||
static fromString(ptpString: PromptTemplatePipelineString): PromptTemplatePipeline; | ||
static fromString(ptbkString: PromptTemplatePipelineString): PromptTemplatePipeline; | ||
/** | ||
@@ -48,6 +48,6 @@ * Constructs PromptTemplatePipeline from JSON source | ||
* | ||
* @param ptpjson content of .ptp.json file parsed into JSON | ||
* @param ptbkjson content of .ptbk.json file parsed into JSON | ||
* @returns PromptTemplatePipeline | ||
*/ | ||
static fromJson(ptpjson: PromptTemplatePipelineJson): PromptTemplatePipeline; | ||
static fromJson(ptbkjson: PromptTemplatePipelineJson): PromptTemplatePipeline; | ||
private constructor(); | ||
@@ -54,0 +54,0 @@ /** |
@@ -23,8 +23,8 @@ import { string_name } from '.././types/typeAliases'; | ||
* Note: During the construction syntax and logic of all sources are validated | ||
* Note: You can combine .ptp.md and .ptp.json files BUT it is not recommended | ||
* Note: You can combine .ptbk.md and .ptbk.json files BUT it is not recommended | ||
* | ||
* @param ptpSources contents of .ptp.md or .ptp.json files | ||
* @param ptbkSources contents of .ptbk.md or .ptbk.json files | ||
* @returns PromptTemplatePipelineLibrary | ||
*/ | ||
static fromSources(ptpSources: Record<string_name, PromptTemplatePipelineJson | PromptTemplatePipelineString>): PromptTemplatePipelineLibrary; | ||
static fromSources(ptbkSources: Record<string_name, PromptTemplatePipelineJson | PromptTemplatePipelineString>): PromptTemplatePipelineLibrary; | ||
private constructor(); | ||
@@ -45,2 +45,3 @@ /** | ||
/** | ||
* TODO: !!! This should be renamed to Promptbook | ||
* TODO: !! [π][π§ ] Split of PromptTemplatePipeline,PromptTemplatePipelineLibrary between interface and class | ||
@@ -52,3 +53,3 @@ * TODO: !! [π] Make promptTemplatePipelines private WHEN split between interface and class | ||
* TODO: [π€] Add generic type for entry and result parameters | ||
* TODO: [π§ ] Is it better to ptpLibrary.executePtp('writeXyz',{...}) OR ptpLibrary.createExecutor('writeXyz')({...}) OR createExecutor(ptpLibrary.getPtp('writeXyz')) | ||
* TODO: [π§ ] Is it better to ptbkLibrary.executePtp('writeXyz',{...}) OR ptbkLibrary.createExecutor('writeXyz')({...}) OR createExecutor(ptbkLibrary.getPtp('writeXyz')) | ||
* TODO: [π§ ] Formarly (before commit 62229afce7668a5b85077cc18becf798b583bf8d) there were two classes PromptTemplatePipelineLibrary+PtpLibraryExecutor (maybe it was better?) | ||
@@ -55,0 +56,0 @@ * TODO: [π§ ] Is it better to pass tools into getExecutor or into constructor |
@@ -6,3 +6,3 @@ import { ModelRequirements } from './types/ModelRequirements'; | ||
*/ | ||
export declare const PTP_VERSION: string_version; | ||
export declare const PTBK_VERSION: string_version; | ||
/** | ||
@@ -9,0 +9,0 @@ * Default model requirements for the pipeline |
@@ -11,3 +11,3 @@ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson'; | ||
*/ | ||
export declare function importPtp(path: `${string}.ptp.md`): PromptTemplatePipelineString; | ||
export declare function importPtp(path: `${string}.ptp.json`): PromptTemplatePipelineJson; | ||
export declare function importPtp(path: `${string}.ptbk.md`): PromptTemplatePipelineString; | ||
export declare function importPtp(path: `${string}.ptbk.json`): PromptTemplatePipelineJson; |
@@ -17,3 +17,3 @@ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson'; | ||
/** | ||
* TODO: [π§ ] Work with ptpVersion | ||
* TODO: [π§ ] Work with ptbkVersion | ||
* TODO: Use here some json-schema, Zod or something similar and change it to: | ||
@@ -20,0 +20,0 @@ * > /** |
@@ -15,3 +15,3 @@ import { PromptTemplatePipelineLibrary } from '../../../../../classes/PromptTemplatePipelineLibrary'; | ||
*/ | ||
readonly ptpLibrary: PromptTemplatePipelineLibrary; | ||
readonly ptbkLibrary: PromptTemplatePipelineLibrary; | ||
/** | ||
@@ -18,0 +18,0 @@ * Creates natural execution tools for each client |
@@ -8,3 +8,3 @@ import { string_markdown_text, string_name, string_version } from '.././types/typeAliases'; | ||
*/ | ||
export type Command = PtpUrlCommand | PtpVersionCommand | ExecuteCommand | UseCommand | ParameterCommand | PostprocessCommand; | ||
export type Command = PtbkUrlCommand | PtbkVersionCommand | ExecuteCommand | UseCommand | ParameterCommand | PostprocessCommand; | ||
/** | ||
@@ -16,5 +16,5 @@ * PtpVersion command tells which version is .ptp file using | ||
*/ | ||
export interface PtpUrlCommand { | ||
readonly type: 'PTP_URL'; | ||
readonly ptpUrl: URL; | ||
export interface PtbkUrlCommand { | ||
readonly type: 'PTBK_URL'; | ||
readonly ptbkUrl: URL; | ||
} | ||
@@ -27,5 +27,5 @@ /** | ||
*/ | ||
export interface PtpVersionCommand { | ||
readonly type: 'PTP_VERSION'; | ||
readonly ptpVersion: string_version; | ||
export interface PtbkVersionCommand { | ||
readonly type: 'PTBK_VERSION'; | ||
readonly ptbkVersion: string_version; | ||
} | ||
@@ -32,0 +32,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { string_name, string_prompt, string_ptp_url_with_hashtemplate } from '.././types/typeAliases'; | ||
import { string_name, string_prompt, string_ptbk_url_with_hashtemplate } from '.././types/typeAliases'; | ||
import { ModelRequirements } from './ModelRequirements'; | ||
@@ -23,9 +23,9 @@ /** | ||
* | ||
* @example https://ptp.webgpt.com/cs/write-wallpaper-content.ptp.md@v2.4.15#keywords | ||
* @example https://ptbk.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15#keywords | ||
*/ | ||
readonly ptpUrl: string_ptp_url_with_hashtemplate; | ||
readonly ptbkUrl: string_ptbk_url_with_hashtemplate; | ||
/** | ||
* Parameters used in the prompt | ||
* | ||
* Note: This is redundant (same information is in ptpUrl+content) but useful for logging and debugging | ||
* Note: This is redundant (same information is in ptbkUrl+content) but useful for logging and debugging | ||
*/ | ||
@@ -32,0 +32,0 @@ readonly parameters: Record<string_name, string>; |
@@ -52,3 +52,3 @@ import { string_javascript, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases'; | ||
* - It should start uppercase and contain letters and numbers | ||
* - The ptpUrl together with hash and name are used to identify the prompt template in the pipeline | ||
* - The ptbkUrl together with hash and name are used to identify the prompt template in the pipeline | ||
*/ | ||
@@ -55,0 +55,0 @@ readonly name: string_name; |
@@ -1,2 +0,2 @@ | ||
import { string_ptp_url, string_version } from '../.././types/typeAliases'; | ||
import { string_ptbk_url, string_version } from '../.././types/typeAliases'; | ||
import { PromptTemplateJson } from './PromptTemplateJson'; | ||
@@ -9,4 +9,4 @@ import { PromptTemplateParameterJson } from './PromptTemplateParameterJson'; | ||
* It can have 3 formats: | ||
* - **.ptp.md file** in custom markdown format described above | ||
* - _(this)_ **JSON** format, parsed from the .ptp.md file | ||
* - **.ptbk.md file** in custom markdown format described above | ||
* - _(this)_ **JSON** format, parsed from the .ptbk.md file | ||
* - **Object** which is created from JSON format and bound with tools around (but not the execution logic) | ||
@@ -23,6 +23,6 @@ * | ||
* Tip: You can do versioning in the URL | ||
* For example: https://ptp.webgpt.com/cs/write-wallpaper-content.ptp.md@1.0.0 | ||
* For example: https://ptbk.webgpt.com/cs/write-website-content.ptbk.md@1.0.0 | ||
* Warning: Do not hash part of the URL, hash part is used for identification of the prompt template in the pipeline | ||
*/ | ||
readonly ptpUrl?: string_ptp_url; | ||
readonly ptbkUrl?: string_ptbk_url; | ||
/** | ||
@@ -34,5 +34,5 @@ * Title of the prompt template pipeline | ||
/** | ||
* Version of the .ptp.json file | ||
* Version of the .ptbk.json file | ||
*/ | ||
readonly ptpVersion: string_version; | ||
readonly ptbkVersion: string_version; | ||
/** | ||
@@ -39,0 +39,0 @@ * Description of the prompt template pipeline |
@@ -6,4 +6,4 @@ /** | ||
* It can have 3 formats: | ||
* - _(this)_ **.ptp.md file** in custom markdown format described above | ||
* - **JSON** format, parsed from the .ptp.md file | ||
* - _(this)_ **.ptbk.md file** in custom markdown format described above | ||
* - **JSON** format, parsed from the .ptbk.md file | ||
* - **Object** which is created from JSON format and bound with tools around (but not the execution logic) | ||
@@ -10,0 +10,0 @@ * |
@@ -194,11 +194,11 @@ /** | ||
* | ||
* For example `"https://ptp.webgpt.com/cs/write-wallpaper-content.ptp.md@v2.4.15"` | ||
* For example `"https://ptbk.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15"` | ||
*/ | ||
export type string_ptp_url = string; | ||
export type string_ptbk_url = string; | ||
/** | ||
* Semantic helper | ||
* | ||
* For example `"https://ptp.webgpt.com/cs/write-wallpaper-content.ptp.md@v2.4.15#keywords"` | ||
* For example `"https://ptbk.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15#keywords"` | ||
*/ | ||
export type string_ptp_url_with_hashtemplate = string; | ||
export type string_ptbk_url_with_hashtemplate = string; | ||
/** | ||
@@ -205,0 +205,0 @@ * Semantic helper |
{ | ||
"name": "@promptbook/types", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"description": "Library to supercharge your use of large language models", | ||
@@ -38,3 +38,3 @@ "private": false, | ||
"peerDependencies": { | ||
"@promptbook/core": "0.8.0" | ||
"@promptbook/core": "0.9.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "main": "./umd/index.umd.js", |
import { PromptTemplatePipeline } from '../classes/PromptTemplatePipeline'; | ||
import { PromptTemplatePipelineLibrary } from '../classes/PromptTemplatePipelineLibrary'; | ||
import { PTP_VERSION } from '../config'; | ||
import { PTBK_VERSION } from '../config'; | ||
import { promptTemplatePipelineStringToJson } from '../conversion/promptTemplatePipelineStringToJson'; | ||
@@ -12,3 +12,3 @@ import { validatePromptTemplatePipelineJson } from '../conversion/validatePromptTemplatePipelineJson'; | ||
import { ExecutionTypes } from '../types/ExecutionTypes'; | ||
export { ExecutionTypes, PTP_VERSION, PromptTemplatePipeline, PromptTemplatePipelineLibrary }; | ||
export { ExecutionTypes, PTBK_VERSION, PromptTemplatePipeline, PromptTemplatePipelineLibrary }; | ||
export { SimplePromptInterfaceTools }; | ||
@@ -15,0 +15,0 @@ export { promptTemplatePipelineStringToJson, validatePromptTemplatePipelineJson }; |
@@ -19,3 +19,3 @@ import { CommonExecutionToolsOptions } from '../execution/CommonExecutionToolsOptions'; | ||
import { string_char_emoji } from '../types/typeAliasEmoji'; | ||
import { ILicense, IPersonProfile, IRepository, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_cursor, string_css_property, string_css_selector, string_css_value, 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_image_prompt, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_midjourney_prompt, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptp_url, string_ptp_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_wallpaper_id, string_xml, uuid, uuid_first_segment } from '../types/typeAliases'; | ||
export { CommonExecutionToolsOptions, DoneTaskProgress, ExecutionTools, ExecutionType, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, PendingTaskProgress, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_cursor, string_css_property, string_css_selector, string_css_value, 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_image_prompt, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_midjourney_prompt, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptp_url, string_ptp_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_wallpaper_id, string_xml, uuid, uuid_first_segment, }; | ||
import { ILicense, IPersonProfile, IRepository, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_cursor, string_css_property, string_css_selector, string_css_value, 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_image_prompt, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_midjourney_prompt, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_wallpaper_id, string_xml, uuid, uuid_first_segment } from '../types/typeAliases'; | ||
export { CommonExecutionToolsOptions, DoneTaskProgress, ExecutionTools, ExecutionType, ILicense, IPersonProfile, IRepository, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, PendingTaskProgress, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptTemplatePipelineJson, PromptTemplatePipelineString, PtpExecutor, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, number_bytes, number_days, number_gigabytes, number_hours, number_integer, number_kilobytes, number_likeness, number_megabytes, number_miliseconds, number_minutes, number_months, number_negative, number_percent, number_positive, number_seconds, number_terabytes, number_weeks, number_years, string_attribute, string_attribute_value_scope, string_business_category_name, string_char, string_char_emoji, string_chat_prompt, string_color, string_completion_prompt, string_css, string_css_class, string_css_cursor, string_css_property, string_css_selector, string_css_value, 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_image_prompt, string_javascript, string_javascript_name, string_license, string_license_token, string_markdown, string_markdown_text, string_midjourney_prompt, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_page, string_password, string_person_fullname, string_person_profile, string_pgp_key, string_prompt, string_protocol, string_ptbk_url, string_ptbk_url_with_hashtemplate, string_script, string_sha256, string_ssh_key, string_svg, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_translate_name, string_translate_name_not_normalized, string_uri, string_uri_part, string_uriid, string_url, string_url_image, string_version, string_version_dependency, string_wallpaper_id, string_xml, uuid, uuid_first_segment, }; |
@@ -11,4 +11,4 @@ import { string_name } from '.././types/typeAliases'; | ||
* It can have 3 formats: | ||
* - **.ptp.md file** in custom markdown format described above | ||
* - **JSON** format, parsed from the .ptp.md file | ||
* - **.ptbk.md file** in custom markdown format described above | ||
* - **JSON** format, parsed from the .ptbk.md file | ||
* - _(this)_ **Object** which is created from JSON format and bound with tools around (but not the execution logic) | ||
@@ -19,3 +19,3 @@ * | ||
export declare class PromptTemplatePipeline { | ||
readonly ptpUrl: URL | null; | ||
readonly ptbkUrl: URL | null; | ||
readonly parameters: Record<string_name, PromptTemplateParameterJson>; | ||
@@ -28,6 +28,6 @@ readonly promptTemplates: Array<PromptTemplateJson>; | ||
* | ||
* @param source content of .ptp.md or .ptp.json file | ||
* @param source content of .ptbk.md or .ptbk.json file | ||
* @returns PromptTemplatePipeline | ||
*/ | ||
static fromSource(ptpSource: PromptTemplatePipelineString | PromptTemplatePipelineJson): PromptTemplatePipeline; | ||
static fromSource(ptbkSource: PromptTemplatePipelineString | PromptTemplatePipelineJson): PromptTemplatePipeline; | ||
/** | ||
@@ -38,6 +38,6 @@ * Constructs PromptTemplatePipeline from markdown source | ||
* | ||
* @param ptpString content of .ptp.md file | ||
* @param ptbkString content of .ptbk.md file | ||
* @returns PromptTemplatePipeline | ||
*/ | ||
static fromString(ptpString: PromptTemplatePipelineString): PromptTemplatePipeline; | ||
static fromString(ptbkString: PromptTemplatePipelineString): PromptTemplatePipeline; | ||
/** | ||
@@ -48,6 +48,6 @@ * Constructs PromptTemplatePipeline from JSON source | ||
* | ||
* @param ptpjson content of .ptp.json file parsed into JSON | ||
* @param ptbkjson content of .ptbk.json file parsed into JSON | ||
* @returns PromptTemplatePipeline | ||
*/ | ||
static fromJson(ptpjson: PromptTemplatePipelineJson): PromptTemplatePipeline; | ||
static fromJson(ptbkjson: PromptTemplatePipelineJson): PromptTemplatePipeline; | ||
private constructor(); | ||
@@ -54,0 +54,0 @@ /** |
@@ -23,8 +23,8 @@ import { string_name } from '.././types/typeAliases'; | ||
* Note: During the construction syntax and logic of all sources are validated | ||
* Note: You can combine .ptp.md and .ptp.json files BUT it is not recommended | ||
* Note: You can combine .ptbk.md and .ptbk.json files BUT it is not recommended | ||
* | ||
* @param ptpSources contents of .ptp.md or .ptp.json files | ||
* @param ptbkSources contents of .ptbk.md or .ptbk.json files | ||
* @returns PromptTemplatePipelineLibrary | ||
*/ | ||
static fromSources(ptpSources: Record<string_name, PromptTemplatePipelineJson | PromptTemplatePipelineString>): PromptTemplatePipelineLibrary; | ||
static fromSources(ptbkSources: Record<string_name, PromptTemplatePipelineJson | PromptTemplatePipelineString>): PromptTemplatePipelineLibrary; | ||
private constructor(); | ||
@@ -45,2 +45,3 @@ /** | ||
/** | ||
* TODO: !!! This should be renamed to Promptbook | ||
* TODO: !! [π][π§ ] Split of PromptTemplatePipeline,PromptTemplatePipelineLibrary between interface and class | ||
@@ -52,3 +53,3 @@ * TODO: !! [π] Make promptTemplatePipelines private WHEN split between interface and class | ||
* TODO: [π€] Add generic type for entry and result parameters | ||
* TODO: [π§ ] Is it better to ptpLibrary.executePtp('writeXyz',{...}) OR ptpLibrary.createExecutor('writeXyz')({...}) OR createExecutor(ptpLibrary.getPtp('writeXyz')) | ||
* TODO: [π§ ] Is it better to ptbkLibrary.executePtp('writeXyz',{...}) OR ptbkLibrary.createExecutor('writeXyz')({...}) OR createExecutor(ptbkLibrary.getPtp('writeXyz')) | ||
* TODO: [π§ ] Formarly (before commit 62229afce7668a5b85077cc18becf798b583bf8d) there were two classes PromptTemplatePipelineLibrary+PtpLibraryExecutor (maybe it was better?) | ||
@@ -55,0 +56,0 @@ * TODO: [π§ ] Is it better to pass tools into getExecutor or into constructor |
@@ -6,3 +6,3 @@ import { ModelRequirements } from './types/ModelRequirements'; | ||
*/ | ||
export declare const PTP_VERSION: string_version; | ||
export declare const PTBK_VERSION: string_version; | ||
/** | ||
@@ -9,0 +9,0 @@ * Default model requirements for the pipeline |
@@ -11,3 +11,3 @@ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson'; | ||
*/ | ||
export declare function importPtp(path: `${string}.ptp.md`): PromptTemplatePipelineString; | ||
export declare function importPtp(path: `${string}.ptp.json`): PromptTemplatePipelineJson; | ||
export declare function importPtp(path: `${string}.ptbk.md`): PromptTemplatePipelineString; | ||
export declare function importPtp(path: `${string}.ptbk.json`): PromptTemplatePipelineJson; |
@@ -17,3 +17,3 @@ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson'; | ||
/** | ||
* TODO: [π§ ] Work with ptpVersion | ||
* TODO: [π§ ] Work with ptbkVersion | ||
* TODO: Use here some json-schema, Zod or something similar and change it to: | ||
@@ -20,0 +20,0 @@ * > /** |
@@ -15,3 +15,3 @@ import { PromptTemplatePipelineLibrary } from '../../../../../classes/PromptTemplatePipelineLibrary'; | ||
*/ | ||
readonly ptpLibrary: PromptTemplatePipelineLibrary; | ||
readonly ptbkLibrary: PromptTemplatePipelineLibrary; | ||
/** | ||
@@ -18,0 +18,0 @@ * Creates natural execution tools for each client |
@@ -8,3 +8,3 @@ import { string_markdown_text, string_name, string_version } from '.././types/typeAliases'; | ||
*/ | ||
export type Command = PtpUrlCommand | PtpVersionCommand | ExecuteCommand | UseCommand | ParameterCommand | PostprocessCommand; | ||
export type Command = PtbkUrlCommand | PtbkVersionCommand | ExecuteCommand | UseCommand | ParameterCommand | PostprocessCommand; | ||
/** | ||
@@ -16,5 +16,5 @@ * PtpVersion command tells which version is .ptp file using | ||
*/ | ||
export interface PtpUrlCommand { | ||
readonly type: 'PTP_URL'; | ||
readonly ptpUrl: URL; | ||
export interface PtbkUrlCommand { | ||
readonly type: 'PTBK_URL'; | ||
readonly ptbkUrl: URL; | ||
} | ||
@@ -27,5 +27,5 @@ /** | ||
*/ | ||
export interface PtpVersionCommand { | ||
readonly type: 'PTP_VERSION'; | ||
readonly ptpVersion: string_version; | ||
export interface PtbkVersionCommand { | ||
readonly type: 'PTBK_VERSION'; | ||
readonly ptbkVersion: string_version; | ||
} | ||
@@ -32,0 +32,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { string_name, string_prompt, string_ptp_url_with_hashtemplate } from '.././types/typeAliases'; | ||
import { string_name, string_prompt, string_ptbk_url_with_hashtemplate } from '.././types/typeAliases'; | ||
import { ModelRequirements } from './ModelRequirements'; | ||
@@ -23,9 +23,9 @@ /** | ||
* | ||
* @example https://ptp.webgpt.com/cs/write-wallpaper-content.ptp.md@v2.4.15#keywords | ||
* @example https://ptbk.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15#keywords | ||
*/ | ||
readonly ptpUrl: string_ptp_url_with_hashtemplate; | ||
readonly ptbkUrl: string_ptbk_url_with_hashtemplate; | ||
/** | ||
* Parameters used in the prompt | ||
* | ||
* Note: This is redundant (same information is in ptpUrl+content) but useful for logging and debugging | ||
* Note: This is redundant (same information is in ptbkUrl+content) but useful for logging and debugging | ||
*/ | ||
@@ -32,0 +32,0 @@ readonly parameters: Record<string_name, string>; |
@@ -52,3 +52,3 @@ import { string_javascript, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases'; | ||
* - It should start uppercase and contain letters and numbers | ||
* - The ptpUrl together with hash and name are used to identify the prompt template in the pipeline | ||
* - The ptbkUrl together with hash and name are used to identify the prompt template in the pipeline | ||
*/ | ||
@@ -55,0 +55,0 @@ readonly name: string_name; |
@@ -1,2 +0,2 @@ | ||
import { string_ptp_url, string_version } from '../.././types/typeAliases'; | ||
import { string_ptbk_url, string_version } from '../.././types/typeAliases'; | ||
import { PromptTemplateJson } from './PromptTemplateJson'; | ||
@@ -9,4 +9,4 @@ import { PromptTemplateParameterJson } from './PromptTemplateParameterJson'; | ||
* It can have 3 formats: | ||
* - **.ptp.md file** in custom markdown format described above | ||
* - _(this)_ **JSON** format, parsed from the .ptp.md file | ||
* - **.ptbk.md file** in custom markdown format described above | ||
* - _(this)_ **JSON** format, parsed from the .ptbk.md file | ||
* - **Object** which is created from JSON format and bound with tools around (but not the execution logic) | ||
@@ -23,6 +23,6 @@ * | ||
* Tip: You can do versioning in the URL | ||
* For example: https://ptp.webgpt.com/cs/write-wallpaper-content.ptp.md@1.0.0 | ||
* For example: https://ptbk.webgpt.com/cs/write-website-content.ptbk.md@1.0.0 | ||
* Warning: Do not hash part of the URL, hash part is used for identification of the prompt template in the pipeline | ||
*/ | ||
readonly ptpUrl?: string_ptp_url; | ||
readonly ptbkUrl?: string_ptbk_url; | ||
/** | ||
@@ -34,5 +34,5 @@ * Title of the prompt template pipeline | ||
/** | ||
* Version of the .ptp.json file | ||
* Version of the .ptbk.json file | ||
*/ | ||
readonly ptpVersion: string_version; | ||
readonly ptbkVersion: string_version; | ||
/** | ||
@@ -39,0 +39,0 @@ * Description of the prompt template pipeline |
@@ -6,4 +6,4 @@ /** | ||
* It can have 3 formats: | ||
* - _(this)_ **.ptp.md file** in custom markdown format described above | ||
* - **JSON** format, parsed from the .ptp.md file | ||
* - _(this)_ **.ptbk.md file** in custom markdown format described above | ||
* - **JSON** format, parsed from the .ptbk.md file | ||
* - **Object** which is created from JSON format and bound with tools around (but not the execution logic) | ||
@@ -10,0 +10,0 @@ * |
@@ -194,11 +194,11 @@ /** | ||
* | ||
* For example `"https://ptp.webgpt.com/cs/write-wallpaper-content.ptp.md@v2.4.15"` | ||
* For example `"https://ptbk.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15"` | ||
*/ | ||
export type string_ptp_url = string; | ||
export type string_ptbk_url = string; | ||
/** | ||
* Semantic helper | ||
* | ||
* For example `"https://ptp.webgpt.com/cs/write-wallpaper-content.ptp.md@v2.4.15#keywords"` | ||
* For example `"https://ptbk.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15#keywords"` | ||
*/ | ||
export type string_ptp_url_with_hashtemplate = string; | ||
export type string_ptbk_url_with_hashtemplate = string; | ||
/** | ||
@@ -205,0 +205,0 @@ * Semantic helper |
242762
3957