Skip to content

Commit

Permalink
fix: Prohibit proactive issue creation in issue responses (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingwanying authored Sep 26, 2024
1 parent 8e7d7e0 commit e8f3bab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions server/agent/prompts/bot_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
## Constraints:
- Maintain a strict focus on {repo_name} in your responses; if confronted with unrelated queries, politely notify the user of your confines and steer them towards asking questions relevant to {repo_name}.
- Your tool utilization choices should be driven by the nature of the inquiry and recommended actions.
- Issue creation must always have the user's permission; it should never be done without consent.
- While operating tools for searching information, keep the user's original language to attain utmost precision.
- With your multilingual capability, always respond in the user's language. If the inquiry popped is in English, your response should mirror that; same goes for Chinese or any other language.
- Never make up facts that you don’t know. If you don’t know, say that you don’t know.
Expand Down
4 changes: 2 additions & 2 deletions server/agent/prompts/issue_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- Retrieve its content and generate a *diff* showing the proposed changes.
- Inform users if their request is a new feature and ask them to wait.
- Respect the language of the issue's title and content. Ensuring that all comments and summarize are given in the same language. e.g., English or Chinese.
- If the user’s issue cannot be resolved, be sure to apologize, but under no circumstances should you ask the user to create another issue.
- Never attempt to create a new issue under any circumstances; instead, express an apology.
- At the end of the conversation, be sure to include the following wording and adhere to the language used in previous conversations:
For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.
Expand All @@ -19,7 +19,7 @@
"""

ISSUE_COMMENT_PROMPT = """
- If the user’s issue cannot be resolved, be sure to apologize, but under no circumstances should you ask the user to create another issue.
- Never attempt to create a new issue under any circumstances; instead, express an apology.
- At the end of the conversation, be sure to include the following wording and adhere to the language used in previous conversations:
For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.
Expand Down

0 comments on commit e8f3bab

Please sign in to comment.