lucidicai 1.2.20__tar.gz → 1.2.21__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.
- {lucidicai-1.2.20 → lucidicai-1.2.21}/PKG-INFO +1 -1
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/lucidic_span_processor.py +39 -1
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai.egg-info/PKG-INFO +1 -1
- {lucidicai-1.2.20 → lucidicai-1.2.21}/setup.py +1 -1
- {lucidicai-1.2.20 → lucidicai-1.2.21}/README.md +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/__init__.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/client.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/constants.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/decorators.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/errors.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/event.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/image_upload.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/model_pricing.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/session.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/singleton.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/step.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/streaming.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/__init__.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/base_provider.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/litellm_bridge.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/lucidic_exporter.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/openai_agents_instrumentor.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/opentelemetry_converter.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/otel_handlers.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/otel_init.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/otel_provider.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/pydantic_ai_handler.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/utils/__init__.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/utils/image_storage.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/utils/text_storage.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/utils/universal_image_interceptor.py +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai.egg-info/SOURCES.txt +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai.egg-info/dependency_links.txt +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai.egg-info/requires.txt +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai.egg-info/top_level.txt +0 -0
- {lucidicai-1.2.20 → lucidicai-1.2.21}/setup.cfg +0 -0
|
@@ -352,7 +352,21 @@ class LucidicSpanProcessor(SpanProcessor):
|
|
|
352
352
|
if tool_name:
|
|
353
353
|
if DEBUG:
|
|
354
354
|
logger.info(f"[SpanProcessor] Found openai agents tool call: {tool_name}")
|
|
355
|
-
|
|
355
|
+
|
|
356
|
+
# Extract and format tool parameters
|
|
357
|
+
tool_params_str = attributes.get('gen_ai.tool.parameters')
|
|
358
|
+
if tool_params_str:
|
|
359
|
+
try:
|
|
360
|
+
# Parse the JSON string
|
|
361
|
+
tool_params = json.loads(tool_params_str)
|
|
362
|
+
# Format the parameters nicely
|
|
363
|
+
formatted_params = json.dumps(tool_params, indent=2)
|
|
364
|
+
return f"Agent Tool Call: {tool_name}\nParameters:{formatted_params}"
|
|
365
|
+
except json.JSONDecodeError:
|
|
366
|
+
# If parsing fails, just include the raw string
|
|
367
|
+
return f"Agent Tool Call: {tool_name}\nParameters: {tool_params_str}"
|
|
368
|
+
else:
|
|
369
|
+
return f"Agent Tool Call: {tool_name}"
|
|
356
370
|
|
|
357
371
|
# Fallback
|
|
358
372
|
if DEBUG:
|
|
@@ -491,6 +505,30 @@ class LucidicSpanProcessor(SpanProcessor):
|
|
|
491
505
|
if DEBUG:
|
|
492
506
|
logger.info(f"[SpanProcessor -- Agent Tool Call Response Received]") # span attributes: {attributes}")
|
|
493
507
|
|
|
508
|
+
# Check the operation type to determine what kind of response this is
|
|
509
|
+
operation_name = attributes.get('gen_ai.operation.name')
|
|
510
|
+
tool_result = attributes.get('gen_ai.tool.result')
|
|
511
|
+
agent_name = attributes.get('gen_ai.agent.name')
|
|
512
|
+
|
|
513
|
+
# For function/tool spans, just show the tool result
|
|
514
|
+
if operation_name == 'function' and tool_result:
|
|
515
|
+
return f"Tool Result: {tool_result}"
|
|
516
|
+
|
|
517
|
+
# For agent spans or response spans without tool results, this might be a handoff
|
|
518
|
+
# We can check if there's actual completion content
|
|
519
|
+
completion_content = None
|
|
520
|
+
for i in range(10): # Check up to 10 completions
|
|
521
|
+
content = attributes.get(f'gen_ai.completion.{i}.content')
|
|
522
|
+
if content:
|
|
523
|
+
completion_content = content
|
|
524
|
+
break
|
|
525
|
+
|
|
526
|
+
# If we have completion content, return it (this is the actual agent response)
|
|
527
|
+
if completion_content:
|
|
528
|
+
return completion_content
|
|
529
|
+
|
|
530
|
+
# Otherwise, this is likely a handoff scenario
|
|
531
|
+
# Since we can't determine the next agent, just indicate a handoff occurred
|
|
494
532
|
return "Agent Handoff"
|
|
495
533
|
|
|
496
534
|
return "Response received"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/utils/universal_image_interceptor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|