Skip to content
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

Unable to use Github Action anymore #274

Closed
DMC09 opened this issue Sep 4, 2023 · 6 comments
Closed

Unable to use Github Action anymore #274

DMC09 opened this issue Sep 4, 2023 · 6 comments

Comments

@DMC09
Copy link

DMC09 commented Sep 4, 2023

Last week the PR agent was working fine however this week I noticed it fails to run. When reading the logging it seems like it doesn't have access to the gpt-4 model. But I am also getting a rate limit error. Not sure what I need to do. I checked the Open AI console and it seems like I haven't used any of my 18$ worth of credit. I just used the .yml file in the docs.

I have attached the full logging error in a .txt file

PRagent_error.txt

@mrT23
Copy link
Collaborator

mrT23 commented Sep 4, 2023

are you able to access gpt-4 otherwise ?

for example via the playground:
https://platform.openai.com/playground?model=gpt-4

@DMC09
Copy link
Author

DMC09 commented Sep 4, 2023

Hello @mrT23 , Thanks for the response,

Unfortunately no, I get the same error

The model gpt-4 does not exist or you do not have access to it. Learn more: https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4.

I never set up which model to use because I just used the .yml file in the docs. Is there a way I can specific which model to use??

@okotek
Copy link
Contributor

okotek commented Sep 4, 2023

You can override the model by specifying it as an environment variable. If you're using GitHub Actions, you might want to add under the env: section -

CONFIG.MODEL: gpt-3.5-turbo

@mrT23
Copy link
Collaborator

mrT23 commented Sep 5, 2023

@DMC09
Copy link
Author

DMC09 commented Sep 6, 2023

Okay So I ended up Using this environment variable and the action runs successfully now. However it only acknowledges my comments. I haven't seen it respond yet.

here is my PR.

as you can see I tagged the CodiumAI-Agent and asked it to describe. It reacted with the eyes emoji but did not response. Do I need to add the permission in the .yml file?

on:
  pull_request:
  issue_comment:
jobs:
  pr_agent_job:
    runs-on: ubuntu-latest
    name: Run pr agent on every pull request, respond to user comments
    steps:
      - name: PR Agent action step
        id: pragent
        uses: Codium-ai/pr-agent@main
        env:
          OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CONFIG.MODEL: gpt-3.5-turbo

@coditamar
Copy link
Contributor

try adding the following before the jobs:

permissions:
  issues: write
  pull-requests: write

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants