Hacker News new | ask | show | jobs
by jcon321 1199 days ago
How does this generally work? I've played with openai's API and I can send it questions and get answers. Is this app just parsing new additions to commits and passing in the whole code block as a prompt, with an additional line saying "please review this code"?

Additionally, how is this app able to handle so many potential requests to openai? Are they already paying for a bunch of tokens in anticipation? Or do you pay for how many tokens used per month? (The openai pricing is a little confusing since there's so much you can do.)

Thanks for any insight

2 comments

The goal is to provide more context to the model and use the changes with the title and description of the PR to get a review, while asking for improvements and suggestions.
I'd imagine you'd use a specific sequence of prompts to interrogate the code according to a predefined script?
This is harder than it seems. The way we are doing with Robin (Reviewpad's AI Reviewer) is by feeding it context about the PR and results from our static analysers and allowing the developer to prompt directly through the PR comment. For example, https://github.com/marcelosousa/robin-preview/pull/2