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

Code review with LLM models #18

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
} >> $GITHUB_OUTPUT
- uses: ./
name: "Code Review"
id: review
id: review1
with:
apiKey: ${{ secrets.API_KEY }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -62,3 +62,39 @@ jobs:
${{ steps.get_diff.outputs.pull_request_diff }}
pullRequestChunkSize: "3500"
logLevel: "DEBUG"
- uses: ./
name: "Code Review"
id: review2
with:
apiKey: ${{ secrets.API_KEY }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
githubRepository: ${{ github.repository }}
githubPullRequestNumber: ${{ github.event.pull_request.number }}
gitCommitHash: ${{ github.event.pull_request.head.sha }}
repoId: "meta-llama/Llama-2-13b-chat-hf"
temperature: "0.2"
maxNewTokens: "250"
topK: "50"
topP: "0.95"
pullRequestDiff: |-
${{ steps.get_diff.outputs.pull_request_diff }}
pullRequestChunkSize: "3500"
logLevel: "DEBUG"
- uses: ./
name: "Code Review"
id: review3
with:
apiKey: ${{ secrets.API_KEY }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
githubRepository: ${{ github.repository }}
githubPullRequestNumber: ${{ github.event.pull_request.number }}
gitCommitHash: ${{ github.event.pull_request.head.sha }}
repoId: "codellama/CodeLlama-13b-hf"
temperature: "0.2"
maxNewTokens: "250"
topK: "50"
topP: "0.95"
pullRequestDiff: |-
${{ steps.get_diff.outputs.pull_request_diff }}
pullRequestChunkSize: "3500"
logLevel: "DEBUG"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
githubRepository: ${{ github.repository }}
githubPullRequestNumber: ${{ github.event.pull_request.number }}
gitCommitHash: ${{ github.event.pull_request.head.sha }}
repoId: "meta-llama/Llama-2-7b-chat-hf"
repoId: "codellama/CodeLlama-7b-hf"
temperature: "0.2"
maxNewTokens: "250"
topK: "50"
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ inputs:
repoId:
description: "LLM model"
required: true
default: "meta-llama/Llama-2-7b-chat-hf"
default: "codellama/CodeLlama-7b-hf"
maxNewTokens:
description: "The amount of new tokens to be generated, this does not include the input length it is a estimate of the size of generated text you want. Each new tokens slows down the request, so look for balance between response times and length of text generated."
required: false
Expand Down