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.
Files changed (36) hide show
  1. {lucidicai-1.2.20 → lucidicai-1.2.21}/PKG-INFO +1 -1
  2. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/lucidic_span_processor.py +39 -1
  3. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai.egg-info/PKG-INFO +1 -1
  4. {lucidicai-1.2.20 → lucidicai-1.2.21}/setup.py +1 -1
  5. {lucidicai-1.2.20 → lucidicai-1.2.21}/README.md +0 -0
  6. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/__init__.py +0 -0
  7. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/client.py +0 -0
  8. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/constants.py +0 -0
  9. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/decorators.py +0 -0
  10. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/errors.py +0 -0
  11. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/event.py +0 -0
  12. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/image_upload.py +0 -0
  13. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/model_pricing.py +0 -0
  14. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/session.py +0 -0
  15. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/singleton.py +0 -0
  16. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/step.py +0 -0
  17. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/streaming.py +0 -0
  18. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/__init__.py +0 -0
  19. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/base_provider.py +0 -0
  20. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/litellm_bridge.py +0 -0
  21. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/lucidic_exporter.py +0 -0
  22. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/openai_agents_instrumentor.py +0 -0
  23. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/opentelemetry_converter.py +0 -0
  24. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/otel_handlers.py +0 -0
  25. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/otel_init.py +0 -0
  26. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/otel_provider.py +0 -0
  27. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/pydantic_ai_handler.py +0 -0
  28. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/utils/__init__.py +0 -0
  29. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/utils/image_storage.py +0 -0
  30. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/utils/text_storage.py +0 -0
  31. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai/telemetry/utils/universal_image_interceptor.py +0 -0
  32. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai.egg-info/SOURCES.txt +0 -0
  33. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai.egg-info/dependency_links.txt +0 -0
  34. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai.egg-info/requires.txt +0 -0
  35. {lucidicai-1.2.20 → lucidicai-1.2.21}/lucidicai.egg-info/top_level.txt +0 -0
  36. {lucidicai-1.2.20 → lucidicai-1.2.21}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lucidicai
3
- Version: 1.2.20
3
+ Version: 1.2.21
4
4
  Summary: Lucidic AI Python SDK
5
5
  Author: Andy Liang
6
6
  Author-email: andy@lucidic.ai
@@ -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
- return f"Agent Tool Call: {tool_name}"
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"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lucidicai
3
- Version: 1.2.20
3
+ Version: 1.2.21
4
4
  Summary: Lucidic AI Python SDK
5
5
  Author: Andy Liang
6
6
  Author-email: andy@lucidic.ai
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="lucidicai",
5
- version="1.2.20",
5
+ version="1.2.21",
6
6
  packages=find_packages(),
7
7
  install_requires=[
8
8
  "requests>=2.25.1",
File without changes
File without changes
File without changes