-
Notifications
You must be signed in to change notification settings - Fork 44.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor seed prompt loading: replace text file with Python class for easier maintenance #837
Refactor seed prompt loading: replace text file with Python class for easier maintenance #837
Conversation
This removes the tedium of having to re-number every numbered item in the prompt.txt if you want to add/remove commands.
Thought the |
I guess the first thing @Torantulino will do when he is back is to fix the master. And we desperately need CI, so some minimalistic introduction of CI is wecome in PRs. |
There's a PR fix for it: #839 (comment) |
There appears to be several PRs trying to fix the same issue, yeah |
Is there an issue for this problem? |
@AlrikOlson There are conflicts again |
Fixed merge conflict, made sure to add the new |
@AlrikOlson There are conflicts again |
@nponeccop resolved |
Conflicting files scripts/prompt.py:3:1: E302 expected 2 blank lines, found 1 |
resolved |
Have these commands been intentionally removed, they no longer required?
|
This PR did not change add/remove/modify any commands. Memory commands were removed in a separate change unrelated to this one. |
* make performance test reproducible * fix test error * Doc update and disable logging * document random_state and version * remove hardcoded budget * fix test error and dependency; close Significant-Gravitas#777 * iloc
…nerator Refactor seed prompt loading: replace text file with Python class for easier maintenance
This is a follow-up and improvement to my previous PR #760
Background
The initial implementation involved loading a seed prompt from a text file (prompt.txt). While this worked, it made the process of editing the seed prompt cumbersome and less efficient. To improve this process, this pull request refactors the method by which the seed prompt is loaded and generated, transitioning from a text file to a Python class. This will simplify editing the seed prompt and streamline the overall workflow.
Changes
PromptGenerator
in a separate file (promptgenerator.py
), which contains the necessary methods to build the seed prompt.PromptGenerator
class instead of loading the prompt from the text file.Documentation
Code is fully commented.
Test Plan
Unit tests have been written for the
PromptGenerator
class. I've also tested this functionality with several basic prompts, including the baseai_settings.yml
PR Quality Checklist