Skip to content

Commit 66896db

Browse files
committed
feat(prompts): simplify prompt handling and argument parsing
This commit refactors the prompt handling logic by introducing a generic handler and simplifying the argument parsing. Previously, each prompt handler had its own specific logic for extracting arguments and constructing the prompt. This change centralizes the common logic into a `genericPromptHandler` and a `createTaskInstructions` function. The primary benefit is a significant reduction in code duplication and improved maintainability. By using a single `problem_statement` argument for all prompts, the interface for users becomes more consistent and easier to understand. The specific system prompts are now defined directly within each handler, making it clearer what each prompt is designed to achieve. This also removes the need for complex argument extraction functions and the `PromptTemplate` struct, streamlining the overall process.
1 parent 6d863c7 commit 66896db

File tree

3 files changed

+219
-548
lines changed

3 files changed

+219
-548
lines changed

0 commit comments

Comments
 (0)