llumo 0.2.34__py3-none-any.whl → 0.2.36__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/callback.py +13 -8
- llumo/client.py +13 -13
- llumo/llumoLogger.py +15 -9
- llumo/llumoSessionContext.py +1 -1
- llumo/sockets.py +3 -2
- {llumo-0.2.34.dist-info → llumo-0.2.36.dist-info}/METADATA +5 -1
- {llumo-0.2.34.dist-info → llumo-0.2.36.dist-info}/RECORD +10 -10
- {llumo-0.2.34.dist-info → llumo-0.2.36.dist-info}/WHEEL +0 -0
- {llumo-0.2.34.dist-info → llumo-0.2.36.dist-info}/licenses/LICENSE +0 -0
- {llumo-0.2.34.dist-info → llumo-0.2.36.dist-info}/top_level.txt +0 -0
llumo/callback.py
CHANGED
|
@@ -4,6 +4,7 @@ from langchain_core.messages import BaseMessage
|
|
|
4
4
|
from langchain_core.outputs import LLMResult
|
|
5
5
|
from langchain_core.agents import AgentAction, AgentFinish
|
|
6
6
|
import json
|
|
7
|
+
|
|
7
8
|
from llumo.llumoLogger import LlumoLogger
|
|
8
9
|
from llumo.llumoSessionContext import LlumoSessionContext
|
|
9
10
|
import time
|
|
@@ -93,7 +94,7 @@ class LlumoCallbackHandler(BaseCallbackHandler):
|
|
|
93
94
|
|
|
94
95
|
self.agentStartTime = time.time()
|
|
95
96
|
self.isAgentExecution = True
|
|
96
|
-
print(f"[DEBUG] Agent execution started: {self.currentAgentName} - Reset counters for new query")
|
|
97
|
+
# print(f"[DEBUG] Agent execution started: {self.currentAgentName} - Reset counters for new query")
|
|
97
98
|
else:
|
|
98
99
|
self.isAgentExecution = False
|
|
99
100
|
|
|
@@ -168,6 +169,10 @@ class LlumoCallbackHandler(BaseCallbackHandler):
|
|
|
168
169
|
|
|
169
170
|
def on_llm_end(self, response: Any, **kwargs: Any) -> None:
|
|
170
171
|
"""Called when LLM completes"""
|
|
172
|
+
# print("ON LLM END kwargs: ",kwargs)
|
|
173
|
+
# print("ON LLM END response: ",response)
|
|
174
|
+
|
|
175
|
+
|
|
171
176
|
duration_ms = int((time.time() - self.llmStartTime) * 1000) if self.llmStartTime else 0
|
|
172
177
|
|
|
173
178
|
# Initialize default values
|
|
@@ -233,7 +238,7 @@ class LlumoCallbackHandler(BaseCallbackHandler):
|
|
|
233
238
|
|
|
234
239
|
except Exception as e:
|
|
235
240
|
error_message = f"Response processing error: {str(e)}"
|
|
236
|
-
status = "ERROR"
|
|
241
|
+
# status = "ERROR"
|
|
237
242
|
|
|
238
243
|
# Ensure we have string values
|
|
239
244
|
output = str(output) if output is not None else ""
|
|
@@ -347,8 +352,8 @@ class LlumoCallbackHandler(BaseCallbackHandler):
|
|
|
347
352
|
|
|
348
353
|
def on_tool_start(self, serialized: Dict[str, Any], input_str: str, **kwargs: Any) -> None:
|
|
349
354
|
"""Called when a tool starts executing"""
|
|
350
|
-
# print("ON TOOL START: ",serialized)
|
|
351
|
-
# print("ON TOOL START: ",kwargs)
|
|
355
|
+
# print("ON TOOL START serialized: ",serialized)
|
|
356
|
+
# print("ON TOOL START kwargs: ",kwargs)
|
|
352
357
|
|
|
353
358
|
self.toolStartTime = time.time()
|
|
354
359
|
self.stepTime = time.time()
|
|
@@ -376,7 +381,7 @@ class LlumoCallbackHandler(BaseCallbackHandler):
|
|
|
376
381
|
if self.currentToolName not in self.toolsUsed:
|
|
377
382
|
self.toolsUsed.append(self.currentToolName)
|
|
378
383
|
|
|
379
|
-
print(f"[DEBUG] Tool started: {self.currentToolName} with input: {input_str}")
|
|
384
|
+
# print(f"[DEBUG] Tool started: {self.currentToolName} with input: {input_str}")
|
|
380
385
|
|
|
381
386
|
def on_tool_end(self, output: Any, **kwargs: Any) -> None:
|
|
382
387
|
"""Called when a tool completes execution"""
|
|
@@ -409,7 +414,7 @@ class LlumoCallbackHandler(BaseCallbackHandler):
|
|
|
409
414
|
status="SUCCESS",
|
|
410
415
|
# message="",
|
|
411
416
|
)
|
|
412
|
-
print(f"[DEBUG] Tool completed: {self.currentToolName} -> {output_str}")
|
|
417
|
+
# print(f"[DEBUG] Tool completed: {self.currentToolName} -> {output_str}")
|
|
413
418
|
|
|
414
419
|
except Exception as e:
|
|
415
420
|
print(f"[ERROR] Failed to log tool end: {e}")
|
|
@@ -500,7 +505,7 @@ class LlumoCallbackHandler(BaseCallbackHandler):
|
|
|
500
505
|
toolName=self.currentToolName or "unknown",
|
|
501
506
|
description=self.currentToolDescription,
|
|
502
507
|
input=self.currentToolInput or {"input": ""},
|
|
503
|
-
output="",
|
|
508
|
+
output=f'{error}' if error else "",
|
|
504
509
|
latencyMs=0,
|
|
505
510
|
status="FAILURE",
|
|
506
511
|
# message=str(error),
|
|
@@ -557,7 +562,7 @@ class LlumoCallbackHandler(BaseCallbackHandler):
|
|
|
557
562
|
"""Called when arbitrary text is logged"""
|
|
558
563
|
# Only log significant text events during agent execution
|
|
559
564
|
if self.isAgentExecution and text.strip():
|
|
560
|
-
print(f"[DEBUG] Additional text: {text}")
|
|
565
|
+
# print(f"[DEBUG] Additional text: {text}")
|
|
561
566
|
|
|
562
567
|
# Check if this text contains important ReAct information like "Observation:"
|
|
563
568
|
if any(keyword in text.lower() for keyword in ['observation:']):
|
llumo/client.py
CHANGED
|
@@ -204,10 +204,10 @@ class LlumoClient:
|
|
|
204
204
|
"Content-Type": "application/json",
|
|
205
205
|
}
|
|
206
206
|
try:
|
|
207
|
-
print(postUrl)
|
|
207
|
+
# print(postUrl)
|
|
208
208
|
response = requests.post(postUrl, json=payload, headers=headers)
|
|
209
|
-
print(f"Post API Status Code: {response.status_code}")
|
|
210
|
-
print(response.text)
|
|
209
|
+
# print(f"Post API Status Code: {response.status_code}")
|
|
210
|
+
# print(response.text)
|
|
211
211
|
# print(response.status_code)
|
|
212
212
|
|
|
213
213
|
except Exception as e:
|
|
@@ -795,10 +795,10 @@ class LlumoClient:
|
|
|
795
795
|
email = None
|
|
796
796
|
try:
|
|
797
797
|
socketID = self.socket.connect(timeout=250)
|
|
798
|
-
print("Socket connected with ID:", socketID)
|
|
798
|
+
# print("Socket connected with ID:", socketID)
|
|
799
799
|
except Exception as e:
|
|
800
800
|
socketID = "DummySocketID"
|
|
801
|
-
print(f"Socket connection failed, using dummy ID. Error: {str(e)}")
|
|
801
|
+
# print(f"Socket connection failed, using dummy ID. Error: {str(e)}")
|
|
802
802
|
|
|
803
803
|
self.evalData = []
|
|
804
804
|
self.evals = evals
|
|
@@ -936,10 +936,10 @@ class LlumoClient:
|
|
|
936
936
|
|
|
937
937
|
compoundKey = f"{rowID}-{columnID}-{columnID}"
|
|
938
938
|
rowIdMapping[compoundKey] = {"index": index}
|
|
939
|
-
print("rowIdMapping:", rowIdMapping)
|
|
939
|
+
# print("rowIdMapping:", rowIdMapping)
|
|
940
940
|
|
|
941
941
|
# Create evaluation payload
|
|
942
|
-
print("socketID in before templateData: ", socketID)
|
|
942
|
+
# print("socketID in before templateData: ", socketID)
|
|
943
943
|
templateData = {
|
|
944
944
|
"processID": getProcessID(),
|
|
945
945
|
"socketID": socketID,
|
|
@@ -997,13 +997,13 @@ class LlumoClient:
|
|
|
997
997
|
|
|
998
998
|
rawResults = self.socket.getReceivedData()
|
|
999
999
|
|
|
1000
|
-
print(f"Total results received: {len(rawResults)}")
|
|
1000
|
+
# print(f"Total results received: {len(rawResults)}")
|
|
1001
1001
|
# print("Raw results:", rawResults)
|
|
1002
1002
|
|
|
1003
1003
|
# print("data from db #####################",dataFromDb)
|
|
1004
1004
|
# Fix here: keep full keys, do not split keys
|
|
1005
1005
|
receivedRowIDs = {key for item in rawResults for key in item.keys()}
|
|
1006
|
-
print("Received Row IDs:", receivedRowIDs)
|
|
1006
|
+
# print("Received Row IDs:", receivedRowIDs)
|
|
1007
1007
|
expectedRowIDs = set(rowIdMapping.keys())
|
|
1008
1008
|
missingRowIDs = expectedRowIDs - receivedRowIDs
|
|
1009
1009
|
# print("All expected keys:", expectedRowIDs)
|
|
@@ -1011,13 +1011,13 @@ class LlumoClient:
|
|
|
1011
1011
|
# print("Missing keys:", len(missingRowIDs))
|
|
1012
1012
|
missingRowIDs = list(missingRowIDs)
|
|
1013
1013
|
|
|
1014
|
-
print("Missing Row IDs:", missingRowIDs)
|
|
1015
|
-
print(f"Total results before fetching missing data: {len(rawResults)}")
|
|
1014
|
+
# print("Missing Row IDs:", missingRowIDs)
|
|
1015
|
+
# print(f"Total results before fetching missing data: {len(rawResults)}")
|
|
1016
1016
|
if len(missingRowIDs) > 0:
|
|
1017
1017
|
print('''It's taking longer than expected to get results for some rows. You can close this now.
|
|
1018
|
-
Please wait for 15 mins while we create the flow graph for you. You can check the graph at app.llumo.ai/
|
|
1018
|
+
Please wait for 15 mins while we create the flow graph for you. You can check the graph at app.llumo.ai/debugging''')
|
|
1019
1019
|
else:
|
|
1020
|
-
print('''All results received successfully. You can check flowgraph in 5 mins at app.llumo.ai/
|
|
1020
|
+
print('''All results received successfully. You can check flowgraph in 5 mins at app.llumo.ai/debugging''')
|
|
1021
1021
|
# if len(missingRowIDs) > 0:
|
|
1022
1022
|
# dataFromDb = self.fetchDataForMissingKeys(workspaceID, missingRowIDs)
|
|
1023
1023
|
# # print("Fetched missing data from DB:", dataFromDb)
|
llumo/llumoLogger.py
CHANGED
|
@@ -23,6 +23,12 @@ class LlumoLogger:
|
|
|
23
23
|
timeout=10,
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
+
if response.status_code == 401:
|
|
27
|
+
# Wrong API key
|
|
28
|
+
print("❌ SDK integration failed! ")
|
|
29
|
+
raise Exception("Your Llumo API key is Invalid. Try again.")
|
|
30
|
+
|
|
31
|
+
|
|
26
32
|
response.raise_for_status()
|
|
27
33
|
res_json = response.json()
|
|
28
34
|
|
|
@@ -33,19 +39,19 @@ class LlumoLogger:
|
|
|
33
39
|
self.playgroundID = inner_data.get("playgroundID")
|
|
34
40
|
self.userEmailID = inner_data.get("createdBy")
|
|
35
41
|
|
|
36
|
-
if not self.workspaceID or not self.playgroundID:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
# if not self.workspaceID or not self.playgroundID:
|
|
43
|
+
# raise RuntimeError(
|
|
44
|
+
# f"Invalid response: workspaceID or playgroundID missing. Full response: {res_json}"
|
|
45
|
+
# )
|
|
46
|
+
print("✅ SDK integration successful! ")
|
|
41
47
|
except requests.exceptions.RequestException as req_err:
|
|
42
48
|
raise RuntimeError(
|
|
43
49
|
f"Network or HTTP error during authentication: {req_err}"
|
|
44
50
|
)
|
|
45
|
-
except ValueError as json_err:
|
|
46
|
-
|
|
47
|
-
except Exception as e:
|
|
48
|
-
|
|
51
|
+
# except ValueError as json_err:
|
|
52
|
+
# raise RuntimeError(f"Invalid JSON in authentication response: {json_err}")
|
|
53
|
+
# except Exception as e:
|
|
54
|
+
# raise RuntimeError(f"Authentication failed: {e}")
|
|
49
55
|
|
|
50
56
|
def getWorkspaceID(self):
|
|
51
57
|
return self.workspaceID
|
llumo/llumoSessionContext.py
CHANGED
llumo/sockets.py
CHANGED
|
@@ -110,7 +110,8 @@ class LlumoSocketClient:
|
|
|
110
110
|
except Exception as e:
|
|
111
111
|
# print(f"[DEBUG] Connection failed with error: {e}")
|
|
112
112
|
self._connected = False
|
|
113
|
-
# raise RuntimeError(f"WebSocket
|
|
113
|
+
# raise RuntimeError(f"WebSocket
|
|
114
|
+
# connection failed: {e}")
|
|
114
115
|
print("It seems your internet connection is a bit unstable. This might take a little longer than usual—thanks for your patience!")
|
|
115
116
|
|
|
116
117
|
def listenForResults(
|
|
@@ -150,7 +151,7 @@ class LlumoSocketClient:
|
|
|
150
151
|
|
|
151
152
|
def getReceivedData(self):
|
|
152
153
|
with self._lock:
|
|
153
|
-
print("Total received:", len(self._received_data)) # DEBUG
|
|
154
|
+
# print("Total received:", len(self._received_data)) # DEBUG
|
|
154
155
|
return self._received_data.copy()
|
|
155
156
|
|
|
156
157
|
def disconnect(self):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: llumo
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.36
|
|
4
4
|
Summary: Python SDK for interacting with the Llumo ai API.
|
|
5
5
|
Home-page: https://www.llumo.ai/
|
|
6
6
|
Author: Llumo
|
|
@@ -24,6 +24,10 @@ Requires-Dist: openai==1.75.0
|
|
|
24
24
|
Requires-Dist: tqdm==4.67.1
|
|
25
25
|
Requires-Dist: google-generativeai==0.8.5
|
|
26
26
|
Requires-Dist: websocket-client==1.8.0
|
|
27
|
+
Requires-Dist: pandas
|
|
28
|
+
Requires-Dist: python-dateutil
|
|
29
|
+
Requires-Dist: numpy
|
|
30
|
+
Requires-Dist: langchain_core
|
|
27
31
|
Dynamic: author
|
|
28
32
|
Dynamic: author-email
|
|
29
33
|
Dynamic: classifier
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
llumo/__init__.py,sha256=kkuppu7ZPiVZFdnYzJ9BM3syMbYHOSZLpwKwAvGHsnY,311
|
|
2
|
-
llumo/callback.py,sha256=
|
|
2
|
+
llumo/callback.py,sha256=6y9TeVD8qjEXSsLUsIvkK29hbzgIefpBngyA_u9y9LU,23981
|
|
3
3
|
llumo/callbacks-0.py,sha256=TEIOCWRvk2UYsTmBMBsnlgpqWvr-2y3a6d0w_e96NRM,8958
|
|
4
4
|
llumo/chains.py,sha256=6lCgLseh04RUgc6SahhmvQj82quay2Mi1j8gPUlx8Es,2923
|
|
5
|
-
llumo/client.py,sha256=
|
|
5
|
+
llumo/client.py,sha256=EmgnIlVVs83Cne-4i5liyokaY3QEmmDOiQnh4oZyHD0,73053
|
|
6
6
|
llumo/exceptions.py,sha256=1OyhN9YL9LcyUPUsqYHq6Rret0udATZAwMVJaio2_Ec,2123
|
|
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=jhB14o5e0YuRp-lCnu1c4vXjoG_y8ZinFHxUrZsnZAk,27284
|
|
11
|
-
llumo/llumoLogger.py,sha256=
|
|
12
|
-
llumo/llumoSessionContext.py,sha256=
|
|
11
|
+
llumo/llumoLogger.py,sha256=7DZR2_QHy0fencng9Nnf9UPmEx8-OZzhvz1QRUp9w6c,2190
|
|
12
|
+
llumo/llumoSessionContext.py,sha256=si7T66D4bsea9vrCaQiko3ZcBcx7zy9W0lf0bpitaLY,12587
|
|
13
13
|
llumo/models.py,sha256=aVEZsOOoQx5LeNtwSyBxqvrINq0izH3QWu_YjsMPE6o,2910
|
|
14
14
|
llumo/openai.py,sha256=VstBzaORe8Tq0feUIIEszzcN1oq6TJfkPviaCr5d3Bw,8950
|
|
15
|
-
llumo/sockets.py,sha256=
|
|
16
|
-
llumo-0.2.
|
|
17
|
-
llumo-0.2.
|
|
18
|
-
llumo-0.2.
|
|
19
|
-
llumo-0.2.
|
|
20
|
-
llumo-0.2.
|
|
15
|
+
llumo/sockets.py,sha256=pfWz1zTEiwqJhdbSy3i3_Y4WlIdJ3cuac11wMePeBS0,6130
|
|
16
|
+
llumo-0.2.36.dist-info/licenses/LICENSE,sha256=tF9yAcfPV9xGT3ViWmC8hPvOo8BEk4ZICbUfcEo8Dlk,182
|
|
17
|
+
llumo-0.2.36.dist-info/METADATA,sha256=-lPlVSKmlLUjVHpbufy8N4X5b3_247Semgcv7boLfHI,1662
|
|
18
|
+
llumo-0.2.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
llumo-0.2.36.dist-info/top_level.txt,sha256=d5zUTMI99llPtLRB8rtSrqELm_bOqX-bNC5IcwlDk88,6
|
|
20
|
+
llumo-0.2.36.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|