Skip to content

A GitHub Action that uses runs Auto-GPT to follow instructions in the issue description

License

Notifications You must be signed in to change notification settings

nalbion/auto-gpt-action

Repository files navigation

Auto-GPT GitHub Action

This Github Action uses Auto-GPT to follow instructions in the issue description.

As per the example below, your workflow should be configured to only run the job containing this action under certain conditions, such as when a new label "auto-gpt" is added to an issue.

Inputs

openai_key

Required The OpenAI API key.

issue_body

Required The body of the issue.

issue_number

Required The number of the issue.

Usage

To use the auto-gpt.yml workflow file, follow these steps:

  1. Add the OPENAI_KEY secrets to your repository.
  2. Add the following code to your .github/workflows/auto-gpt.yml file as below.
  3. Create a new issue and label it with the auto-gpt label.

There is an example of how to use this action in .github/workflows/auto-gpt.yml.

Auto-GPT env variables such as FAST_TOKEN_LIMIT, MEMORY_BACKEND etc should be able to be defined in your workflow yaml.

name: Auto-GPT

on:
  issues:
    types: [labeled]

jobs:
  resolve-issue:
    if: "contains(github.event.label.name, 'auto-gpt')"
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Run Auto-GPT
      uses: nalbion/auto-gpt-action@master
      with:
        openai_key: ${{ secrets.OPENAI_KEY }}
        issue_number: ${{ github.event.issue.number }}
        issue_body: ${{ github.event.issue.body }}

Notes from the human

This project was my first exposure to Auto-GPT, the idea was that it would be neat if Auto-GPT could automatically implement new features and/or fix bugs, just by tagging the issue with auto-gpt.

Inspiration for parts of the solution was drawn from the gpt-developer action.

All of the code in this repository was generated by Auto-GPT based off the prompts in ai_settings.yaml. Auto-GPT was not run in continuous mode, infact there was a very lengthy discussion guiding Auto-GPT through the whole process.

| No, you will not (do something I had to tell it not to do several times), your next step will be ...

Getting started with Auto-GPT

  • your OpenAI API key

  • To use OpenAI API key for Auto-GPT, you NEED to have a paid account.

  • Important: It's highly recommended that you track your usage on the Usage page You can also set limits on how much you spend on the Usage limits page.

  • Edit Auto-GPT/.env (and add it to your .gitignore file!!):

OPENAI_API_KEY=your-openai-api-key
EXECUTE_LOCAL_COMMANDS=True
docker pull significantgravitas/auto-gpt:0.2.2 
copy ai_settings.yaml %USERPROFILE%\auto_gpt_workspace
copy auto-gpt.json %USERPROFILE%\auto_gpt_workspace
docker run -it --env-file=./Auto-GPT/.env -v "%USERPROFILE%/auto_gpt_workspace:/home/appuser/auto_gpt_workspace" significantgravitas/auto-gpt:0.2.2 --ai-settings auto_gpt_workspace/ai_settings.yaml

See Also

About

A GitHub Action that uses runs Auto-GPT to follow instructions in the issue description

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published