Skip to content

Commit

Permalink
added ci chatgpt (#37)
Browse files Browse the repository at this point in the history
* added ci chatgpt

* add credentials

* add credentials

* add credentials

* usinfg secreat

* try again

* basic

* basic

* basic

* using chatGPT-4

* ·bacj to 3.5

* ·bacj to 3.5

* add prompt

* add prompt

* alter temperature

* better prompt

* better prompt

* better prompt

* better prompt

* better prompt

* better prompt

* better prompt

* using gpt-4

* using gpt-4 (#66)

* using latest version

* remove Optional comment

* removed comment

* renaming
  • Loading branch information
asiniscalchi authored Oct 13, 2023
1 parent 3aa95ea commit 1211760
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/chatgpt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ChatGPT

on:
pull_request:
types: [opened, synchronize]

jobs:
review:
runs-on: ubuntu-latest
name: Review
steps:
- 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

0 comments on commit 1211760

Please sign in to comment.