@promptbook/types 0.68.4 โ†’ 0.68.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/esm/typings/src/cli/cli-commands/make.d.ts +1 -1
  2. package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +1 -1
  3. package/esm/typings/src/config.d.ts +2 -2
  4. package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +1 -1
  5. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +5 -5
  6. package/esm/typings/src/execution/createPipelineExecutor.d.ts +1 -1
  7. package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +1 -1
  8. package/esm/typings/src/knowledge/prepare-knowledge/pdf/prepareKnowledgeFromPdf.d.ts +1 -1
  9. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -1
  10. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  11. package/esm/typings/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +2 -2
  12. package/esm/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +2 -2
  13. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +2 -1
  14. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +2 -1
  15. package/esm/typings/src/llm-providers/openai/playground/playground.d.ts +1 -1
  16. package/esm/typings/src/personas/preparePersona.d.ts +1 -1
  17. package/esm/typings/src/prepare/isPipelinePrepared.d.ts +1 -1
  18. package/esm/typings/src/prepare/prepareTemplates.d.ts +1 -1
  19. package/esm/typings/src/types/typeAliases.d.ts +1 -1
  20. package/esm/typings/src/utils/serialization/checkSerializableAsJson.d.ts +1 -1
  21. package/esm/typings/src/utils/serialization/isSerializableAsJson.d.ts +1 -1
  22. package/package.json +2 -2
@@ -6,7 +6,7 @@ import type { Command as Program } from 'commander';
6
6
  */
7
7
  export declare function initializeMakeCommand(program: Program): void;
8
8
  /**
9
- * TODO: [๐Ÿฅƒ] !!! Allow `ptbk make` without configuring any llm tools
9
+ * TODO: [๐Ÿฅƒ][main] !!! Allow `ptbk make` without configuring any llm tools
10
10
  * TODO: Maybe remove this command - "about" command should be enough?
11
11
  * TODO: [0] DRY Javascript and typescript - Maybe make ONLY typescript and for javascript just remove types
12
12
  * Note: [๐ŸŸก] This code should never be published outside of `@promptbook/cli`
@@ -25,5 +25,5 @@ type CreatePipelineCollectionFromUrlyOptions = {
25
25
  export declare function createCollectionFromUrl(url: string_url | URL, options: CreatePipelineCollectionFromUrlyOptions): Promise<PipelineCollection>;
26
26
  export {};
27
27
  /**
28
- * TODO: !!!! [๐Ÿง ] Library precompilation and do not mix markdown and json promptbooks
28
+ * TODO:[main] !!!! [๐Ÿง ] Library precompilation and do not mix markdown and json promptbooks
29
29
  */
@@ -68,14 +68,14 @@ export declare const MAX_EXECUTION_ATTEMPTS = 3;
68
68
  export declare const MAX_FILENAME_LENGTH = 30;
69
69
  /**
70
70
  * @@@
71
- * TODO: [๐Ÿ] !!! Use
71
+ * TODO: [๐Ÿ][main] !!! Use
72
72
  *
73
73
  * @public exported from `@promptbook/core`
74
74
  */
75
75
  export declare const MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3;
76
76
  /**
77
77
  * @@@
78
- * TODO: [๐Ÿ] !!! Use
78
+ * TODO: [๐Ÿ][main] !!! Use
79
79
  *
80
80
  * @public exported from `@promptbook/core`
81
81
  */
@@ -18,7 +18,7 @@ import type { PipelineString } from '../types/PipelineString';
18
18
  */
19
19
  export declare function pipelineStringToJsonSync(pipelineString: PipelineString): PipelineJson;
20
20
  /**
21
- * TODO: !!!! Warn if used only sync version
21
+ * TODO:[main] !!!! Warn if used only sync version
22
22
  * TODO: [๐Ÿšž] Report here line/column of error
23
23
  * TODO: Use spaceTrim more effectively
24
24
  * TODO: [๐Ÿง ] Parameter flags - isInput, isOutput, isInternal
@@ -27,11 +27,11 @@ export declare function validatePipeline(pipeline: PipelineJson): PipelineJson;
27
27
  * > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
28
28
  */
29
29
  /**
30
- * TODO: [๐Ÿฃ] !!!! Validate that all samples match expectations
31
- * TODO: [๐Ÿฃ][๐Ÿ] !!!! Validate that knowledge is valid (non-void)
32
- * TODO: [๐Ÿฃ] !!!! Validate that persona can be used only with CHAT variant
33
- * TODO: [๐Ÿฃ] !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
34
- * TODO: [๐Ÿฃ] !!!! Validate that reserved parameter is not used as joker
30
+ * TODO: [๐Ÿฃ][main] !!!! Validate that all samples match expectations
31
+ * TODO: [๐Ÿฃ][๐Ÿ][main] !!!! Validate that knowledge is valid (non-void)
32
+ * TODO: [๐Ÿฃ][main] !!!! Validate that persona can be used only with CHAT variant
33
+ * TODO: [๐Ÿฃ][main] !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
34
+ * TODO: [๐Ÿฃ][main] !!!! Validate that reserved parameter is not used as joker
35
35
  * TODO: [๐Ÿง ] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
36
36
  * TODO: [๐Ÿ› ] Actions, instruments (and maybe knowledge) => Functions and tools
37
37
  */
@@ -58,7 +58,7 @@ interface CreatePipelineExecutorOptions {
58
58
  export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor;
59
59
  export {};
60
60
  /**
61
- * TODO: !!! Identify not only pipeline BUT exact template ${block(pipelineIdentification)}
61
+ * TODO:[main] !!! Identify not only pipeline BUT exact template ${block(pipelineIdentification)}
62
62
  * TODO: Use isVerbose here (not only pass to `preparePipeline`)
63
63
  * TODO: [๐Ÿง ][๐ŸŒณ] Use here `countTotalUsage` and put preparation and prepared pipiline to report
64
64
  * TODO: [๐Ÿช‚] Use maxParallelCount here (not only pass to `preparePipeline`)
@@ -8,7 +8,7 @@ import type { string_markdown } from '../../../types/typeAliases';
8
8
  */
9
9
  export declare function prepareKnowledgeFromMarkdown(knowledgeContent: string_markdown, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
10
10
  /**
11
- * TODO: [๐Ÿ][๐Ÿ”ผ] !!! Export via `@promptbook/markdown`
11
+ * TODO: [๐Ÿ][๐Ÿ”ผ][main] !!! Export via `@promptbook/markdown`
12
12
  * TODO: [๐Ÿช‚] Do it in parallel 11:11
13
13
  * Note: No need to aggregate usage here, it is done by intercepting the llmTools
14
14
  */
@@ -8,7 +8,7 @@ import type { string_base64 } from '../../../types/typeAliases';
8
8
  */
9
9
  export declare function prepareKnowledgeFromPdf(content: string_base64, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
10
10
  /**
11
- * TODO: [๐Ÿ][๐Ÿ”ผ] !!! Export via `@promptbook/pdf`
11
+ * TODO: [๐Ÿ][๐Ÿ”ผ][main] !!! Export via `@promptbook/pdf`
12
12
  * TODO: [๐Ÿงบ] In future, content can be alse File or Blob BUT for now for wider compatibility its only base64
13
13
  * @see https://stackoverflow.com/questions/14653349/node-js-cant-create-blobs
14
14
  * TODO: [๐Ÿช‚] Do it in parallel
@@ -1,3 +1,4 @@
1
+ import Anthropic from '@anthropic-ai/sdk';
1
2
  import type { AvailableModel } from '../../execution/AvailableModel';
2
3
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
3
4
  import type { ChatPromptResult } from '../../execution/PromptResult';
@@ -26,7 +27,7 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools
26
27
  constructor(options?: AnthropicClaudeExecutionToolsDirectOptions);
27
28
  get title(): string_title & string_markdown_text;
28
29
  get description(): string_markdown;
29
- private getClient;
30
+ getClient(): Promise<Anthropic>;
30
31
  /**
31
32
  * Check the `options` passed to `constructor`
32
33
  */
@@ -16,7 +16,7 @@ export declare const ANTHROPIC_CLAUDE_MODELS: Array<AvailableModel & {
16
16
  }>;
17
17
  /**
18
18
  * Note: [๐Ÿค–] Add models of new variant
19
- * TODO: [๐Ÿง ] !!! Add embedding models OR Anthropic has only chat+completion models?
19
+ * TODO: [๐Ÿง ][main] !!! Add embedding models OR Anthropic has only chat+completion models?
20
20
  * TODO: [๐Ÿง ] Some mechanism to propagate unsureness
21
21
  * TODO: [๐Ÿง ][๐Ÿ‘ฎโ€โ™€๏ธ] Put here more info like description, isVision, trainingDateCutoff, languages, strengths ( Top-level performance, intelligence, fluency, and understanding), contextWindow,...
22
22
  * TODO: [๐ŸŽฐ] Some mechanism to auto-update available models
@@ -11,8 +11,8 @@ export declare const createAnthropicClaudeExecutionTools: ((options: AnthropicCl
11
11
  className: string;
12
12
  };
13
13
  /**
14
- * TODO: [๐Ÿง ] !!!! Make anonymous this with all LLM providers
15
- * TODO: [๐Ÿง ][๐Ÿงฑ] !!!! Maybe change all `new AnthropicClaudeExecutionTools` -> `createAnthropicClaudeExecutionTools` in manual
14
+ * TODO: [๐Ÿง ][main] !!!! Make anonymous this with all LLM providers
15
+ * TODO: [๐Ÿง ][๐Ÿงฑ][main] !!!! Maybe change all `new AnthropicClaudeExecutionTools` -> `createAnthropicClaudeExecutionTools` in manual
16
16
  * TODO: [๐Ÿง ] Maybe auto-detect usage in browser and determine default value of `isProxied`
17
17
  * TODO: [๐Ÿฆบ] Is there some way how to put `packageName` and `className` on top and function definition on bottom?
18
18
  * TODO: [๐ŸŽถ] Naming "constructor" vs "creator" vs "factory"
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ts-node
2
2
  export {};
3
3
  /**
4
- * TODO: !!! Playground with WebGPT / Promptbook.studio anonymous server
5
- * TODO: !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
4
+ * TODO:[main] !!! Playground with WebGPT / Promptbook.studio anonymous server
5
+ * TODO:[main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
6
6
  */
@@ -1,3 +1,4 @@
1
+ import { OpenAIClient } from '@azure/openai';
1
2
  import type { AvailableModel } from '../../execution/AvailableModel';
2
3
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
3
4
  import type { ChatPromptResult } from '../../execution/PromptResult';
@@ -26,7 +27,7 @@ export declare class AzureOpenAiExecutionTools implements LlmExecutionTools {
26
27
  constructor(options: AzureOpenAiExecutionToolsOptions);
27
28
  get title(): string_title & string_markdown_text;
28
29
  get description(): string_markdown;
29
- private getClient;
30
+ getClient(): Promise<OpenAIClient>;
30
31
  /**
31
32
  * Check the `options` passed to `constructor`
32
33
  */
@@ -1,3 +1,4 @@
1
+ import OpenAI from 'openai';
1
2
  import type { AvailableModel } from '../../execution/AvailableModel';
2
3
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
3
4
  import type { ChatPromptResult } from '../../execution/PromptResult';
@@ -27,7 +28,7 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools {
27
28
  constructor(options?: OpenAiExecutionToolsOptions);
28
29
  get title(): string_title & string_markdown_text;
29
30
  get description(): string_markdown;
30
- private getClient;
31
+ getClient(): Promise<OpenAI>;
31
32
  /**
32
33
  * Check the `options` passed to `constructor`
33
34
  */
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ts-node
2
2
  export {};
3
3
  /**
4
- * TODO: !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
4
+ * TODO:[main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
5
5
  */
@@ -9,7 +9,7 @@ import type { string_persona_description } from '../types/typeAliases';
9
9
  */
10
10
  export declare function preparePersona(personaDescription: string_persona_description, options: PrepareOptions): Promise<PersonaPreparedJson['modelRequirements']>;
11
11
  /**
12
- * TODO: [๐Ÿ”ƒ] !!!!! If the persona was prepared with different version or different set of models, prepare it once again
12
+ * TODO: [๐Ÿ”ƒ][main] !!!!! If the persona was prepared with different version or different set of models, prepare it once again
13
13
  * TODO: [๐Ÿข] !! Check validity of `modelName` in pipeline
14
14
  * TODO: [๐Ÿข] !! Check validity of `systemMessage` in pipeline
15
15
  * TODO: [๐Ÿข] !! Check validity of `temperature` in pipeline
@@ -6,7 +6,7 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
6
6
  */
7
7
  export declare function isPipelinePrepared(pipeline: PipelineJson): boolean;
8
8
  /**
9
- * TODO: [๐Ÿ”ƒ] !!!!! If the pipeline was prepared with different version or different set of models, prepare it once again
9
+ * TODO: [๐Ÿ”ƒ][main] !!!!! If the pipeline was prepared with different version or different set of models, prepare it once again
10
10
  * TODO: [๐Ÿ ] Maybe base this on `makeValidator`
11
11
  * TODO: [๐ŸงŠ] Pipeline can be partially prepared, this should return true ONLY if fully prepared
12
12
  * TODO: [๐Ÿงฟ] Maybe do same process with same granularity and subfinctions as `preparePipeline`
@@ -23,7 +23,7 @@ export {};
23
23
  /**
24
24
  * TODO: [๐Ÿง ] Add context to each template (if missing)
25
25
  * TODO: [๐Ÿง ] What is better name `prepareTemplate` or `prepareTemplateAndParameters`
26
- * TODO: [โ™จ] !!! Prepare index the samples and maybe templates
26
+ * TODO: [โ™จ][main] !!! Prepare index the samples and maybe templates
27
27
  * TODO: Write tests for `preparePipeline`
28
28
  * TODO: [๐Ÿ] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
29
29
  * TODO: [๐ŸงŠ] In future one preparation can take data from previous preparation and save tokens and time
@@ -592,7 +592,7 @@ export type number_megabytes = number_positive;
592
592
  export type number_gigabytes = number_positive;
593
593
  export type number_terabytes = number_positive;
594
594
  /**.
595
- * TODO: !!! Change "For example" to @example
595
+ * TODO:[main] !!! Change "For example" to @example
596
596
  * TODO: !! Change to branded types
597
597
  * TODO: Delete type aliases that are not exported or used internally
598
598
  */
@@ -22,6 +22,6 @@ import type { string_name } from '../../types/typeAliases';
22
22
  export declare function checkSerializableAsJson(name: string_name, value: unknown): void;
23
23
  /**
24
24
  * TODO: [๐Ÿง ][๐Ÿ›ฃ] More elegant way to tracking than passing `name`
25
- * TODO: [๐Ÿง ] !!! In-memory cache of same values to prevent multiple checks
25
+ * TODO: [๐Ÿง ][main] !!! In-memory cache of same values to prevent multiple checks
26
26
  * Note: [๐Ÿ ] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
27
27
  */
@@ -19,6 +19,6 @@
19
19
  */
20
20
  export declare function isSerializableAsJson(value: unknown): boolean;
21
21
  /**
22
- * TODO: [๐Ÿง ] !!! In-memory cache of same values to prevent multiple checks
22
+ * TODO: [๐Ÿง ][main] !!! In-memory cache of same values to prevent multiple checks
23
23
  * TODO: [๐Ÿง ][๐Ÿ’บ] Can be done this on type-level?
24
24
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.68.4",
3
+ "version": "0.68.5",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -45,6 +45,6 @@
45
45
  ],
46
46
  "typings": "./esm/typings/src/_packages/types.index.d.ts",
47
47
  "peerDependencies": {
48
- "@promptbook/core": "0.68.4"
48
+ "@promptbook/core": "0.68.5"
49
49
  }
50
50
  }