ChatGPT-CodeReview icon indicating copy to clipboard operation
ChatGPT-CodeReview copied to clipboard

Customizable prompt?

Open tgnemecek opened this issue 2 years ago • 1 comments

Hey there! Great project, it seems to work as intended and the CRs are very useful. For our use case, and I imagine for many others as well, it would be beneficial to be able to customize the prompt. The easiest solution would be to expose it as an env var, e.g.: OPEN_API_PROMPT or similar. Thoughts? Let me know if you want me to make a PR.

tgnemecek avatar Mar 03 '23 20:03 tgnemecek

Thanks, @tgnemecek, I am planning to add some customizable functions too. for example custom prompt, custom model, and multiple language support, It's good for us to start this from a customizable prompt. it's a good approach to set it as env var. as it can support both self-hosted as a webhook and use via a GitHub action.

we can have two vars to implement this

  1. PROMPT_PREFIX= 'hi, bellow is a code diff: '
  2. PROMPT_SUFFIX='could you help to do a code review to the above code diff'

the final prompt will be

${PROMPT_PREFIX}
${code_diff}
${PROMPT_SUFFIX}

Thank you and I will be appreciated your contribution to this.

anc95 avatar Mar 04 '23 03:03 anc95