diff --git a/README.md b/README.md index 55d3d973..b5d1b849 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/action.yml b/action.yml index dae9ebfd..02931367 100644 --- a/action.yml +++ b/action.yml @@ -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' diff --git a/dist/index.js b/dist/index.js index e128a762..7f6a6a38 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6720,13 +6720,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 diff --git a/src/review.ts b/src/review.ts index dd3d8915..84cae15e 100644 --- a/src/review.ts +++ b/src/review.ts @@ -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