-
Notifications
You must be signed in to change notification settings - Fork 43k
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
(example) update hackathon workflow to include node.js setup #5986
Open
dOrgJelli
wants to merge
2
commits into
Significant-Gravitas:master
Choose a base branch
from
polywrap:example-node-setup
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+36
−1
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
run: | | ||
if [ "${{ github.event_name }}" == "schedule" ]; then | ||
echo "::set-output name=env-name::production" | ||
echo "::set-output name=matrix::[ 'gpt-engineer', 'smol-developer', 'Auto-GPT', 'mini-agi', 'beebot', 'BabyAGI', 'PolyGPT', 'Turbo' ]" | ||
echo "::set-output name=matrix::[ 'gpt-engineer', 'smol-developer', 'Auto-GPT', 'mini-agi', 'beebot', 'BabyAGI', 'evo-ninja', 'Turbo' ]" | ||
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
IFS=',' read -ra matrix_array <<< "${{ github.event.inputs.agents }}" | ||
matrix_string="[ \"$(echo "${matrix_array[@]}" | sed 's/ /", "/g')\" ]" | ||
|
@@ -85,3 +85,38 @@ jobs: | |
HELICONE_CACHE_ENABLED: false | ||
HELICONE_PROPERTY_AGENT: ${{ matrix.agent-name }} | ||
REPORT_LOCATION: ${{ format('../../reports/{0}', matrix.agent-name) }} | ||
|
||
# Support node.js-based agents. | ||
# NOTE: This is for example purposes, you will need to move this logic wherever you see fit | ||
|
||
- name: Read node version from .nvmrc (or use default v18.15) | ||
id: nvm | ||
run: echo NVMRC=$([[ -f .nvmrc ]] && cat .nvmrc || echo "v18.15") >> "$GITHUB_OUTPUT" | ||
working-directory: ${{ matrix.agent-name }} | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ steps.nvm.outputs.NVMRC }} | ||
|
||
# NOTE: this could be put within a generic `./install.sh` script | ||
# that the agents can create and check-in to their repos | ||
- name: Install node.js dependencies & build | ||
run: yarn && yarn build | ||
working-directory: ${{ matrix.agent-name }} | ||
|
||
# NOTE: this will go within the `./start` script for evo.ninja | ||
- name: Start the agent | ||
run: yarn start:api -c & | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
SERP_API_KEY: ${{ secrets.SERP_API_KEY }} | ||
# The env vars below are required right now for evo.ninja | ||
# but could easily be made optional (w/ defaults). would just | ||
# need to be able to push a new commit to our submission. Let me know please. | ||
GPT_MODEL: "gpt-4-0613" | ||
CONTEXT_WINDOW_TOKENS: 8000 | ||
MAX_RESPONSE_TOKENS: 2000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another option to get around this agent-specific CI setup is to have sub-workflows that agents could push to AutoGPT's repo. Could simply invoke them like so: Custom-Agent-Setup:
if: ...agent-has-custom-setup...
uses: ./.github/workflows/agent-setup/${{ matrix.agent-name }}.yaml I'm not sure if GitHub workflows allows for a conditional |
||
|
||
# After this step, evo.ninja will be running the agent-protocol at port 8000. | ||
# Simply run the benchmarks you would normally, nothing special past this point. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming here that each agent will be cloned at the root directory, and put under a
./${agent-name}
directory