llumo 0.2.35__tar.gz → 0.2.36__tar.gz
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-0.2.35/llumo.egg-info → llumo-0.2.36}/PKG-INFO +1 -1
- {llumo-0.2.35 → llumo-0.2.36}/llumo/callback.py +12 -7
- {llumo-0.2.35 → llumo-0.2.36}/llumo/client.py +4 -5
- {llumo-0.2.35 → llumo-0.2.36}/llumo/llumoLogger.py +15 -9
- {llumo-0.2.35 → llumo-0.2.36}/llumo/sockets.py +2 -1
- {llumo-0.2.35 → llumo-0.2.36/llumo.egg-info}/PKG-INFO +1 -1
- {llumo-0.2.35 → llumo-0.2.36}/setup.py +4 -0
- {llumo-0.2.35 → llumo-0.2.36}/LICENSE +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/MANIFEST.in +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/README.md +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/__init__.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/callbacks-0.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/chains.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/exceptions.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/execution.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/functionCalling.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/google.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/helpingFuntions.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/llumoSessionContext.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/models.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo/openai.py +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo.egg-info/SOURCES.txt +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo.egg-info/dependency_links.txt +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo.egg-info/requires.txt +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/llumo.egg-info/top_level.txt +0 -0
- {llumo-0.2.35 → llumo-0.2.36}/setup.cfg +0 -0
|
@@ -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
|
|
@@ -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:']):
|
|
@@ -795,11 +795,10 @@ class LlumoClient:
|
|
|
795
795
|
email = None
|
|
796
796
|
try:
|
|
797
797
|
socketID = self.socket.connect(timeout=250)
|
|
798
|
-
print("Socket connected")
|
|
799
798
|
# print("Socket connected with ID:", socketID)
|
|
800
799
|
except Exception as e:
|
|
801
800
|
socketID = "DummySocketID"
|
|
802
|
-
print(f"Socket connection failed, using dummy ID. Error: {str(e)}")
|
|
801
|
+
# print(f"Socket connection failed, using dummy ID. Error: {str(e)}")
|
|
803
802
|
|
|
804
803
|
self.evalData = []
|
|
805
804
|
self.evals = evals
|
|
@@ -937,7 +936,7 @@ class LlumoClient:
|
|
|
937
936
|
|
|
938
937
|
compoundKey = f"{rowID}-{columnID}-{columnID}"
|
|
939
938
|
rowIdMapping[compoundKey] = {"index": index}
|
|
940
|
-
print("rowIdMapping:", rowIdMapping)
|
|
939
|
+
# print("rowIdMapping:", rowIdMapping)
|
|
941
940
|
|
|
942
941
|
# Create evaluation payload
|
|
943
942
|
# print("socketID in before templateData: ", socketID)
|
|
@@ -1016,9 +1015,9 @@ class LlumoClient:
|
|
|
1016
1015
|
# print(f"Total results before fetching missing data: {len(rawResults)}")
|
|
1017
1016
|
if len(missingRowIDs) > 0:
|
|
1018
1017
|
print('''It's taking longer than expected to get results for some rows. You can close this now.
|
|
1019
|
-
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''')
|
|
1020
1019
|
else:
|
|
1021
|
-
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''')
|
|
1022
1021
|
# if len(missingRowIDs) > 0:
|
|
1023
1022
|
# dataFromDb = self.fetchDataForMissingKeys(workspaceID, missingRowIDs)
|
|
1024
1023
|
# # print("Fetched missing data from DB:", dataFromDb)
|
|
@@ -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
|
|
@@ -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(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|