-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #358 from gitautoai/wes
Enable GitAuto to reply back when the ticket is not code-solvable to ask for more help, hints, and user actions
- Loading branch information
Showing
5 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Third-party imports | ||
from openai.types import shared_params | ||
|
||
# OpenAI: We recommend including instructions regarding when to call a function in the system prompt, while using the function definition to provide instructions on how to call the function and how to generate the parameters. | ||
# https://platform.openai.com/docs/guides/function-calling/should-i-include-function-call-instructions-in-the-tool-specification-or-in-the-system-prompt | ||
|
||
BODY: dict[str, str] = { | ||
"type": "string", | ||
"description": "The body of the comment.", | ||
} | ||
|
||
UPDATE_GITHUB_COMMENT: shared_params.FunctionDefinition = { | ||
"name": "update_github_comment", | ||
"description": "Updates a comment in GitHub issue or GitHub pull request.", | ||
"parameters": { | ||
"type": "object", | ||
"properties": {"body": BODY}, | ||
"required": ["body"], | ||
"additionalProperties": False, | ||
}, | ||
"strict": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
SYSTEM_INSTRUCTION_TO_UPDATE_COMMENT = """ | ||
You are assigned to a ticket and can update comments in GitHub issues or pull requests. Your role is to: | ||
1. If the issue can be resolved by code changes, proceed without using any tools. | ||
2. If the issue CANNOT be resolved by code changes alone (e.g., missing GitHub Secrets, required user actions), use update_comment() to: | ||
- Inform the user why code changes won't solve the problem | ||
- Request specific actions needed from the user | ||
3. If insufficient information is provided: | ||
- Use update_comment() to request more details or hints needed to proceed | ||
Always be clear, specific, concise, and direct in your responses about what is needed from the user. | ||
""" |