@promptbook/execute-javascript
Advanced tools
Comparing version 0.81.0-22 to 0.81.0-23
@@ -103,2 +103,3 @@ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version'; | ||
import { EXPECTATION_UNITS } from '../pipeline/PipelineJson/Expectations'; | ||
import { validatePipelineString } from '../pipeline/validatePipelineString'; | ||
import { isPipelinePrepared } from '../prepare/isPipelinePrepared'; | ||
@@ -226,2 +227,3 @@ import { preparePipeline } from '../prepare/preparePipeline'; | ||
export { EXPECTATION_UNITS }; | ||
export { validatePipelineString }; | ||
export { isPipelinePrepared }; | ||
@@ -228,0 +230,0 @@ export { preparePipeline }; |
@@ -175,2 +175,3 @@ import type { PipelineCollection } from '../collection/PipelineCollection'; | ||
import type { string_base_url } from '../types/typeAliases'; | ||
import type { string_pipeline_root_url } from '../types/typeAliases'; | ||
import type { string_pipeline_url } from '../types/typeAliases'; | ||
@@ -441,2 +442,3 @@ import type { string_pipeline_url_with_task_hash } from '../types/typeAliases'; | ||
export type { string_base_url }; | ||
export type { string_pipeline_root_url }; | ||
export type { string_pipeline_url }; | ||
@@ -443,0 +445,0 @@ export type { string_pipeline_url_with_task_hash }; |
@@ -9,3 +9,3 @@ import type { Command as Program } from 'commander'; | ||
/** | ||
* TODO: [๐ฅ][main] !!! Allow `ptbk make` without configuring any llm tools | ||
* TODO: [๐ฅ][main] !!3 Allow `ptbk make` without configuring any llm tools | ||
* TODO: [0] DRY Javascript and typescript - Maybe make ONLY typescript and for javascript just remove types | ||
@@ -12,0 +12,0 @@ * Note: [๐] Ignore a discrepancy between file name and entity name |
@@ -9,5 +9,5 @@ import type { Command as Program } from 'commander'; | ||
/** | ||
* TODO: !!!!! Catch and wrap all errors from CLI | ||
* TODO: !!5 Catch and wrap all errors from CLI | ||
* TODO: [๐ง ] Pass `maxExecutionAttempts`, `csvSettings` | ||
* TODO: [๐ฅ][main] !!! Allow `ptbk run` without configuring any llm tools | ||
* TODO: [๐ฅ][main] !!3 Allow `ptbk run` without configuring any llm tools | ||
* Note: [๐] Ignore a discrepancy between file name and entity name | ||
@@ -14,0 +14,0 @@ * Note: [๐ก] Code in this file should never be published outside of `@promptbook/cli` |
import type { ExecutionTools } from '../../execution/ExecutionTools'; | ||
import type { PrepareAndScrapeOptions } from '../../prepare/PrepareAndScrapeOptions'; | ||
import type { string_dirname } from '../../types/typeAliases'; | ||
import type { string_pipeline_root_url } from '../../types/typeAliases'; | ||
import type { PipelineCollection } from '../PipelineCollection'; | ||
@@ -25,2 +26,12 @@ /** | ||
/** | ||
* This will be used as a root URL for all pipelines in the collection | ||
* | ||
* It has 2 purposes: | ||
* 1) Every pipeline in the collection is checked if it is a child of `rootUrl` | ||
* 2) If the pipeline does not have a URL, it is created from the `rootUrl` and path to the pipeline | ||
* | ||
* @default false | ||
*/ | ||
rootUrl?: string_pipeline_root_url; | ||
/** | ||
* If true, directory will be scanned only when needed not during the construction | ||
@@ -27,0 +38,0 @@ * |
@@ -28,3 +28,3 @@ import type { string_url } from '../../types/typeAliases'; | ||
/** | ||
* TODO: [main] !!!! [๐ง ] Library precompilation and do not mix markdown and json promptbooks | ||
* TODO: [main] !!4 [๐ง ] Library precompilation and do not mix markdown and json promptbooks | ||
*/ |
@@ -9,2 +9,2 @@ /** | ||
* Note: [๐] Ignore a discrepancy between file name and entity name | ||
*/ | ||
*/ |
@@ -144,3 +144,3 @@ import type { CsvSettings } from './formats/csv/CsvSettings'; | ||
* @@@ | ||
* TODO: [๐][main] !!! Use | ||
* TODO: [๐][main] !!3 Use | ||
* | ||
@@ -152,3 +152,3 @@ * @public exported from `@promptbook/core` | ||
* @@@ | ||
* TODO: [๐][main] !!! Use | ||
* TODO: [๐][main] !!3 Use | ||
* | ||
@@ -155,0 +155,0 @@ * @public exported from `@promptbook/core` |
@@ -22,3 +22,3 @@ import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson'; | ||
* TODO: [๐ง ] Maybe more things here can be refactored as high-level abstractions | ||
* TODO: [main] !!!! Warn if used only sync version | ||
* TODO: [main] !!4 Warn if used only sync version | ||
* TODO: [๐] Report here line/column of error | ||
@@ -25,0 +25,0 @@ * TODO: Use spaceTrim more effectively |
@@ -25,7 +25,7 @@ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson'; | ||
/** | ||
* TODO: [๐ง ] !! FOREACH in mermaid graph | ||
* TODO: [๐ง ] !! Knowledge in mermaid graph | ||
* TODO: [๐ง ] !! Personas in mermaid graph | ||
* 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 | ||
*/ |
@@ -21,5 +21,5 @@ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson'; | ||
*/ | ||
export declare function validatePipelineCore(pipeline: PipelineJson): void; | ||
export declare function validatePipeline_InnerFunction(pipeline: PipelineJson): void; | ||
/** | ||
* TODO: !! [๐งโโ๏ธ] Do not allow joker + foreach | ||
* TODO: [๐งโโ๏ธ] Do not allow joker + foreach | ||
* TODO: [๐ง ] Work with promptbookVersion | ||
@@ -36,9 +36,9 @@ * TODO: Use here some json-schema, Zod or something similar and change it to: | ||
/** | ||
* TODO: [๐งณ][main] !!!! Validate that all examples match expectations | ||
* TODO: [๐งณ][๐][main] !!!! Validate that knowledge is valid (non-void) | ||
* TODO: [๐งณ][main] !!!! Validate that persona can be used only with CHAT variant | ||
* TODO: [๐งณ][main] !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES | ||
* TODO: [๐งณ][main] !!!! Validate that reserved parameter is not used as joker | ||
* TODO: [๐งณ][main] !!4 Validate that all examples match expectations | ||
* TODO: [๐งณ][๐][main] !!4 Validate that knowledge is valid (non-void) | ||
* TODO: [๐งณ][main] !!4 Validate that persona can be used only with CHAT variant | ||
* TODO: [๐งณ][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES | ||
* TODO: [๐งณ][main] !!4 Validate that reserved parameter is not used as joker | ||
* TODO: [๐ง ] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists | ||
* TODO: [๐ ] Actions, instruments (and maybe knowledge) => Functions and tools | ||
*/ |
/** | ||
* Make error report URL for the given error | ||
* | ||
* @private !!!!!! | ||
* @private private within the repository | ||
*/ | ||
export declare function getErrorReportUrl(error: Error): URL; |
@@ -19,3 +19,3 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
* Note: [๐ค] Add models of new variant | ||
* TODO: [๐ง ][main] !!! Add embedding models OR Anthropic has only chat+completion models? | ||
* TODO: [๐ง ][main] !!3 Add embedding models OR Anthropic has only chat+completion models? | ||
* TODO: [๐ง ] Some mechanism to propagate unsureness | ||
@@ -22,0 +22,0 @@ * TODO: [๐ง ][๐ฎโโ๏ธ] Put here more info like description, isVision, trainingDateCutoff, languages, strengths ( Top-level performance, intelligence, fluency, and understanding), contextWindow,... |
@@ -14,4 +14,4 @@ import { RemoteLlmExecutionTools } from '../remote/RemoteLlmExecutionTools'; | ||
/** | ||
* TODO: [๐ง ][main] !!!! Make anonymous this with all LLM providers | ||
* TODO: [๐ง ][๐งฑ][main] !!!! Maybe change all `new AnthropicClaudeExecutionTools` -> `createAnthropicClaudeExecutionTools` in manual | ||
* TODO: [๐ง ][main] !!4 Make anonymous this with all LLM providers | ||
* TODO: [๐ง ][๐งฑ][main] !!4 Maybe change all `new AnthropicClaudeExecutionTools` -> `createAnthropicClaudeExecutionTools` in manual | ||
* TODO: [๐ง ] Maybe auto-detect usage in browser and determine default value of `isProxied` | ||
@@ -18,0 +18,0 @@ * TODO: [๐ฆบ] Is there some way how to put `packageName` and `className` on top and function definition on bottom? |
#!/usr/bin/env ts-node | ||
export {}; | ||
/** | ||
* TODO: [main] !!! Playground with WebGPT / Promptbook.studio anonymous server | ||
* TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* TODO: [main] !!3 Playground with WebGPT / Promptbook.studio anonymous server | ||
* TODO: [main] !!3 Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* Note: [โซ] Code in this file should never be published in any package | ||
*/ |
#!/usr/bin/env ts-node | ||
export {}; | ||
/** | ||
* TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* TODO: [main] !!3 Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* Note: [โซ] Code in this file should never be published in any package | ||
*/ |
#!/usr/bin/env ts-node | ||
export {}; | ||
/** | ||
* TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* TODO: [main] !!3 Test here that `systemMessage`, `temperature` and `seed` are working correctly | ||
* Note: [โซ] Code in this file should never be published in any package | ||
*/ |
@@ -21,3 +21,3 @@ import type { string_formfactor_name } from '../../formfactors/_common/string_formfactor_name'; | ||
* TODO: [๐ง ] Which is the best place for this function | ||
* TODO: !!!!!! For GENERIC template ensure at least one pipeline is present for typescript in `getBookTemplates` | ||
* TODO: !!6 For GENERIC template ensure at least one pipeline is present for typescript in `getBookTemplates` | ||
*/ |
@@ -13,6 +13,6 @@ import type { ExecutionTools } from '../execution/ExecutionTools'; | ||
/** | ||
* TODO: [๐][main] !! If the persona was prepared with different version or different set of models, prepare it once again | ||
* TODO: [๐ข] !! Check validity of `modelName` in pipeline | ||
* TODO: [๐ข] !! Check validity of `systemMessage` in pipeline | ||
* TODO: [๐ข] !! Check validity of `temperature` in pipeline | ||
* TODO: [๐][main] If the persona was prepared with different version or different set of models, prepare it once again | ||
* TODO: [๐ข] Check validity of `modelName` in pipeline | ||
* TODO: [๐ข] Check validity of `systemMessage` in pipeline | ||
* TODO: [๐ข] Check validity of `temperature` in pipeline | ||
*/ |
@@ -12,5 +12,4 @@ import type { PipelineString } from './PipelineString'; | ||
/** | ||
* TODO: Use ACRY book\`...\ notation instead of as PipelineString | ||
* TODO: [๐ง ][๐ด] Where is the best location for this file | ||
* Note: [๐] Ignore a discrepancy between file name and entity name | ||
*/ |
@@ -6,7 +6,9 @@ import type { PipelineString } from './PipelineString'; | ||
* | ||
* @param {string} pipelineString the candidate for a pipeline string | ||
* @returns {boolean} if the string is a valid pipeline string | ||
* @public exported from `@promptbook/core` | ||
*/ | ||
export declare function isValidPipelineString(value: string): value is PipelineString; | ||
export declare function isValidPipelineString(pipelineString: string): pipelineString is PipelineString; | ||
/** | ||
* TODO: [๐ง ][๐ด] Where is the best location for this file | ||
*/ |
@@ -10,4 +10,1 @@ /** | ||
}; | ||
/** | ||
* TODO: [๐ฉ] Better validation (validatePipelineString) or remove branded type and make it just string | ||
*/ |
@@ -11,3 +11,3 @@ import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson'; | ||
/** | ||
* TODO: [๐][main] !! If the pipeline was prepared with different version or different set of models, prepare it once again | ||
* TODO: [๐][main] If the pipeline was prepared with different version or different set of models, prepare it once again | ||
* TODO: [๐ ] Maybe base this on `makeValidator` | ||
@@ -14,0 +14,0 @@ * TODO: [๐ง] Pipeline can be partially prepared, this should return true ONLY if fully prepared |
@@ -28,3 +28,3 @@ import type { ExecutionTools } from '../execution/ExecutionTools'; | ||
* TODO: [๐ง ] What is better name `prepareTask` or `prepareTaskAndParameters` | ||
* TODO: [โจ][main] !!! Prepare index the examples and maybe tasks | ||
* TODO: [โจ][main] !!3 Prepare index the examples and maybe tasks | ||
* TODO: Write tests for `preparePipeline` | ||
@@ -31,0 +31,0 @@ * TODO: [๐] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch |
export {}; | ||
/** | ||
* TODO: !! Make shared test between JavascriptEvalExecutionTools and JavascriptExecutionTools to test the same functionality when implemented via vm2 | ||
* TODO: Make shared test between JavascriptEvalExecutionTools and JavascriptExecutionTools to test the same functionality when implemented via vm2 | ||
*/ |
@@ -13,3 +13,3 @@ import type { really_any } from '../../../utils/organization/really_any'; | ||
* TODO: Probbably remove in favour of `keepImported` | ||
* TODO: !! [1] This maybe does memory leak | ||
* TODO: [1] This maybe does memory leak | ||
*/ |
@@ -325,2 +325,8 @@ import type { TupleToUnion } from 'type-fest'; | ||
* | ||
* For example `"https://promptbook.studio/webgpt/"` | ||
*/ | ||
export type string_pipeline_root_url = string; | ||
/** | ||
* Semantic helper | ||
* | ||
* For example `"https://promptbook.studio/webgpt/write-website-content-cs.book.md"` | ||
@@ -627,6 +633,6 @@ */ | ||
/**. | ||
* TODO: [main] !!! Change "For example" to @example | ||
* TODO: !! Change to branded types | ||
* TODO: [main] !!3 Change "For example" to @example | ||
* TODO: Change to branded types | ||
* TODO: Delete type aliases that are not exported or used internally | ||
* Note: [๐] Ignore a discrepancy between file name and entity name | ||
*/ |
@@ -43,4 +43,4 @@ import type { string_name } from '../../types/typeAliases'; | ||
* TODO: Can be return type more type-safe? like `asserts options.value is JsonValue` | ||
* TODO: [๐ง ][main] !!! In-memory cache of same values to prevent multiple checks | ||
* TODO: [๐ง ][main] !!3 In-memory cache of same values to prevent multiple checks | ||
* Note: [๐ ] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message | ||
*/ |
@@ -23,4 +23,4 @@ import type { JsonValue } from 'type-fest'; | ||
/** | ||
* TODO: [๐ง ][main] !!! In-memory cache of same values to prevent multiple checks | ||
* TODO: [๐ง ][main] !!3 In-memory cache of same values to prevent multiple checks | ||
* TODO: [๐ง ][๐บ] Can be done this on type-level? | ||
*/ |
{ | ||
"name": "@promptbook/execute-javascript", | ||
"version": "0.81.0-22", | ||
"version": "0.81.0-23", | ||
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin", | ||
@@ -57,3 +57,3 @@ "--note-0": " <- [๐]", | ||
"peerDependencies": { | ||
"@promptbook/core": "0.81.0-22" | ||
"@promptbook/core": "0.81.0-23" | ||
}, | ||
@@ -60,0 +60,0 @@ "dependencies": { |
@@ -136,28 +136,21 @@ <!-- โ ๏ธ WARNING: This code has been generated so that any manual changes will be overwritten --> | ||
- [LinkedIn `Promptbook`](https://linkedin.com/company/promptbook) | ||
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536) | ||
- [Facebook `Promptbook`](https://www.facebook.com/61560776453536) | ||
And **Promptbook.studio** branded socials: | ||
- [Instagram `@promptbook.studio`](https://www.instagram.com/promptbook.studio/) | ||
And **Promptujeme** sub-brand: | ||
*/Subbrand for Czech clients/* | ||
_/Subbrand for Czech clients/_ | ||
- [Promptujeme.cz](https://www.promptujeme.cz/) | ||
- [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/) | ||
And **Promptbook.city** branded socials: | ||
*/Sub-brand for images and graphics generated via Promptbook prompting/* | ||
_/Sub-brand for images and graphics generated via Promptbook prompting/_ | ||
- [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/) | ||
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569) | ||
- [Facebook `Promptbook City`](https://www.facebook.com/61565718625569) | ||
@@ -296,7 +289,2 @@ | ||
### ๐ Dictionary | ||
@@ -317,4 +305,2 @@ | ||
_Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_ | ||
@@ -380,4 +366,2 @@ | ||
### Terms specific to Promptbook TypeScript implementation | ||
@@ -384,0 +368,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
849731
651
16312
441