Skip to content

Commit 138e90e

Browse files
committed
support github models
1 parent c267246 commit 138e90e

File tree

7 files changed

+83412
-83335
lines changed

7 files changed

+83412
-83335
lines changed

.github/workflows/cr.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ jobs:
1212
test:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: anc95/ChatGPT-CodeReview@main
15+
- uses: anc95/ChatGPT-CodeReview@chao
1616
env:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
1918
LANGUAGE: English
20-
OPENAI_API_ENDPOINT: https://api.bianxie.ai/v1
19+
USE_GITHUB_MODELS: true
2120
LOG_LEVEL: debug
2221
INCLUDE_PATTERNS: 'src/*'

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,29 @@ jobs:
5757
- uses: anc95/ChatGPT-CodeReview@main
5858
env:
5959
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
61+
# if use github models https://github.com/marketplace/models
62+
USE_GITHUB_MODELS: true
63+
MODEL: openai/gpt-4o
64+
65+
# else if use azure deployment
66+
AZURE_API_VERSION: xx
67+
AZURE_DEPLOYMENT: xx
68+
69+
# else use standard llm model
6070
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
61-
# Optional
62-
LANGUAGE: Chinese
6371
OPENAI_API_ENDPOINT: https://api.openai.com/v1
6472
MODEL: gpt-3.5-turbo # https://platform.openai.com/docs/models
73+
74+
# common
75+
LANGUAGE: Chinese
6576
PROMPT: # example: Please check if there are any confusions or irregularities in the following code diff:
6677
top_p: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p
6778
temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature
6879
max_tokens: 10000
6980
MAX_PATCH_LENGTH: 10000 # if the patch/diff length is large than MAX_PATCH_LENGTH, will be ignored and won't review. By default, with no MAX_PATCH_LENGTH set, there is also no limit for the patch/diff length.
7081
IGNORE_PATTERNS: /node_modules/**/*,*.md # glob pattern or regex pattern to ignore files, separated by comma
7182
INCLUDE_PATTERNS: *.js,*.ts # glob pattern or regex pattern to include files, separated by comma
72-
73-
# IF you are using azure openai
74-
AZURE_API_VERSION: xx
75-
AZURE_DEPLOYMENT: xx
7683
```
7784
7885
## Self-hosting

0 commit comments

Comments
 (0)