AIEmailAutomationUtility 0.0.8__py3-none-any.whl → 0.0.9__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.
@@ -4,6 +4,7 @@ from openai import OpenAI, AssistantEventHandler
4
4
  from flask import Flask,request
5
5
  import json
6
6
  import loggerutility as logger
7
+ import ast, re
7
8
 
8
9
  class EmailReplyAssistant:
9
10
  def __init__(self):
@@ -65,7 +66,10 @@ class EmailReplyAssistant:
65
66
  except Exception as error:
66
67
  responseStr = "<br/><br/>" + str(error)
67
68
  trace = traceback.format_exc()
68
- print(f"Exception in process_Email: {responseStr} \n {trace} \n DataType ::: {type(responseStr)}")
69
+ logger.log(f"Exception in process_Email: {responseStr} \n {trace} \n DataType ::: {type(responseStr)}")
70
+ m = re.search(r"({.*})", str(error))
71
+ data = ast.literal_eval(m.group(1)).get('error') if m else {}
72
+ return {"status": "Failed", "message": data.get('message')}
69
73
 
70
74
  def email_reply_assitant(self):
71
75
  try:
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AIEmailAutomationUtility
3
- Version: 0.0.8
4
- Summary: Change the logic of getting category name from openAI response
3
+ Version: 0.0.9
4
+ Summary: Change the logic of return exception value
5
5
  Author: Proteus Technology PVT. LTD.
6
6
  Author-email: <apps@baseinformation.com>
7
7
  Keywords: python,first package
@@ -13,4 +13,4 @@ Classifier: Operating System :: MacOS :: MacOS X
13
13
  Classifier: Operating System :: Microsoft :: Windows
14
14
  License-File: LICENCE.txt
15
15
 
16
- Change the logic of getting category name from openAI response
16
+ Change the logic of return exception value
@@ -1,4 +1,4 @@
1
- AIEmailAutomationUtility/EmailReplyAssistant.py,sha256=9X4osN7JDG_2sdyq0Sww5VapxPc_u7Nc9bEbODeE6YU,3852
1
+ AIEmailAutomationUtility/EmailReplyAssistant.py,sha256=jFkOA0yfxRybICjeKsq4xDetTr6vPjkprkrXATsUpH8,4071
2
2
  AIEmailAutomationUtility/Email_Classification.py,sha256=NhJwKFGVjLd4BsIFPAWs9qKAUYTxRTYyWd-BvjONXF0,9476
3
3
  AIEmailAutomationUtility/Email_DocumentUploader.py,sha256=0AWcwAx7x4WiZwFBxHwdFpUfE9wjvLGcaxT_95bqRcY,3496
4
4
  AIEmailAutomationUtility/Email_Draft.py,sha256=WUdaSLk4xTwMs1wSOUXE2xiDUehsZQ2wGqvWtXbjeo0,5427
@@ -7,8 +7,8 @@ AIEmailAutomationUtility/Email_Upload_Document.py,sha256=3bdkxfDlwoeRp-46KPw2Gs1
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.8.dist-info/LICENCE.txt,sha256=2qX9IkEUBx0VJp1Vh9O2dsRwE-IpYId0lXDyn7OVsJ8,1073
11
- AIEmailAutomationUtility-0.0.8.dist-info/METADATA,sha256=UgDXx1muiZQtvoTCwjhKMYgYY2FK_GagTkxhh8gftbs,624
12
- AIEmailAutomationUtility-0.0.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
13
- AIEmailAutomationUtility-0.0.8.dist-info/top_level.txt,sha256=3jTWrTUblVkaP7mpwY2UBSnrlfot5Ykpfsehyke-Uzw,25
14
- AIEmailAutomationUtility-0.0.8.dist-info/RECORD,,
10
+ AIEmailAutomationUtility-0.0.9.dist-info/LICENCE.txt,sha256=2qX9IkEUBx0VJp1Vh9O2dsRwE-IpYId0lXDyn7OVsJ8,1073
11
+ AIEmailAutomationUtility-0.0.9.dist-info/METADATA,sha256=mkiZRpGQHUuxEyDs1rK4af1Zte1vzUNdvUrH-wlPnLo,584
12
+ AIEmailAutomationUtility-0.0.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
13
+ AIEmailAutomationUtility-0.0.9.dist-info/top_level.txt,sha256=3jTWrTUblVkaP7mpwY2UBSnrlfot5Ykpfsehyke-Uzw,25
14
+ AIEmailAutomationUtility-0.0.9.dist-info/RECORD,,