llumo 0.2.44__py3-none-any.whl → 0.2.46__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.
llumo/client.py CHANGED
@@ -2423,6 +2423,10 @@ class LlumoClient:
2423
2423
  # 2. Poll for Results
2424
2424
  insight_result = dataPollingFuncForInsight(payload)
2425
2425
  # llumoInsight = formattedInsightResponse(llmResponse=insight_result)
2426
+ if "error" in insight_result[0]:
2427
+ insight = insight_result[0]["rawResponse"]["response"]["candidates"][0]["content"]["parts"][0]["text"]
2428
+
2429
+ return {"llumoInsight": [insight]}
2426
2430
 
2427
2431
  return {"llumoInsight": insight_result}
2428
2432
 
llumo/exceptions.py CHANGED
@@ -8,15 +8,27 @@ class LlumoAIError(Exception):
8
8
 
9
9
  @staticmethod
10
10
  def InvalidApiKey():
11
- return LlumoAIError("The provided API key is invalid or unauthorized")
11
+ return LlumoAIError("The provided API key is invalid or unauthorized"
12
+ "To fix this:\n"
13
+ "1. Go to https://app.llumo.ai/getting-started\n"
14
+ "2. Look at the top navigation bar (right side)\n"
15
+ "3. Copy the API key shown under “API Key”\n"
16
+ "4. Paste that key into your SDK configuration"
17
+ )
12
18
 
13
19
  @staticmethod
14
20
  def InvalidApiResponse():
15
- return LlumoAIError("Invalid or UnexpectedError response from the API")
21
+ return LlumoAIError("Invalid or UnexpectedError response from the API"
22
+ "We received a response from the API, but it wasn’t in the expected format…”")
16
23
 
17
24
  @staticmethod
18
- def RequestFailed(detail="The request to the API failed"):
19
- return LlumoAIError(f"Request to the API failed: {detail}")
25
+ def RequestFailed(detail="The request could not be completed."):
26
+ return LlumoAIError(
27
+ f"We were unable to complete the request to the Llumo API. "
28
+ f"{detail} "
29
+ "Please check your network connection or try again later."
30
+ )
31
+
20
32
 
21
33
  @staticmethod
22
34
  def InvalidJsonResponse():
@@ -24,15 +36,25 @@ class LlumoAIError(Exception):
24
36
 
25
37
  @staticmethod
26
38
  def UnexpectedError(detail="Metric"):
27
- return LlumoAIError(f"Can you please check if {detail} is written correctly. If you want to run {detail} please create a custom eval with same name of app.llumo.ai/evallm ")
39
+ return LlumoAIError(
40
+ f"We couldn’t find an evaluation named '{detail}'. "
41
+ f"Please check that the name is correct. "
42
+ f"If you’d like to run '{detail}', you can create a custom evaluation "
43
+ f"with the same name at https://app.llumo.ai/evallm."
44
+ )
28
45
 
29
46
  @staticmethod
30
47
  def EvalError(detail="Some error occured while processing"):
31
48
  return LlumoAIError(f"error: {detail}")
32
49
 
33
50
  @staticmethod
34
- def InsufficientCredits(details):
35
- return LlumoAIError(details)
51
+ def InsufficientCredits(details="Your available credits have been exhausted."):
52
+ return LlumoAIError(
53
+ f"{details} "
54
+ "To continue running evaluations, please upgrade your plan or "
55
+ "increase your usage limits in the LLUMO AI dashboard at: "
56
+ "https://app.llumo.ai/settings."
57
+ )
36
58
 
37
59
  # return LlumoAIError("LLumo hits exhausted")
38
60
 
@@ -56,12 +78,27 @@ class LlumoAIError(Exception):
56
78
  return LlumoAIError(details)
57
79
 
58
80
  @staticmethod
59
- def emptyLogList(details= "List of log object is empty. Ensure your logs have at least 1 log object."):
60
- return LlumoAIError(details)
81
+ def emptyLogList(details="No logs were provided for analysis."):
82
+ return LlumoAIError(
83
+ f"{details} "
84
+ "Please pass at least one log entry. "
85
+ "You can find the correct log format at "
86
+ "https://app.llumo.ai/getting-started "
87
+ "under the “Run SDK with zero data egress” section."
88
+ )
61
89
 
62
90
  @staticmethod
63
- def invalidUserAim(details= ""):
64
- return LlumoAIError(details)
91
+ def invalidUserAim(details=""):
92
+ return LlumoAIError(
93
+ "Invalid userAim detected. "
94
+ "Each userAim must match one of the supported categories used for analysis. "
95
+ "Valid options include:\n"
96
+ "[incorrectOutput, incorrectInput, hallucination, ragQuality, "
97
+ "contextMismanagement, toolCallIssues, agentReasoning, stuckAgents, "
98
+ "jsonErrors, highLatency, highCost, safetyBlocks, modelRouting, "
99
+ "systemErrors, promptAdherence]."
100
+ )
101
+
65
102
 
66
103
  # @staticmethod
67
104
  # def dateNotFound():
@@ -11,6 +11,7 @@ from .helpingFuntions import removeLLmStep
11
11
  from .helpingFuntions import addSelectedTools
12
12
  import random
13
13
 
14
+
14
15
  _ctxLogger = contextvars.ContextVar("ctxLogger")
15
16
  _ctxSessionID = contextvars.ContextVar("ctxSessionID")
16
17
  _ctxLlumoRun = contextvars.ContextVar("ctxLlumoRun")
@@ -179,7 +180,7 @@ class LlumoSessionContext(LlumoClient):
179
180
 
180
181
  payload = addSelectedTools(payload)
181
182
  # print("********PAYLOAD AFTER addSelectedTools*********: ", payload)
182
-
183
+
183
184
  response = requests.post(url, headers=headers, json=payload, timeout=20)
184
185
 
185
186
  response.raise_for_status()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: llumo
3
- Version: 0.2.44
3
+ Version: 0.2.46
4
4
  Summary: Python SDK for interacting with the Llumo ai API.
5
5
  Home-page: https://www.llumo.ai/
6
6
  Author: Llumo
@@ -2,19 +2,19 @@ llumo/__init__.py,sha256=kkuppu7ZPiVZFdnYzJ9BM3syMbYHOSZLpwKwAvGHsnY,311
2
2
  llumo/callback.py,sha256=XQbImLnd64_B2Iir-FCaJcL5Kmpm3RlXJH2zDRXk_yk,25135
3
3
  llumo/callbacks-0.py,sha256=TEIOCWRvk2UYsTmBMBsnlgpqWvr-2y3a6d0w_e96NRM,8958
4
4
  llumo/chains.py,sha256=6lCgLseh04RUgc6SahhmvQj82quay2Mi1j8gPUlx8Es,2923
5
- llumo/client.py,sha256=bXaLQc6n43GgxEEkrDZi-G7L3-1vQ7eBMozSlkyVluY,91891
6
- llumo/exceptions.py,sha256=lUugHX1EorGse_5dU4vBRU82TNkN6VDaAq6JGOcfzaA,2381
5
+ llumo/client.py,sha256=tEP8_h3ygDF-1g7C2BvK8V4bbl4QEf0INPniUwzAyy0,92095
6
+ llumo/exceptions.py,sha256=jiEODf2eU-aEM8zjfnT9Mgs5UbnvP5RDVw-tsEMC3No,3984
7
7
  llumo/execution.py,sha256=nWbJ7AvWuUPcOb6i-JzKRna_PvF-ewZTiK8skS-5n3w,1380
8
8
  llumo/functionCalling.py,sha256=D5jYapu1rIvdIJNUYPYMTyhQ1H-6nkwoOLMi6eekfUE,7241
9
9
  llumo/google.py,sha256=6y9YnDFDRHv6-sQNT5LIsV9p31BCN0B9eow5KTRBWfM,2185
10
10
  llumo/helpingFuntions.py,sha256=9W6q-GzrBUaHZubTVTGvcpUL9KH92CdM0ShkUScLYDM,35081
11
11
  llumo/llumoLogger.py,sha256=syFerZgosq1xm2EkE-o6xBhEg7zE07X9ASao39ZEECQ,2256
12
- llumo/llumoSessionContext.py,sha256=QaiQtB13dITTVINpzEAEVlO-fpW362XkgMjM1W4EHoo,14891
12
+ llumo/llumoSessionContext.py,sha256=UFJK-_UnNIgncYI28_fsy8nluiiSS_kVQpI8qeLZeTE,14904
13
13
  llumo/models.py,sha256=aVEZsOOoQx5LeNtwSyBxqvrINq0izH3QWu_YjsMPE6o,2910
14
14
  llumo/openai.py,sha256=VstBzaORe8Tq0feUIIEszzcN1oq6TJfkPviaCr5d3Bw,8950
15
15
  llumo/sockets.py,sha256=pfWz1zTEiwqJhdbSy3i3_Y4WlIdJ3cuac11wMePeBS0,6130
16
- llumo-0.2.44.dist-info/licenses/LICENSE,sha256=tF9yAcfPV9xGT3ViWmC8hPvOo8BEk4ZICbUfcEo8Dlk,182
17
- llumo-0.2.44.dist-info/METADATA,sha256=bUsfxsgHPfVE1YuLET9yzfyHruYMt1QSe14hVi_BQQA,1662
18
- llumo-0.2.44.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- llumo-0.2.44.dist-info/top_level.txt,sha256=d5zUTMI99llPtLRB8rtSrqELm_bOqX-bNC5IcwlDk88,6
20
- llumo-0.2.44.dist-info/RECORD,,
16
+ llumo-0.2.46.dist-info/licenses/LICENSE,sha256=tF9yAcfPV9xGT3ViWmC8hPvOo8BEk4ZICbUfcEo8Dlk,182
17
+ llumo-0.2.46.dist-info/METADATA,sha256=6r6RAV6Haplmt8cMhM7sMpfZ0lkiZrPvI7bysS4nG1o,1662
18
+ llumo-0.2.46.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
19
+ llumo-0.2.46.dist-info/top_level.txt,sha256=d5zUTMI99llPtLRB8rtSrqELm_bOqX-bNC5IcwlDk88,6
20
+ llumo-0.2.46.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5