Skip to content

Commit

Permalink
Merge pull request #208 from amosproj/feature/137-create-test-data-wi…
Browse files Browse the repository at this point in the history
…th-api

Feature/137 create test data with api
  • Loading branch information
Gnagniko authored Jan 23, 2024
2 parents f7d149f + 59c0e38 commit e91817a
Show file tree
Hide file tree
Showing 8 changed files with 468,113 additions and 49,865 deletions.

Large diffs are not rendered by default.

74,909 changes: 74,909 additions & 0 deletions Backend/app/model/test_data/test_data_with_gpt/data_4.json

Large diffs are not rendered by default.

74,823 changes: 74,823 additions & 0 deletions Backend/app/model/test_data/test_data_with_gpt/data_5.json

Large diffs are not rendered by default.

41,462 changes: 41,462 additions & 0 deletions Backend/app/model/test_data/test_data_with_gpt/data_6.json

Large diffs are not rendered by default.

84,427 changes: 84,427 additions & 0 deletions Backend/app/model/test_data/test_data_with_gpt/data_7.json

Large diffs are not rendered by default.

57,404 changes: 57,404 additions & 0 deletions Backend/app/model/test_data/test_data_with_gpt/data_8.json

Large diffs are not rendered by default.

86,654 changes: 86,654 additions & 0 deletions Backend/app/model/test_data/test_data_with_gpt/data_9.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions Backend/app/model/util/create_data_with_gpt.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from openai import OpenAI
import json

client = OpenAI(
api_key="APIKEY",
)
client = OpenAI(api_key="<APIKEY>")

for _ in range(1):
with open("../test_data/test_data_with_gpt/data_2.json", "r") as file:
with open("../test_data/test_data_with_gpt/data_9.json", "r") as file:
tickets = json.load(file)

for _ in range(100):
Expand All @@ -31,12 +29,13 @@
"requestType": ""
}
The 'text' should contain a detailed problem description of inquiry to technical customer support and should be listed as lines in an array.
The 'text' be randomly between 3 to 10 lines
The 'text' should contain a detailed problem description with implicit information about the problem .
The 'text' should be randomly between 5 to 10 lines
Furthermore, under 'ticket', there should be a support ticket matching the email with the following attributes.
The 'service' attribute classifies the service of the ticket with the values 'SAP ERP', 'Atlassian', 'Adobe', 'Salesforce', 'Reporting', 'Microsoft Power Platform', 'Microsoft SharePoint', 'Snowflake', 'Microsoft Office'.
The 'category' attribute classifies the problem dependent from service. Please extract the values from following. Before ':' states the service and after ':' are the coresponding values. '"SAP ERP: 4HANA -> Technical Issues, 4HANA -> Billing & Payment, 4HANA -> Product Inquiries, 4HANA -> Account Management, 4HANA -> Policy Questions"
"SAP ERP: HANA -> Technical Issues, HANA -> Billing & Payment, HANA -> Product Inquiries, HANA -> Account Management, HANA -> Policy Questions"
"SAP ERP: Business One -> Technical Issues, Business One -> Billing & Payment, Business One -> Product Inquiries, Business One -> Account Management, Business One -> Policy Questions"
"Atlassian: Jira -> Technical Issues, Jira -> Billing & Payment, Jira -> Product Inquiries, Jira -> Account Management, Jira -> Policy Questions"
"Atlassian: Sourcetree -> Technical Issues, Sourcetree -> Billing & Payment, Sourcetree -> Product Inquiries, Sourcetree -> Account Management, Sourcetree -> Policy Questions"
Expand All @@ -52,23 +51,24 @@
"Microsoft Power Platform: Microsoft Power Apps -> Technical Issues, Microsoft Power App -> Billing & Payment, Microsoft Power App -> Product Inquiries, Microsoft Power App -> Account Management, Microsoft Power App -> Policy Questions"
"Microsoft Power Platform: Microsoft Power BI -> Technical Issues, Microsoft Power BI -> Billing & Payment, Microsoft Power BI -> Product Inquiries, Microsoft Power BI -> Account Management, Microsoft Power BI -> Policy Questions"
"Microsoft SharePoint: Microsoft SharePoint -> Technical Issues, Microsoft SharePoint -> Billing & Payment, Microsoft SharePoint -> Product Inquiries, Microsoft SharePoint -> Account Management, Microsoft SharePoint -> Policy Questions"
"Microsoft SharePoint: SharePoint -> Technical Issues, SharePoint -> Billing & Payment, SharePoint -> Product Inquiries, SharePoint -> Account Management, SharePoint -> Policy Questions"
"Microsoft Power Platform: Microsoft SharePoint -> Technical Issues, Microsoft SharePoint -> Billing & Payment, Microsoft SharePoint -> Product Inquiries, Microsoft SharePoint -> Account Management, Microsoft SharePoint -> Policy Questions"
"Microsoft Power Platform: SharePoint -> Technical Issues, SharePoint -> Billing & Payment, SharePoint -> Product Inquiries, SharePoint -> Account Management, SharePoint -> Policy Questions"
"Snowflake: Snowflake -> Technical Issues, Snowflake -> Billing & Payment, Snowflake -> Product Inquiries, Snowflake -> Account Management, Snowflake -> Policy Questions"
"Snowflake: SnowSQL -> Technical Issues, SnowSQL -> Billing & Payment, SnowSQL -> Product Inquiries, SnowSQL -> Account Management, SnowSQL -> Policy Questions"
"Microsoft Office: Microsoft Office -> Technical Issues, Microsoft Office -> Billing & Payment, Microsoft Office -> Product Inquiries, Microsoft Office -> Account Management, Microsoft Office -> Policy Questions"
"Microsoft Office: Microsoft Word -> Technical Issues, Microsoft Word -> Billing & Payment, Microsoft Word -> Product Inquiries, Microsoft Word -> Account Management, Microsoft Word -> Policy Questions" '
"Microsoft Office: Microsoft Word -> Technical Issues, Microsoft Word -> Billing & Payment, Microsoft Word -> Product Inquiries, Microsoft Word -> Account Management, Microsoft Word -> Policy Questions"
one category values is f.e SnowSQL -> Billing & Payment.
The 'customerPriority' attribute describes the impact of the problem on the customer and can take the values "Disruption but can work," "Disruption cannot work," "Disruption several cannot work," and "Disruption department cannot work."
The 'customerPriority' attribute describes the impact of the problem on the customer and can take the values "Disruption but can work" "Disruption cannot work" "Disruption several cannot work" and "Disruption department cannot work".
The 'priority' attribute classifies the relevance of the ticket with the values 'Low', 'Medium', 'High' and 'Very High'
The 'requestType' attribute classifies the type of ticket with the values "Incident" or 'Service Request'. Incident describes a ticket if the user has a problem or similar, and Service Request describes a ticket with which the user orders a service.
Please create 10 tickets in the specified JSON format. The ticket should be versitiled.
Please create 10 tickets in the specified JSON format. The ticket should be really versatile.
Your output should only contain the JSON format.
""",
},
Expand All @@ -87,5 +87,5 @@
except Exception as e:
print(f"An error occurred: {e}")

with open("../test_data/test_data_with_gpt/data_1.json", "w") as file:
with open("../test_data/test_data_with_gpt/data_9.json", "w") as file:
json.dump(tickets, file, indent=4)

0 comments on commit e91817a

Please sign in to comment.