AIEmailAutomationUtility 0.0.13__py3-none-any.whl → 0.0.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- AIEmailAutomationUtility/EmailReplyAssistant.py +2 -2
- AIEmailAutomationUtility/Email_Classification.py +2 -2
- AIEmailAutomationUtility/Email_Read.py +3 -3
- {AIEmailAutomationUtility-0.0.13.dist-info → AIEmailAutomationUtility-0.0.14.dist-info}/METADATA +1 -1
- {AIEmailAutomationUtility-0.0.13.dist-info → AIEmailAutomationUtility-0.0.14.dist-info}/RECORD +8 -8
- {AIEmailAutomationUtility-0.0.13.dist-info → AIEmailAutomationUtility-0.0.14.dist-info}/LICENCE.txt +0 -0
- {AIEmailAutomationUtility-0.0.13.dist-info → AIEmailAutomationUtility-0.0.14.dist-info}/WHEEL +0 -0
- {AIEmailAutomationUtility-0.0.13.dist-info → AIEmailAutomationUtility-0.0.14.dist-info}/top_level.txt +0 -0
@@ -59,8 +59,8 @@ class EmailReplyAssistant:
|
|
59
59
|
|
60
60
|
delta_values = event_handler.delta_values
|
61
61
|
openAI_response = ''.join(delta_values)
|
62
|
-
|
63
|
-
|
62
|
+
logger.log(f"openAI_response:: {type(openAI_response)}")
|
63
|
+
logger.log(f"openAI_response:: {openAI_response}")
|
64
64
|
return {"status": "Success", "message": openAI_response}
|
65
65
|
|
66
66
|
except Exception as error:
|
@@ -7,7 +7,7 @@ from flask import Flask,request
|
|
7
7
|
|
8
8
|
class Email_Classification:
|
9
9
|
def detect_category_openai(self, openai_api_key, categories, email_body):
|
10
|
-
|
10
|
+
logger.log("Inside detect_category_openai::")
|
11
11
|
try:
|
12
12
|
categories_str = ', '.join(categories)
|
13
13
|
message = [{
|
@@ -15,7 +15,7 @@ class Email_Classification:
|
|
15
15
|
"content": f"Classify the mail into one of the following categories: {categories_str} and Others. Based on the email content: {email_body}, provide ONLY the category in JSON format as {{\"category\": \"category\"}}."
|
16
16
|
}]
|
17
17
|
|
18
|
-
|
18
|
+
logger.log(f"Final GPT message for detecting category::: {message}")
|
19
19
|
client = OpenAI(api_key=openai_api_key)
|
20
20
|
result = client.chat.completions.create(
|
21
21
|
model="gpt-4o-mini",
|
@@ -183,7 +183,7 @@ class Email_Read:
|
|
183
183
|
emailreplyassistant = EmailReplyAssistant()
|
184
184
|
openai_Response = emailreplyassistant.Reply_Email_Ai_Assistant(openai_api_key, parameters["Assistant_Id"], openai_Process_Input, subject)
|
185
185
|
|
186
|
-
|
186
|
+
logger.log(f"Process openai_Response ::: {openai_Response['message']}\n")
|
187
187
|
email_details = {"sender":sender_email_addr, "cc":cc_email_addr, "subject":subject, "body": email_body}
|
188
188
|
|
189
189
|
email_draft = Email_Draft()
|
@@ -217,8 +217,8 @@ class Email_Read:
|
|
217
217
|
|
218
218
|
elif emailCategory == "Purchase Order":
|
219
219
|
responseMethod, parameters = self.get_JsonArray_values(emailCategory, file_JsonArray)
|
220
|
-
|
221
|
-
|
220
|
+
logger.log(f"responseMethod ::: {responseMethod}")
|
221
|
+
logger.log(f"parameters ::: {parameters}")
|
222
222
|
if responseMethod == "Upload_Document" :
|
223
223
|
|
224
224
|
if len(fileName) != 0 :
|
{AIEmailAutomationUtility-0.0.13.dist-info → AIEmailAutomationUtility-0.0.14.dist-info}/RECORD
RENAMED
@@ -1,14 +1,14 @@
|
|
1
|
-
AIEmailAutomationUtility/EmailReplyAssistant.py,sha256=
|
2
|
-
AIEmailAutomationUtility/Email_Classification.py,sha256=
|
1
|
+
AIEmailAutomationUtility/EmailReplyAssistant.py,sha256=9KYIBrgFND3NxRjlbKsaxsoCiMQMvD8WY--x73bQU04,3898
|
2
|
+
AIEmailAutomationUtility/Email_Classification.py,sha256=usZS8TeoX-bu6A6u7cWePVAxWGxuVK8etNPAwlOoruI,9243
|
3
3
|
AIEmailAutomationUtility/Email_DocumentUploader.py,sha256=zXF6PNkRjkgbe3daxbZ_XS8M1KpKKNWcmWzu-BUhxJM,3025
|
4
4
|
AIEmailAutomationUtility/Email_Draft.py,sha256=RJSoZ4tyjypjOU415YcGJYJ2Nx9uTKEPA1mCQxNH57E,5144
|
5
|
-
AIEmailAutomationUtility/Email_Read.py,sha256
|
5
|
+
AIEmailAutomationUtility/Email_Read.py,sha256=E_qQ8sBvfem1OtBnaghj5t_Nc0MgdyWrZaDh8OjtJE0,20582
|
6
6
|
AIEmailAutomationUtility/Email_Upload_Document.py,sha256=3bdkxfDlwoeRp-46KPw2Gs1dqBhEIoA1yE5GCudpdV8,1320
|
7
7
|
AIEmailAutomationUtility/Save_Draft.py,sha256=yzLgFN14I_lXE6qL0I3tKNduvcnWdbsY9i2mKdTtio4,5348
|
8
8
|
AIEmailAutomationUtility/Save_Transaction.py,sha256=Gg1w6hhzHmEFjsuzYvkq-3-EsWReetjLHsYSv5YIGgM,3816
|
9
9
|
AIEmailAutomationUtility/__init__.py,sha256=bB7N-qQD85RdMaXHg_ZU5oPtHtx9zgeG6-ue4rhcfYI,379
|
10
|
-
AIEmailAutomationUtility-0.0.
|
11
|
-
AIEmailAutomationUtility-0.0.
|
12
|
-
AIEmailAutomationUtility-0.0.
|
13
|
-
AIEmailAutomationUtility-0.0.
|
14
|
-
AIEmailAutomationUtility-0.0.
|
10
|
+
AIEmailAutomationUtility-0.0.14.dist-info/LICENCE.txt,sha256=2qX9IkEUBx0VJp1Vh9O2dsRwE-IpYId0lXDyn7OVsJ8,1073
|
11
|
+
AIEmailAutomationUtility-0.0.14.dist-info/METADATA,sha256=jlivyoPfgZ_3VrFOn2KYZCeBFMDnVwClk1ComgVZ5BE,623
|
12
|
+
AIEmailAutomationUtility-0.0.14.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
13
|
+
AIEmailAutomationUtility-0.0.14.dist-info/top_level.txt,sha256=3jTWrTUblVkaP7mpwY2UBSnrlfot5Ykpfsehyke-Uzw,25
|
14
|
+
AIEmailAutomationUtility-0.0.14.dist-info/RECORD,,
|
{AIEmailAutomationUtility-0.0.13.dist-info → AIEmailAutomationUtility-0.0.14.dist-info}/LICENCE.txt
RENAMED
File without changes
|
{AIEmailAutomationUtility-0.0.13.dist-info → AIEmailAutomationUtility-0.0.14.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|