From 0f4a932afb8c3164f7234ac39fccd6fcdcbc5e45 Mon Sep 17 00:00:00 2001 From: Pavol Hejny Date: Thu, 12 Dec 2024 12:50:18 +0100 Subject: [PATCH] Prepare for forseen type system --- CHANGELOG.md | 9 +++++++++ src/pipeline/PipelineJson/CommonTaskJson.ts | 22 +++++++++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5350eb250..663bef197 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -614,6 +614,15 @@ Support for more models, add `@promptbook/vercel` and `@promptbook/google` packa - Option `userId` can be passed into all tools and instead of `null`, it can be `undefined` - Rename `$currentDate` -> `$getCurrentDate` +### In pre-release + +### `0.78.0` _(2024-12-)_ + +Parameter types to establish forseen [type system](https://github.com/webgptorg/book/tree/main/pips/pip-0002) + +- Move `expectations` and `format` from `Task` to `Parameter` +- Implicit formfactors - no need to explicitly define them, they are inferred from the pipeline interface + ## Drafts ### `0..0` _(2024--)_ diff --git a/src/pipeline/PipelineJson/CommonTaskJson.ts b/src/pipeline/PipelineJson/CommonTaskJson.ts index 338e50b09..fc58e4cdc 100644 --- a/src/pipeline/PipelineJson/CommonTaskJson.ts +++ b/src/pipeline/PipelineJson/CommonTaskJson.ts @@ -1,14 +1,16 @@ import type { ForeachJson } from '../../commands/FOREACH/ForeachJson'; import type { FormatCommand } from '../../commands/FORMAT/FormatCommand'; -import type { SectionType } from '../../types/SectionType'; -import type { string_javascript } from '../../types/typeAliases'; -import type { string_markdown } from '../../types/typeAliases'; -import type { string_markdown_text } from '../../types/typeAliases'; -import type { string_name } from '../../types/typeAliases'; -import type { string_parameter_name } from '../../types/typeAliases'; -import type { string_postprocessing_function_name } from '../../types/typeAliases'; -import type { string_prompt } from '../../types/typeAliases'; -import type { string_template } from '../../types/typeAliases'; +import { TaskType } from '../../types/TaskType'; +import type { + string_javascript, + string_markdown, + string_markdown_text, + string_name, + string_parameter_name, + string_postprocessing_function_name, + string_prompt, + string_template, +} from '../../types/typeAliases'; import type { Expectations } from './Expectations'; /** @@ -60,7 +62,7 @@ export type CommonTaskJson = { * Type of the execution * This determines if the task is send to LLM, user or some scripting evaluation */ - readonly taskType: SectionType; + readonly taskType: TaskType; /** * Content of the task with {placeholders} for parameters