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

Needs smaller context #28

Open
cgill-21076 opened this issue Jul 12, 2023 · 2 comments
Open

Needs smaller context #28

cgill-21076 opened this issue Jul 12, 2023 · 2 comments

Comments

@cgill-21076
Copy link

While I like the idea of this tool, it has proven to not be very practical for larger projects due to the 4096 character limitation of the OpenAI API. It would be awesome if only the diffs were sent instead of entire files. I realize this will reduce the effectiveness of reviews. However, it would make it useful for applications that have larger files. Perhaps this could be a flag?

@johnlk
Copy link
Contributor

johnlk commented Jul 14, 2023

@cgill-21076 thanks for the issue. Upon reviewing the code, it seems the full file is passed if the files_to_ignore param is not set, else it passes along git diffs file by file.

A quick and dirty fix would be to set the files_to_ignore param to "README.md".

Another option would be to use the long context model which accepts up to 16k tokens. gpt_model_name: "gpt-3.5-turbo-16k".

I'll have to think more about a flag, because I would have to refactor the case where a full file flag is on and files_to_ignore is also set 🤔

Let me know if you have other thoughts 😄

@cgill-21076
Copy link
Author

@johnlk thank you for the suggestions!

So I tried setting the files_to_ignore parameter, and it still sent the entire file contents and not just the diff. It did, as expected, not send README.md, but sent everything else.

I also tried using the 16k context model and that does give a little more room to work, but is still not real practical for projects of any consequence.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants