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

better packing of requests #137

Merged
merged 2 commits into from
Apr 8, 2023
Merged

better packing of requests #137

merged 2 commits into from
Apr 8, 2023

Conversation

harjotgill
Copy link
Contributor

@harjotgill harjotgill commented Apr 8, 2023

Summary by OpenAI

Release Notes:

  • New Feature: OpenAI ChatGPT-based PR reviewer and summarizer with configurable inputs.
  • Bug fix: Error throw statement added in commenter.ts file if posting a review comment fails.
  • Refactor: Removed extra_content_tokens property from TokenLimits class and updated string() method accordingly.
  • Improvement: Better packing of requests by including file content and diff in the inputs if they are not too long.

"Code reviewed with ease,
OpenAI now lends its expertise.
Bugs fixed, features added,
Our codebase has been upgraded."

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2023

🤖 OpenAI

Thank you for letting me participate in the code review. I have reviewed the changes made in this pull request and provided a summary of the changes below.

The pull request adds an OpenAI ChatGPT-based PR reviewer and summarizer with configurable inputs. It also includes better packing of requests by including file content and diff in the inputs if they are not too long. The diff counts the occurrences of file contents cannot be provided and file diff cannot be provided in the prompt and limits the number of tokens to options.heavy_token_limits.request_tokens.

Here is a table of files and their summaries:

File Summary
action.yml Adds an OpenAI ChatGPT-based PR reviewer and summarizer with configurable inputs.
src/commenter.ts Adds an error throw statement in the commenter.ts file, which will be triggered if posting a review comment fails.
src/options.ts Removes the extra_content_tokens property from the TokenLimits class and updates the string() method accordingly.
src/review-comment.ts Includes file content and diff in the inputs if they are not too long. The diff counts the occurrences of file contents cannot be provided and file diff cannot be provided in the prompt and limits the number of tokens to options.heavy_token_limits.request_tokens.

Overall, these changes aim to improve the functionality and reliability of the codebase.


Chat with 🤖 OpenAI Bot (@openai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @openai in a reply.

Files ignored due to filter (1)

Ignored files

  • dist/index.js
Files not summarized due to errors (1)

Failed to summarize

  • src/review.ts (diff tokens exceeds limit)

@harjotgill harjotgill merged commit ebbd42e into main Apr 8, 2023
@harjotgill harjotgill deleted the packing branch April 8, 2023 02:57
shoyuf pushed a commit to maybeLab/openai-mr-reviewer-gltlab that referenced this pull request Jun 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant