ragaai-catalyst 2.1.2b2__py3-none-any.whl → 2.1.2b3__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.
- ragaai_catalyst/tracers/agentic_tracing/tracers/agent_tracer.py +1 -10
- ragaai_catalyst/tracers/agentic_tracing/tracers/llm_tracer.py +2 -12
- ragaai_catalyst/tracers/agentic_tracing/tracers/tool_tracer.py +1 -11
- {ragaai_catalyst-2.1.2b2.dist-info → ragaai_catalyst-2.1.2b3.dist-info}/METADATA +1 -1
- {ragaai_catalyst-2.1.2b2.dist-info → ragaai_catalyst-2.1.2b3.dist-info}/RECORD +7 -7
- {ragaai_catalyst-2.1.2b2.dist-info → ragaai_catalyst-2.1.2b3.dist-info}/WHEEL +0 -0
- {ragaai_catalyst-2.1.2b2.dist-info → ragaai_catalyst-2.1.2b3.dist-info}/top_level.txt +0 -0
@@ -61,7 +61,6 @@ class AgentTracerMixin:
|
|
61
61
|
version=version,
|
62
62
|
capabilities=capabilities or [],
|
63
63
|
start_time=datetime.now(),
|
64
|
-
end_time=datetime.now(),
|
65
64
|
memory_used=0,
|
66
65
|
input_data=tracer._sanitize_input(args, kwargs),
|
67
66
|
output_data=None,
|
@@ -110,7 +109,6 @@ class AgentTracerMixin:
|
|
110
109
|
try:
|
111
110
|
start_time = datetime.now()
|
112
111
|
result = method(self, *args, **kwargs)
|
113
|
-
end_time = datetime.now()
|
114
112
|
|
115
113
|
# Update agent component with method result
|
116
114
|
if hasattr(tracer, '_agent_components'):
|
@@ -119,7 +117,6 @@ class AgentTracerMixin:
|
|
119
117
|
component['data']['output'] = tracer._sanitize_output(result)
|
120
118
|
component['data']['input'] = tracer._sanitize_input(args, kwargs)
|
121
119
|
component['start_time'] = start_time.isoformat()
|
122
|
-
component['end_time'] = end_time.isoformat()
|
123
120
|
|
124
121
|
# Get children accumulated during method execution
|
125
122
|
children = tracer.agent_children.get()
|
@@ -192,7 +189,6 @@ class AgentTracerMixin:
|
|
192
189
|
result = func(*args, **kwargs)
|
193
190
|
|
194
191
|
# Calculate resource usage
|
195
|
-
end_time = datetime.now()
|
196
192
|
end_memory = psutil.Process().memory_info().rss
|
197
193
|
memory_used = max(0, end_memory - start_memory)
|
198
194
|
|
@@ -211,7 +207,6 @@ class AgentTracerMixin:
|
|
211
207
|
version=version,
|
212
208
|
capabilities=capabilities or [],
|
213
209
|
start_time=start_time,
|
214
|
-
end_time=end_time,
|
215
210
|
memory_used=memory_used,
|
216
211
|
input_data=self.input_data,
|
217
212
|
output_data=self._sanitize_output(result),
|
@@ -257,7 +252,6 @@ class AgentTracerMixin:
|
|
257
252
|
version=version,
|
258
253
|
capabilities=capabilities or [],
|
259
254
|
start_time=start_time,
|
260
|
-
end_time=datetime.now(),
|
261
255
|
memory_used=0,
|
262
256
|
input_data=self.input_data,
|
263
257
|
output_data=None,
|
@@ -309,7 +303,6 @@ class AgentTracerMixin:
|
|
309
303
|
result = await func(*args, **kwargs)
|
310
304
|
|
311
305
|
# Calculate resource usage
|
312
|
-
end_time = datetime.now()
|
313
306
|
end_memory = psutil.Process().memory_info().rss
|
314
307
|
memory_used = max(0, end_memory - start_memory)
|
315
308
|
|
@@ -325,7 +318,6 @@ class AgentTracerMixin:
|
|
325
318
|
version=version,
|
326
319
|
capabilities=capabilities or [],
|
327
320
|
start_time=start_time,
|
328
|
-
end_time=end_time,
|
329
321
|
memory_used=memory_used,
|
330
322
|
input_data=self._sanitize_input(args, kwargs),
|
331
323
|
output_data=self._sanitize_output(result),
|
@@ -372,7 +364,6 @@ class AgentTracerMixin:
|
|
372
364
|
version=version,
|
373
365
|
capabilities=capabilities or [],
|
374
366
|
start_time=start_time,
|
375
|
-
end_time=datetime.now(),
|
376
367
|
memory_used=0,
|
377
368
|
input_data=self._sanitize_input(args, kwargs),
|
378
369
|
output_data=None,
|
@@ -408,7 +399,7 @@ class AgentTracerMixin:
|
|
408
399
|
"type": "agent",
|
409
400
|
"name": kwargs["name"],
|
410
401
|
"start_time": start_time.isoformat(),
|
411
|
-
"end_time":
|
402
|
+
"end_time": datetime.now().astimezone().isoformat(),
|
412
403
|
"error": kwargs.get("error"),
|
413
404
|
"parent_id": kwargs.get("parent_id"),
|
414
405
|
"info": {
|
@@ -250,7 +250,7 @@ class LLMTracerMixin:
|
|
250
250
|
setattr(obj, method_name, wrapped_method)
|
251
251
|
self.patches.append((obj, method_name, original_method))
|
252
252
|
|
253
|
-
def create_llm_component(self, component_id, hash_id, name, llm_type, version, memory_used, start_time,
|
253
|
+
def create_llm_component(self, component_id, hash_id, name, llm_type, version, memory_used, start_time, input_data, output_data, cost={}, usage={}, error=None, parameters={}):
|
254
254
|
# Update total metrics
|
255
255
|
self.total_tokens += usage.get("total_tokens", 0)
|
256
256
|
self.total_cost += cost.get("total_cost", 0)
|
@@ -278,7 +278,7 @@ class LLMTracerMixin:
|
|
278
278
|
"type": "llm",
|
279
279
|
"name": name,
|
280
280
|
"start_time": start_time.isoformat(),
|
281
|
-
"end_time":
|
281
|
+
"end_time": datetime.now().astimezone().isoformat(),
|
282
282
|
"error": error,
|
283
283
|
"parent_id": self.current_agent_id.get(),
|
284
284
|
"info": {
|
@@ -332,7 +332,6 @@ class LLMTracerMixin:
|
|
332
332
|
result = await original_func(*args, **kwargs)
|
333
333
|
|
334
334
|
# Calculate resource usage
|
335
|
-
end_time = datetime.now().astimezone()
|
336
335
|
end_memory = psutil.Process().memory_info().rss
|
337
336
|
memory_used = max(0, end_memory - start_memory)
|
338
337
|
|
@@ -359,7 +358,6 @@ class LLMTracerMixin:
|
|
359
358
|
version="1.0.0",
|
360
359
|
memory_used=memory_used,
|
361
360
|
start_time=start_time,
|
362
|
-
end_time=end_time,
|
363
361
|
input_data=input_data,
|
364
362
|
output_data=extract_llm_output(result),
|
365
363
|
cost=cost,
|
@@ -381,8 +379,6 @@ class LLMTracerMixin:
|
|
381
379
|
|
382
380
|
# End tracking network calls for this component
|
383
381
|
self.end_component(component_id)
|
384
|
-
|
385
|
-
end_time = datetime.now().astimezone()
|
386
382
|
|
387
383
|
name = self.current_llm_call_name.get()
|
388
384
|
if name is None:
|
@@ -396,7 +392,6 @@ class LLMTracerMixin:
|
|
396
392
|
version="1.0.0",
|
397
393
|
memory_used=0,
|
398
394
|
start_time=start_time,
|
399
|
-
end_time=end_time,
|
400
395
|
input_data=extract_input_data(args, kwargs, None),
|
401
396
|
output_data=None,
|
402
397
|
error=error_component
|
@@ -420,7 +415,6 @@ class LLMTracerMixin:
|
|
420
415
|
self.start_component(component_id)
|
421
416
|
|
422
417
|
# Calculate resource usage
|
423
|
-
end_time = datetime.now().astimezone()
|
424
418
|
start_memory = psutil.Process().memory_info().rss
|
425
419
|
|
426
420
|
try:
|
@@ -456,7 +450,6 @@ class LLMTracerMixin:
|
|
456
450
|
version="1.0.0",
|
457
451
|
memory_used=memory_used,
|
458
452
|
start_time=start_time,
|
459
|
-
end_time=end_time,
|
460
453
|
input_data=input_data,
|
461
454
|
output_data=extract_llm_output(result),
|
462
455
|
cost=cost,
|
@@ -477,8 +470,6 @@ class LLMTracerMixin:
|
|
477
470
|
|
478
471
|
# End tracking network calls for this component
|
479
472
|
self.end_component(component_id)
|
480
|
-
|
481
|
-
end_time = datetime.now().astimezone()
|
482
473
|
|
483
474
|
name = self.current_llm_call_name.get()
|
484
475
|
if name is None:
|
@@ -495,7 +486,6 @@ class LLMTracerMixin:
|
|
495
486
|
version="1.0.0",
|
496
487
|
memory_used=memory_used,
|
497
488
|
start_time=start_time,
|
498
|
-
end_time=end_time,
|
499
489
|
input_data=extract_input_data(args, kwargs, None),
|
500
490
|
output_data=None,
|
501
491
|
error=error_component
|
@@ -75,7 +75,6 @@ class ToolTracerMixin:
|
|
75
75
|
result = func(*args, **kwargs)
|
76
76
|
|
77
77
|
# Calculate resource usage
|
78
|
-
end_time = datetime.now().astimezone()
|
79
78
|
end_memory = psutil.Process().memory_info().rss
|
80
79
|
memory_used = max(0, end_memory - start_memory)
|
81
80
|
|
@@ -91,7 +90,6 @@ class ToolTracerMixin:
|
|
91
90
|
version=version,
|
92
91
|
memory_used=memory_used,
|
93
92
|
start_time=start_time,
|
94
|
-
end_time=end_time,
|
95
93
|
input_data=self._sanitize_input(args, kwargs),
|
96
94
|
output_data=self._sanitize_output(result)
|
97
95
|
)
|
@@ -110,8 +108,6 @@ class ToolTracerMixin:
|
|
110
108
|
# End tracking network calls for this component
|
111
109
|
self.end_component(component_id)
|
112
110
|
|
113
|
-
end_time = datetime.now().astimezone()
|
114
|
-
|
115
111
|
tool_component = self.create_tool_component(
|
116
112
|
component_id=component_id,
|
117
113
|
hash_id=hash_id,
|
@@ -120,7 +116,6 @@ class ToolTracerMixin:
|
|
120
116
|
version=version,
|
121
117
|
memory_used=0,
|
122
118
|
start_time=start_time,
|
123
|
-
end_time=end_time,
|
124
119
|
input_data=self._sanitize_input(args, kwargs),
|
125
120
|
output_data=None,
|
126
121
|
error=error_component
|
@@ -144,7 +139,6 @@ class ToolTracerMixin:
|
|
144
139
|
result = await func(*args, **kwargs)
|
145
140
|
|
146
141
|
# Calculate resource usage
|
147
|
-
end_time = datetime.now().astimezone()
|
148
142
|
end_memory = psutil.Process().memory_info().rss
|
149
143
|
memory_used = max(0, end_memory - start_memory)
|
150
144
|
|
@@ -156,7 +150,6 @@ class ToolTracerMixin:
|
|
156
150
|
tool_type=tool_type,
|
157
151
|
version=version,
|
158
152
|
start_time=start_time,
|
159
|
-
end_time=end_time,
|
160
153
|
memory_used=memory_used,
|
161
154
|
input_data=self._sanitize_input(args, kwargs),
|
162
155
|
output_data=self._sanitize_output(result)
|
@@ -172,8 +165,6 @@ class ToolTracerMixin:
|
|
172
165
|
"details": {}
|
173
166
|
}
|
174
167
|
|
175
|
-
end_time = datetime.now().astimezone()
|
176
|
-
|
177
168
|
tool_component = self.create_tool_component(
|
178
169
|
component_id=component_id,
|
179
170
|
hash_id=hash_id,
|
@@ -181,7 +172,6 @@ class ToolTracerMixin:
|
|
181
172
|
tool_type=tool_type,
|
182
173
|
version=version,
|
183
174
|
start_time=start_time,
|
184
|
-
end_time=end_time,
|
185
175
|
memory_used=0,
|
186
176
|
input_data=self._sanitize_input(args, kwargs),
|
187
177
|
output_data=None,
|
@@ -202,7 +192,7 @@ class ToolTracerMixin:
|
|
202
192
|
"type": "tool",
|
203
193
|
"name": kwargs["name"],
|
204
194
|
"start_time": start_time.isoformat(),
|
205
|
-
"end_time":
|
195
|
+
"end_time": datetime.now().astimezone().isoformat(),
|
206
196
|
"error": kwargs.get("error"),
|
207
197
|
"parent_id": self.current_agent_id.get(),
|
208
198
|
"info": {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ragaai_catalyst
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.2b3
|
4
4
|
Summary: RAGA AI CATALYST
|
5
5
|
Author-email: Kiran Scaria <kiran.scaria@raga.ai>, Kedar Gaikwad <kedar.gaikwad@raga.ai>, Dushyant Mahajan <dushyant.mahajan@raga.ai>, Siddhartha Kosti <siddhartha.kosti@raga.ai>, Ritika Goel <ritika.goel@raga.ai>, Vijay Chaurasia <vijay.chaurasia@raga.ai>
|
6
6
|
Requires-Python: <3.13,>=3.9
|
@@ -26,12 +26,12 @@ ragaai_catalyst/tracers/agentic_tracing/tests/__init__.py,sha256=47DEQpj8HBSa-_T
|
|
26
26
|
ragaai_catalyst/tracers/agentic_tracing/tests/ai_travel_agent.py,sha256=S4rCcKzU_5SB62BYEbNn_1VbbTdG4396N8rdZ3ZNGcE,5654
|
27
27
|
ragaai_catalyst/tracers/agentic_tracing/tests/unique_decorator_test.py,sha256=Xk1cLzs-2A3dgyBwRRnCWs7Eubki40FVonwd433hPN8,4805
|
28
28
|
ragaai_catalyst/tracers/agentic_tracing/tracers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
ragaai_catalyst/tracers/agentic_tracing/tracers/agent_tracer.py,sha256=
|
29
|
+
ragaai_catalyst/tracers/agentic_tracing/tracers/agent_tracer.py,sha256=FOKJUMd48s8NFoTiZINeWBPA4IjMo5o1r9nuDEzIerA,20945
|
30
30
|
ragaai_catalyst/tracers/agentic_tracing/tracers/base.py,sha256=liLdiHdqc6BHH4YyvrdmX_fprXoeJchOqBwmzMJPrCc,14075
|
31
|
-
ragaai_catalyst/tracers/agentic_tracing/tracers/llm_tracer.py,sha256=
|
31
|
+
ragaai_catalyst/tracers/agentic_tracing/tracers/llm_tracer.py,sha256=j3-aie4aXT7dVciOdsCU6aiI4nEZ6y4yYJAbrEXgCtM,24484
|
32
32
|
ragaai_catalyst/tracers/agentic_tracing/tracers/main_tracer.py,sha256=tdwkpWx_eSyXtbpWTo9RG_cF_6q1F8oB0XyF4OiRKh8,10363
|
33
33
|
ragaai_catalyst/tracers/agentic_tracing/tracers/network_tracer.py,sha256=6FTA15xMnum9omM_0Jd9cMIuWdKu1gR5Tc8fOXAkP8E,10068
|
34
|
-
ragaai_catalyst/tracers/agentic_tracing/tracers/tool_tracer.py,sha256=
|
34
|
+
ragaai_catalyst/tracers/agentic_tracing/tracers/tool_tracer.py,sha256=Rln82_4BEL_4ULOIhWwu2-qGQ8J1yEaf9qKsEBuj76o,8427
|
35
35
|
ragaai_catalyst/tracers/agentic_tracing/tracers/user_interaction_tracer.py,sha256=wsCwTK7tM_L3mdNrcg5Mq3D1k07XCHZkhOB26kz_rLY,1472
|
36
36
|
ragaai_catalyst/tracers/agentic_tracing/upload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
37
|
ragaai_catalyst/tracers/agentic_tracing/upload/upload_agentic_traces.py,sha256=2Ab8odZXMpYFTh8a7tO53qx9RptF-xxyfgtFN0A6GzI,7690
|
@@ -54,7 +54,7 @@ ragaai_catalyst/tracers/instrumentators/llamaindex.py,sha256=SMrRlR4xM7k9HK43hak
|
|
54
54
|
ragaai_catalyst/tracers/instrumentators/openai.py,sha256=14R4KW9wQCR1xysLfsP_nxS7cqXrTPoD8En4MBAaZUU,379
|
55
55
|
ragaai_catalyst/tracers/utils/__init__.py,sha256=KeMaZtYaTojilpLv65qH08QmpYclfpacDA0U3wg6Ybw,64
|
56
56
|
ragaai_catalyst/tracers/utils/utils.py,sha256=ViygfJ7vZ7U0CTSA1lbxVloHp4NSlmfDzBRNCJuMhis,2374
|
57
|
-
ragaai_catalyst-2.1.
|
58
|
-
ragaai_catalyst-2.1.
|
59
|
-
ragaai_catalyst-2.1.
|
60
|
-
ragaai_catalyst-2.1.
|
57
|
+
ragaai_catalyst-2.1.2b3.dist-info/METADATA,sha256=Rp-1XiBpknVy7_4rWG9d7KKTV8ZBSoh7w78AT9uwYu4,1804
|
58
|
+
ragaai_catalyst-2.1.2b3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
59
|
+
ragaai_catalyst-2.1.2b3.dist-info/top_level.txt,sha256=HpgsdRgEJMk8nqrU6qdCYk3di7MJkDL0B19lkc7dLfM,16
|
60
|
+
ragaai_catalyst-2.1.2b3.dist-info/RECORD,,
|
File without changes
|
File without changes
|