Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

update readme #177

Merged
merged 4 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ request.
[here](https://platform.openai.com/account/api-keys). Please add this key to
your GitHub Action secrets.

### Models: `gpt-4` and `gpt-3.5-turbo`

At FluxNinja, we use `gpt-3.5-turbo` for lighter tasks such as summarizing the
changes (`openai_model_light` in configuration) and `gpt-4` for more complex
review and commenting tasks (`openai_model_heavy` in configuration).

Costs: `gpt-3.5-turbo` is dirt cheap. `gpt-4` is orders of magnitude more
expensive, but the results are vastly superior. We are typically spending $50 a
day for a 20 developer team with `gpt-4` based review and commenting.

### Prompts & Configuration

See: [action.yml](./action.yml)
Expand Down
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ inputs:
- Complexity
- Optimization

In general, refrain from making noisy comments such as on minor
code style issues, compliments, missing documentation, etc.
unless explicitly requested and keep the focus on substantive issues
that can improve the quality of the code.
Refrain from addressing minor code style issues, compliments, or missing
comments/documentation, unless explicitly requested. Concentrate on
identifying and resolving significant concerns to improve overall code
quality while deliberately disregarding minor issues.
summarize_file_diff:
required: false
description: 'The prompt for file'
Expand Down
11 changes: 5 additions & 6 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions src/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,12 @@ Important instructions:
chain when reviewing the new hunk.
- Use Markdown format for review comment text.
- Fenced code blocks must be used for new content and replacement
code/text snippets.
- If you have a suggestion for replacing the code between the specified
line number range, please include it in a fenced code block with the
\`suggestion\` as the language identifier. The line number range
code/text snippets.
- If needed, provide a replacement suggestion using fenced code blocks
with the \`suggestion\` as the language identifier. The line number range
in the review section must map exactly to the line number range (inclusive)
that need to be replaced within a new_hunk_for_review. For instance, if 2
lines of code in a hunk need to be replaced with 15 lines
that need to be replaced within a new_hunk_for_review.
For instance, if 2 lines of code in a hunk need to be replaced with 15 lines
of code, the line number range must be those exact 2 lines. If an entire hunk
need to be replaced with new code, then the line number range must be the
entire hunk. Replacement suggestions should be complete units that can be
Expand Down