@promptbook/types
Advanced tools
Comparing version 0.26.0 to 0.27.0-0
export {}; | ||
/** | ||
* TODO: [🧠] Probbably change syntax MODEL VARIANT -> MODEL | ||
* TODO: !!!! Allow to skip segments SKIP IF {foo} NOT DEFINED | ||
* TODO: !!! Allow to EXPECT 3 words | ||
* TODO: !!! Allow to skip segments SKIP IF {foo} NOT DEFINED | ||
*/ |
@@ -12,5 +12,3 @@ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson'; | ||
* TODO: Use spaceTrim more effectively | ||
* TODO: !!!! Parameter flags - isInput, isOutput, isInternal, isBeforePostprocessing, isBeforeFinal, canonicalName | ||
* TODO: !!!! Allow to have non-immutable parameters - suffix them with fooPrevious3 -> fooPrevious2 -> fooPrevious1 -> foo | ||
* This must work with other technial parameters | ||
* TODO: [🧠] Parameter flags - isInput, isOutput, isInternal | ||
*/ |
@@ -1,2 +0,2 @@ | ||
import { PromptTemplatePipeline } from '../classes/PromptTemplatePipeline'; | ||
import type { PromptTemplatePipeline } from '../classes/PromptTemplatePipeline'; | ||
import { ExecutionTools } from './ExecutionTools'; | ||
@@ -10,3 +10,3 @@ import { PtpExecutor } from './PtpExecutor'; | ||
*/ | ||
readonly maxNaturalExecutionAttempts: number; | ||
readonly maxExecutionAttempts: number; | ||
} | ||
@@ -13,0 +13,0 @@ /** |
@@ -25,5 +25,5 @@ import type { Prompt } from '../../../../types/Prompt'; | ||
/** | ||
* TODO: !!!! Allow to use other models - List all from openai | ||
* TODO: Maybe Create some common util for gptChat and gptComplete | ||
* TODO: Maybe make custom OpenaiError | ||
*/ |
@@ -1,2 +0,2 @@ | ||
import { number_integer, number_positive_or_zero, string_javascript, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases'; | ||
import { number_integer, number_positive_or_zero, string_javascript, string_javascript_name, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases'; | ||
import { ExpectFormatCommand } from '../Command'; | ||
@@ -16,15 +16,2 @@ import { ExecutionType } from '../ExecutionTypes'; | ||
/** | ||
* Expect this amount of each unit in the answer | ||
* | ||
* For example 5 words, 3 sentences, 2 paragraphs, ... | ||
*/ | ||
readonly expectAmount?: Partial<Record<Lowercase<ExpectationUnit>, { | ||
min?: ExpectationAmount; | ||
max?: ExpectationAmount; | ||
}>>; | ||
/** | ||
* Expect this format of the answer | ||
*/ | ||
readonly expectFormat?: ExpectFormatCommand['format']; | ||
/** | ||
* Requirements for the model | ||
@@ -102,2 +89,23 @@ * - This is required only for executionType PROMPT_TEMPLATE | ||
/** | ||
* List of postprocessing steps that are executed after the prompt template | ||
*/ | ||
readonly postprocessing?: Array<string_javascript_name>; | ||
/** | ||
* Expect this amount of each unit in the answer | ||
* | ||
* For example 5 words, 3 sentences, 2 paragraphs, ... | ||
* | ||
* Note: Expectations are performed after all postprocessing steps | ||
*/ | ||
readonly expectAmount?: Partial<Record<Lowercase<ExpectationUnit>, { | ||
min?: ExpectationAmount; | ||
max?: ExpectationAmount; | ||
}>>; | ||
/** | ||
* Expect this format of the answer | ||
* | ||
* Note: Expectations are performed after all postprocessing steps | ||
*/ | ||
readonly expectFormat?: ExpectFormatCommand['format']; | ||
/** | ||
* Name of the parameter that is the result of the prompt template | ||
@@ -104,0 +112,0 @@ */ |
{ | ||
"name": "@promptbook/types", | ||
"version": "0.26.0", | ||
"version": "0.27.0-0", | ||
"description": "Library to supercharge your use of large language models", | ||
@@ -38,3 +38,3 @@ "private": false, | ||
"peerDependencies": { | ||
"@promptbook/core": "0.26.0" | ||
"@promptbook/core": "0.27.0-0" | ||
}, | ||
@@ -41,0 +41,0 @@ "main": "./umd/index.umd.js", |
export {}; | ||
/** | ||
* TODO: [🧠] Probbably change syntax MODEL VARIANT -> MODEL | ||
* TODO: !!!! Allow to skip segments SKIP IF {foo} NOT DEFINED | ||
* TODO: !!! Allow to EXPECT 3 words | ||
* TODO: !!! Allow to skip segments SKIP IF {foo} NOT DEFINED | ||
*/ |
@@ -12,5 +12,3 @@ import { PromptTemplatePipelineJson } from '../types/PromptTemplatePipelineJson/PromptTemplatePipelineJson'; | ||
* TODO: Use spaceTrim more effectively | ||
* TODO: !!!! Parameter flags - isInput, isOutput, isInternal, isBeforePostprocessing, isBeforeFinal, canonicalName | ||
* TODO: !!!! Allow to have non-immutable parameters - suffix them with fooPrevious3 -> fooPrevious2 -> fooPrevious1 -> foo | ||
* This must work with other technial parameters | ||
* TODO: [🧠] Parameter flags - isInput, isOutput, isInternal | ||
*/ |
@@ -1,2 +0,2 @@ | ||
import { PromptTemplatePipeline } from '../classes/PromptTemplatePipeline'; | ||
import type { PromptTemplatePipeline } from '../classes/PromptTemplatePipeline'; | ||
import { ExecutionTools } from './ExecutionTools'; | ||
@@ -10,3 +10,3 @@ import { PtpExecutor } from './PtpExecutor'; | ||
*/ | ||
readonly maxNaturalExecutionAttempts: number; | ||
readonly maxExecutionAttempts: number; | ||
} | ||
@@ -13,0 +13,0 @@ /** |
@@ -25,5 +25,5 @@ import type { Prompt } from '../../../../types/Prompt'; | ||
/** | ||
* TODO: !!!! Allow to use other models - List all from openai | ||
* TODO: Maybe Create some common util for gptChat and gptComplete | ||
* TODO: Maybe make custom OpenaiError | ||
*/ |
@@ -1,2 +0,2 @@ | ||
import { number_integer, number_positive_or_zero, string_javascript, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases'; | ||
import { number_integer, number_positive_or_zero, string_javascript, string_javascript_name, string_markdown, string_name, string_prompt, string_template } from '../.././types/typeAliases'; | ||
import { ExpectFormatCommand } from '../Command'; | ||
@@ -16,15 +16,2 @@ import { ExecutionType } from '../ExecutionTypes'; | ||
/** | ||
* Expect this amount of each unit in the answer | ||
* | ||
* For example 5 words, 3 sentences, 2 paragraphs, ... | ||
*/ | ||
readonly expectAmount?: Partial<Record<Lowercase<ExpectationUnit>, { | ||
min?: ExpectationAmount; | ||
max?: ExpectationAmount; | ||
}>>; | ||
/** | ||
* Expect this format of the answer | ||
*/ | ||
readonly expectFormat?: ExpectFormatCommand['format']; | ||
/** | ||
* Requirements for the model | ||
@@ -102,2 +89,23 @@ * - This is required only for executionType PROMPT_TEMPLATE | ||
/** | ||
* List of postprocessing steps that are executed after the prompt template | ||
*/ | ||
readonly postprocessing?: Array<string_javascript_name>; | ||
/** | ||
* Expect this amount of each unit in the answer | ||
* | ||
* For example 5 words, 3 sentences, 2 paragraphs, ... | ||
* | ||
* Note: Expectations are performed after all postprocessing steps | ||
*/ | ||
readonly expectAmount?: Partial<Record<Lowercase<ExpectationUnit>, { | ||
min?: ExpectationAmount; | ||
max?: ExpectationAmount; | ||
}>>; | ||
/** | ||
* Expect this format of the answer | ||
* | ||
* Note: Expectations are performed after all postprocessing steps | ||
*/ | ||
readonly expectFormat?: ExpectFormatCommand['format']; | ||
/** | ||
* Name of the parameter that is the result of the prompt template | ||
@@ -104,0 +112,0 @@ */ |
278596
264
4917