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

Customizable prompt? #34

Open
tgnemecek opened this issue Mar 3, 2023 · 1 comment
Open

Customizable prompt? #34

tgnemecek opened this issue Mar 3, 2023 · 1 comment

Comments

@tgnemecek
Copy link

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.

@anc95
Copy link
Owner

anc95 commented Mar 4, 2023

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.

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