Skip to content

Commit

Permalink
Change chatgpt github action
Browse files Browse the repository at this point in the history
  • Loading branch information
ccubu committed Oct 24, 2023
1 parent 21f7431 commit c117bd3
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/chatgpt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ jobs:

- name: Run if Draft
if: steps.check.outputs.is_draft == 'true'
uses: anc95/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_ENDPOINT: https://api.openai.com/v1
MODEL: gpt-4
PROMPT: "Please highlight only the most important logical errors, or areas for improvement of the Pull Request. If the Pull Request adheres to all guidelines and best practices, simply respond with 'No suggestions, the PR is good.'"
top_p: 1 # Determines the portion of the probability mass to sample from - https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p
temperature: 0.2 # Controls randomness of the output - https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature
max_tokens: 2000
MAX_PATCH_LENGTH: 5000 # Ignored and won't review if the patch/diff length is larger than this value
uses: cirolini/[email protected]
with:
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_pr_id: ${{ github.event.number }}
openai_engine: "text-davinci-002" #optional
openai_temperature: 0.5 #optional
openai_max_tokens: 2048 #optional
mode: patch # file or patch

0 comments on commit c117bd3

Please sign in to comment.