llumo 0.2.18__py3-none-any.whl → 0.2.20__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 +33 -23
- llumo/sockets.py +4 -2
- {llumo-0.2.18.dist-info → llumo-0.2.20.dist-info}/METADATA +1 -1
- {llumo-0.2.18.dist-info → llumo-0.2.20.dist-info}/RECORD +7 -7
- {llumo-0.2.18.dist-info → llumo-0.2.20.dist-info}/WHEEL +0 -0
- {llumo-0.2.18.dist-info → llumo-0.2.20.dist-info}/licenses/LICENSE +0 -0
- {llumo-0.2.18.dist-info → llumo-0.2.20.dist-info}/top_level.txt +0 -0
llumo/client.py
CHANGED
@@ -618,11 +618,11 @@ class LlumoClient:
|
|
618
618
|
data,
|
619
619
|
evals: list, # list of eval metric names
|
620
620
|
prompt_template="Give answer to the given query: {{query}} using the given context: {{context}}.",
|
621
|
+
outputColName="output",
|
621
622
|
createExperiment: bool = False,
|
622
623
|
getDataFrame:bool =False,
|
623
624
|
_tocheck=True,
|
624
625
|
):
|
625
|
-
outputColName="output"
|
626
626
|
if isinstance(data, dict):
|
627
627
|
data = [data]
|
628
628
|
elif not isinstance(data, list):
|
@@ -632,20 +632,24 @@ class LlumoClient:
|
|
632
632
|
dataframe = pd.DataFrame(data).astype(str)
|
633
633
|
workspaceID = None
|
634
634
|
email = None
|
635
|
-
|
635
|
+
try:
|
636
|
+
socketID = self.socket.connect(timeout=250)
|
637
|
+
except Exception as e:
|
638
|
+
socketID="DummySocketID"
|
639
|
+
|
636
640
|
self.evalData=[]
|
637
641
|
self.evals=evals
|
638
642
|
self.allBatches = []
|
639
643
|
rowIdMapping = {} # (rowID-columnID-columnID -> (index, evalName))
|
640
644
|
|
641
645
|
# Wait for socket connection
|
642
|
-
max_wait_secs = 20
|
643
|
-
waited_secs = 0
|
644
|
-
while not self.socket._connection_established.is_set():
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
646
|
+
# max_wait_secs = 20
|
647
|
+
# waited_secs = 0
|
648
|
+
# while not self.socket._connection_established.is_set():
|
649
|
+
# time.sleep(0.1)
|
650
|
+
# waited_secs += 0.1
|
651
|
+
# if waited_secs >= max_wait_secs:
|
652
|
+
# raise RuntimeError("Timeout waiting for server connection")
|
649
653
|
|
650
654
|
# Start listener thread
|
651
655
|
expectedResults = len(dataframe) * len(evals)
|
@@ -1093,13 +1097,16 @@ class LlumoClient:
|
|
1093
1097
|
|
1094
1098
|
# Connect to socket
|
1095
1099
|
self.socket = LlumoSocketClient(socketUrl)
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1100
|
+
try:
|
1101
|
+
socketID = self.socket.connect(timeout=150)
|
1102
|
+
except Exception as e:
|
1103
|
+
socketID="DummySocketID"
|
1104
|
+
# waited_secs = 0
|
1105
|
+
# while not self.socket._connection_established.is_set():
|
1106
|
+
# time.sleep(0.1)
|
1107
|
+
# waited_secs += 0.1
|
1108
|
+
# if waited_secs >= 20:
|
1109
|
+
# raise RuntimeError("Timeout waiting for server 'connection-established' event.")
|
1103
1110
|
|
1104
1111
|
self.validateApiKey()
|
1105
1112
|
|
@@ -1348,13 +1355,16 @@ class LlumoClient:
|
|
1348
1355
|
|
1349
1356
|
# Connect to socket
|
1350
1357
|
self.socket = LlumoSocketClient(socketUrl)
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
+
try:
|
1359
|
+
socketID = self.socket.connect(timeout=150)
|
1360
|
+
except Exception as e:
|
1361
|
+
socketID="DummySocketID"
|
1362
|
+
# waited_secs = 0
|
1363
|
+
# while not self.socket._connection_established.is_set():
|
1364
|
+
# time.sleep(0.1)
|
1365
|
+
# waited_secs += 0.1
|
1366
|
+
# if waited_secs >= 20:
|
1367
|
+
# raise RuntimeError("Timeout waiting for server 'connection-established' event.")
|
1358
1368
|
|
1359
1369
|
self.validateApiKey()
|
1360
1370
|
|
llumo/sockets.py
CHANGED
@@ -67,7 +67,8 @@ class LlumoSocketClient:
|
|
67
67
|
|
68
68
|
@self.sio.on("connect_error")
|
69
69
|
def on_connect_error(error):
|
70
|
-
print(f"Socket connection error: {error}")
|
70
|
+
# print(f"Socket connection error: {error}")
|
71
|
+
pass
|
71
72
|
|
72
73
|
@self.sio.on("error")
|
73
74
|
def on_error(error):
|
@@ -109,7 +110,8 @@ class LlumoSocketClient:
|
|
109
110
|
except Exception as e:
|
110
111
|
# print(f"[DEBUG] Connection failed with error: {e}")
|
111
112
|
self._connected = False
|
112
|
-
raise RuntimeError(f"WebSocket connection failed: {e}")
|
113
|
+
# raise RuntimeError(f"WebSocket connection failed: {e}")
|
114
|
+
print("It seems your internet connection is a bit unstable. This might take a little longer than usual—thanks for your patience!")
|
113
115
|
|
114
116
|
def listenForResults(
|
115
117
|
self, min_wait=30, max_wait=300, inactivity_timeout=50, expected_results=None
|
@@ -1,6 +1,6 @@
|
|
1
1
|
llumo/__init__.py,sha256=YVBkF1fiXFBd_zzySi9BDWgX8MJuLBJ-oF8538MrnDU,256
|
2
2
|
llumo/chains.py,sha256=6lCgLseh04RUgc6SahhmvQj82quay2Mi1j8gPUlx8Es,2923
|
3
|
-
llumo/client.py,sha256=
|
3
|
+
llumo/client.py,sha256=oLFlVRUh6GIL9pcSuFE93P0uiUzpIvKEhXtYgGmzu24,63289
|
4
4
|
llumo/exceptions.py,sha256=Vp_MnanHbnd1Yjuoi6WLrKiwwZbJL3znCox2URMmGU4,2032
|
5
5
|
llumo/execution.py,sha256=nWbJ7AvWuUPcOb6i-JzKRna_PvF-ewZTiK8skS-5n3w,1380
|
6
6
|
llumo/functionCalling.py,sha256=D5jYapu1rIvdIJNUYPYMTyhQ1H-6nkwoOLMi6eekfUE,7241
|
@@ -8,9 +8,9 @@ llumo/google.py,sha256=3S_aRtbtlctCXPGR0u4baLlkyFrsjd02vlUCkoRPA5U,2147
|
|
8
8
|
llumo/helpingFuntions.py,sha256=ORBM5xPPMHc3ENnJOg4i3Enxtor4En5oDj1d0Zu1mLk,25284
|
9
9
|
llumo/models.py,sha256=aVEZsOOoQx5LeNtwSyBxqvrINq0izH3QWu_YjsMPE6o,2910
|
10
10
|
llumo/openai.py,sha256=DGhEwQIJIIycGpw3hYQnyxdj6RFVpZ-gay-fZGqtkhU,3013
|
11
|
-
llumo/sockets.py,sha256=
|
12
|
-
llumo-0.2.
|
13
|
-
llumo-0.2.
|
14
|
-
llumo-0.2.
|
15
|
-
llumo-0.2.
|
16
|
-
llumo-0.2.
|
11
|
+
llumo/sockets.py,sha256=pBDo-U65hMIMwKMwZQl3iBkEjISEt-9BkXxZTWfSHF4,6116
|
12
|
+
llumo-0.2.20.dist-info/licenses/LICENSE,sha256=tF9yAcfPV9xGT3ViWmC8hPvOo8BEk4ZICbUfcEo8Dlk,182
|
13
|
+
llumo-0.2.20.dist-info/METADATA,sha256=1CIYg4KCZWpIqEHzr-6SXsgu4k-89n1xN2HWMrvzKsI,1558
|
14
|
+
llumo-0.2.20.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
15
|
+
llumo-0.2.20.dist-info/top_level.txt,sha256=d5zUTMI99llPtLRB8rtSrqELm_bOqX-bNC5IcwlDk88,6
|
16
|
+
llumo-0.2.20.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|