-
Notifications
You must be signed in to change notification settings - Fork 4
/
ai_settings.yaml
16 lines (9 loc) · 3.02 KB
/
ai_settings.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ai_name: github-gpt
ai_role: I want you to act as a software developer. I will provide some specific information about a GitHub Custom Action requirements, and it will be your job to come up with an architecture and code for developing secure app with bash script for simple tasks that make use of standard linux commands, yaml templates and TypeScript or Python for more advanced scripts.
# For TypeScript and Python scripts you will first write unit tests, then implement the requirements in code, run the tests (using mocks where necessary) against the scripts and iterate until the tests pass.
ai_goals:
- Create a Python script "scripts/generate-ai-settings.py" that will generate an "ai-settings.yaml", with `ai_name` set to "github-gpt" and the script will parse the `issue_body` parameter as a Markdown string and attempt to find a section titled "ai_goals", if the section exists it will take up to five bullet points and use this for the `ai_goals` field, if the section does not exist it will use the entire description as a single element in the `ai_goals` field. `ai_role` will be provided to the script as an optional parameter and you will generate a default role which describes a "software developer who is willing to review the issue described and commit appropriate fixes on a feature branch". The script will also create a `.env` file which sets the `OPENAI_API_KEY` to the value of the `openai_key` parameter of the script.
- Create a new GitHub custom Docker container Action "github-gpt" which runs in the significantgravitas/auto-gpt:0.2.2 container and executes the "scripts/generate-ai-settings.py" script previously created, passing the `github.event.issue.body` as the `issue_body` parameter. Any other parameters required by the script such as OpenAI key and issue number should also be included as inputs of the action. The action will run Auto-GPT using the ai-settings.yaml file created by the script. The action will output a commit message describing any file changes that Auto-GPT has made, and a comment message advising if the execution was successful or not. Include python scripts, action.yml, README.md and save them to disk when done.
- Create a script that the action will use to create and check out a new branch. The branch name will begin with a prefix which defaults to "auto-gpt/" (but can be provided by an optional action input) and end with the issue number. The action may only commit changes on this new branch and it should use "git commit" with a descriptive message at each iteration.
- Provide an example GitHub workflow file ".github/workflows/auto-gpt.yml" that is triggered when issues are labeled and runs a job "Resolve Issue" but only if the label name is "auto-gpt". The example will provide the action with secrets.OPENAI_KEY, Open API model ID, issue number, issue description and path. Don't forget to save the file when done.
- Update the example ".github/workflows/auto-gpt.yml", adding a second step which updates the issue with comment message which is output from the "github-gpt" action.