-
Notifications
You must be signed in to change notification settings - Fork 101
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
Draft PR for exception GPT analyze #537
base: main
Are you sure you want to change the base?
Conversation
|
||
import java.util.Arrays; | ||
|
||
public class GptSuggestionService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 请用UT来示例使用方法
- 请增加模板文件来存放prompt
" 3. Propose potential solution to fix this exception.\n"; | ||
|
||
String ExceptionAnalyze(String exceptionStr, String logPath) { | ||
client = new AzureOpenAIServiceClient( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不应该在方法中实例化这个类
" 1. Give me a summary about this exception.\n" + | ||
" 2. Assume root cause of this exception.\n" + | ||
" 3. Propose potential solution to fix this exception.\n"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上面的prompt是最终版的么?看起来也是过于简单。可以参考 https://www.bilibili.com/video/BV1jm4y1y7rA 学习prompt技巧
String logContent = ""; | ||
ChatRequest req = new ChatRequest(); | ||
req.setMessages(Arrays.asList( | ||
new ChatMessage("system", exceptionAnalyzePrompt), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么prompt通过system身份传入?
Draft PR for exception GPT analyze
Linked GitHub issue ID: #
Pull Request Checklist
Does this introduce a breaking change?
If this introduces a breaking change for Hydra Lab users, please describe the impact and migration path.
How you tested it
Please make sure the change is tested, you can test it by adding UTs, do local test and share the screenshots, etc.
Please check the type of change your PR introduces:
Feature UI screenshots or Technical design diagrams
If this is a relatively large or complex change, kick it off by drawing the tech design with PlantUML and explaining why you chose the solution you did and what alternatives you considered, etc...