-
Notifications
You must be signed in to change notification settings - Fork 113
Enhancing Report Generation by Adding Story-teller Ai based on Ai flag #2816
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
Conversation
修改了原来的checkAiAssistantEnabled();
ec3c6c4 to
c74cb25
Compare
c74cb25 to
7c5ba24
Compare
043432c to
0aaeca4
Compare
bobbai00
left a comment
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.
left some comments.
core/amber/src/main/scala/edu/uci/ics/texera/web/resource/aiassistant/AiAssistantResource.scala
Outdated
Show resolved
Hide resolved
core/amber/src/main/scala/edu/uci/ics/texera/web/resource/aiassistant/AiAssistantResource.scala
Outdated
Show resolved
Hide resolved
core/gui/src/app/workspace/service/report-generation/report-generation.service.ts
Outdated
Show resolved
Hide resolved
core/gui/src/app/workspace/service/report-generation/report-generation.service.ts
Outdated
Show resolved
Hide resolved
core/gui/src/app/workspace/service/report-generation/report-generation.service.ts
Outdated
Show resolved
Hide resolved
core/gui/src/app/workspace/service/report-generation/report-generation.service.ts
Outdated
Show resolved
Hide resolved
e0c5d2e to
b1d8bb9
Compare
56375bc to
03869fd
Compare
make it general
c9ff813 to
1aa0a06
Compare
2be1389 to
2a44a78
Compare
bobbai00
left a comment
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.
Left two comments.
core/amber/src/main/scala/edu/uci/ics/texera/web/resource/aiassistant/AiAssistantResource.scala
Show resolved
Hide resolved
core/amber/src/main/scala/edu/uci/ics/texera/web/resource/aiassistant/AiAssistantResource.scala
Outdated
Show resolved
Hide resolved
119f5c0 to
4225e9e
Compare
d999ca6 to
8748018
Compare
bobbai00
left a comment
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.
Add another batch of comments
core/gui/src/app/workspace/service/ai-analyst/ai-analyst.service.ts
Outdated
Show resolved
Hide resolved
core/gui/src/app/workspace/service/ai-analyst/ai-analyst.service.ts
Outdated
Show resolved
Hide resolved
core/amber/src/main/scala/edu/uci/ics/texera/web/resource/aiassistant/AiAssistantResource.scala
Outdated
Show resolved
Hide resolved
core/amber/src/main/scala/edu/uci/ics/texera/web/resource/aiassistant/AiAssistantResource.scala
Outdated
Show resolved
Hide resolved
core/gui/src/app/workspace/service/ai-analyst/ai-analyst.service.ts
Outdated
Show resolved
Hide resolved
core/gui/src/app/workspace/service/ai-analyst/ai-analyst.service.ts
Outdated
Show resolved
Hide resolved
core/gui/src/app/workspace/service/ai-analyst/ai-analyst.service.ts
Outdated
Show resolved
Hide resolved
7ae6bf3 to
3c3323c
Compare
bobbai00
left a comment
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.
Left one comment
bobbai00
left a comment
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.
Left one minor comment. LGTM!
bb18e2d to
38284f3
Compare
bd8bf09 to
6e08d4a
Compare
chenlica
left a comment
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.
Jiadong and I met and discussed the details of the PR. It looks good to me.
f55bc18 to
8704a2e
Compare
0d5727e to
d90365d
Compare
#2816) This PR enhances the report generation functionality by addingStory-teller Ai based on Ai flag. This PR is a continuation and enhancement of the previous PR: Adding a button to generate a report for a workflow: #2770 Enhancing Report Generation by adding Operator Results: #2792 Enhancing Report Generation by Adding Operator Json and Comments Section : #2807 Ai Flag: #2818 and #2808 **New Methods:** checkAiAssistantEnabled(): Validates whether the AI Assistant feature is enabled by checking the availability of the required API key. This function ensures that subsequent AI-based functionalities are executed only when the AI Assistant is available. generateComment(operatorInfo: any): Generates insightful comments for each operator using OpenAI’s GPT model, tailored for a highly educated audience but one that might not have deep statistical knowledge. The comments are plain text, enhancing the overall readability and value of the report. generateSummaryComment(operatorInfo: any): Produces a concise, insightful summary comment that highlights key findings, trends, and areas of improvement across the workflow, focusing particularly on UDFs. This function is crucial for providing a comprehensive understanding of the workflow to users. **Enhanced Methods:** retrieveOperatorInfoReport(operatorId: string, allResults: { operatorId: string; html: string }[]): Implements the checkAiAssistantEnabled, generateComment, and generateSummaryComment functions to enrich the operator information section in the generated reports. The function now adds a "Toggle Detail" button beneath each operator, allowing users to expand and view the operator’s corresponding JSON, formatted using a JSON viewer. Additionally, a comments section is added below each operator, enabling users to leave or view AI-generated comments. generateReportAsHtml(workflowSnapshot: string, allResults: string[], workflowName: string): Generates a comprehensive HTML file containing the workflow snapshot, all operator results, operator details, and comments. This method integrates AI-generated comments and a summary section at the end of the report. It also introduces a "Download Workflow JSON" button, allowing users to download the entire workflow JSON file directly from the report. **Operation Process:** Click the button below to generate the report with detailed operator results and the workflow snapshot.  To turn on the ai feature, you need to modify the following sections in application.udf  For example, to turn on the openai:  Here is a part of the example report.  
This PR enhances the report generation functionality by addingStory-teller Ai based on Ai flag. This PR is a continuation and enhancement of the previous PR:
Adding a button to generate a report for a workflow: #2770
Enhancing Report Generation by adding Operator Results: #2792
Enhancing Report Generation by Adding Operator Json and Comments Section : #2807
Ai Flag: #2818 and #2808
New Methods:
checkAiAssistantEnabled():
Validates whether the AI Assistant feature is enabled by checking the availability of the required API key. This function ensures that subsequent AI-based functionalities are executed only when the AI Assistant is available.
generateComment(operatorInfo: any):
Generates insightful comments for each operator using OpenAI’s GPT model, tailored for a highly educated audience but one that might not have deep statistical knowledge. The comments are plain text, enhancing the overall readability and value of the report.
generateSummaryComment(operatorInfo: any):
Produces a concise, insightful summary comment that highlights key findings, trends, and areas of improvement across the workflow, focusing particularly on UDFs. This function is crucial for providing a comprehensive understanding of the workflow to users.
Enhanced Methods:
retrieveOperatorInfoReport(operatorId: string, allResults: { operatorId: string; html: string }[]):
Implements the checkAiAssistantEnabled, generateComment, and generateSummaryComment functions to enrich the operator information section in the generated reports. The function now adds a "Toggle Detail" button beneath each operator, allowing users to expand and view the operator’s corresponding JSON, formatted using a JSON viewer. Additionally, a comments section is added below each operator, enabling users to leave or view AI-generated comments.
generateReportAsHtml(workflowSnapshot: string, allResults: string[], workflowName: string):
Generates a comprehensive HTML file containing the workflow snapshot, all operator results, operator details, and comments. This method integrates AI-generated comments and a summary section at the end of the report. It also introduces a "Download Workflow JSON" button, allowing users to download the entire workflow JSON file directly from the report.
Operation Process:

Click the button below to generate the report with detailed operator results and the workflow snapshot.
To turn on the ai feature, you need to modify the following sections in application.udf

For example, to turn on the openai:

Here is a part of the example report.

