llumo 0.2.34__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.
Files changed (26) hide show
  1. {llumo-0.2.34/llumo.egg-info → llumo-0.2.36}/PKG-INFO +1 -1
  2. {llumo-0.2.34 → llumo-0.2.36}/llumo/callback.py +13 -8
  3. {llumo-0.2.34 → llumo-0.2.36}/llumo/client.py +13 -13
  4. {llumo-0.2.34 → llumo-0.2.36}/llumo/llumoLogger.py +15 -9
  5. {llumo-0.2.34 → llumo-0.2.36}/llumo/llumoSessionContext.py +1 -1
  6. {llumo-0.2.34 → llumo-0.2.36}/llumo/sockets.py +3 -2
  7. {llumo-0.2.34 → llumo-0.2.36/llumo.egg-info}/PKG-INFO +1 -1
  8. {llumo-0.2.34 → llumo-0.2.36}/setup.py +4 -0
  9. {llumo-0.2.34 → llumo-0.2.36}/LICENSE +0 -0
  10. {llumo-0.2.34 → llumo-0.2.36}/MANIFEST.in +0 -0
  11. {llumo-0.2.34 → llumo-0.2.36}/README.md +0 -0
  12. {llumo-0.2.34 → llumo-0.2.36}/llumo/__init__.py +0 -0
  13. {llumo-0.2.34 → llumo-0.2.36}/llumo/callbacks-0.py +0 -0
  14. {llumo-0.2.34 → llumo-0.2.36}/llumo/chains.py +0 -0
  15. {llumo-0.2.34 → llumo-0.2.36}/llumo/exceptions.py +0 -0
  16. {llumo-0.2.34 → llumo-0.2.36}/llumo/execution.py +0 -0
  17. {llumo-0.2.34 → llumo-0.2.36}/llumo/functionCalling.py +0 -0
  18. {llumo-0.2.34 → llumo-0.2.36}/llumo/google.py +0 -0
  19. {llumo-0.2.34 → llumo-0.2.36}/llumo/helpingFuntions.py +0 -0
  20. {llumo-0.2.34 → llumo-0.2.36}/llumo/models.py +0 -0
  21. {llumo-0.2.34 → llumo-0.2.36}/llumo/openai.py +0 -0
  22. {llumo-0.2.34 → llumo-0.2.36}/llumo.egg-info/SOURCES.txt +0 -0
  23. {llumo-0.2.34 → llumo-0.2.36}/llumo.egg-info/dependency_links.txt +0 -0
  24. {llumo-0.2.34 → llumo-0.2.36}/llumo.egg-info/requires.txt +0 -0
  25. {llumo-0.2.34 → llumo-0.2.36}/llumo.egg-info/top_level.txt +0 -0
  26. {llumo-0.2.34 → llumo-0.2.36}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: llumo
3
- Version: 0.2.34
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
@@ -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:']):
@@ -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/debugger''')
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/debugger''')
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)
@@ -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
- raise RuntimeError(
38
- f"Invalid response: workspaceID or playgroundID missing. Full response: {res_json}"
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
- raise RuntimeError(f"Invalid JSON in authentication response: {json_err}")
47
- except Exception as e:
48
- raise RuntimeError(f"Authentication failed: {e}")
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
@@ -114,7 +114,7 @@ class LlumoSessionContext(LlumoClient):
114
114
  }
115
115
 
116
116
  try:
117
- print(run)
117
+ # print(run)
118
118
  response = requests.post(url, headers=headers, json=run, timeout=20)
119
119
  response.raise_for_status()
120
120
  # print(response.json())
@@ -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 connection failed: {e}")
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.34
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
@@ -39,6 +39,10 @@ def read_requirements():
39
39
  "tqdm==4.67.1",
40
40
  "google-generativeai==0.8.5",
41
41
  "websocket-client==1.8.0",
42
+ "pandas",
43
+ "python-dateutil",
44
+ "numpy",
45
+ "langchain_core",
42
46
 
43
47
  ]
44
48
 
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