You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments