ragaai-catalyst 2.1.5b31__tar.gz → 2.1.5b32__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 (166) hide show
  1. {ragaai_catalyst-2.1.5b31/ragaai_catalyst.egg-info → ragaai_catalyst-2.1.5b32}/PKG-INFO +1 -1
  2. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/travel_agent/config.py +1 -1
  3. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/travel_agent/main.py +1 -7
  4. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/pyproject.toml +1 -1
  5. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/ragaai_catalyst.py +0 -23
  6. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tracers/base.py +42 -19
  7. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tracers/llm_tracer.py +9 -5
  8. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_agentic_traces.py +11 -73
  9. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_code.py +1 -3
  10. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/create_dataset_schema.py +0 -1
  11. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/llm_utils.py +16 -10
  12. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/tracer.py +14 -10
  13. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32/ragaai_catalyst.egg-info}/PKG-INFO +1 -1
  14. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/upload_trace_zip_automation.py +49 -41
  15. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  16. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  17. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  18. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/.gitignore +0 -0
  19. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/LICENSE +0 -0
  20. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/README.md +0 -0
  21. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/dataset_management.md +0 -0
  22. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/autheticate.gif +0 -0
  23. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/create_project.gif +0 -0
  24. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/custom_metrics.png +0 -0
  25. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/dataset.gif +0 -0
  26. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/dataset.png +0 -0
  27. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/evaluation.gif +0 -0
  28. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/evaluation.png +0 -0
  29. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/guardrails.png +0 -0
  30. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/last_main.png +0 -0
  31. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/main.png +0 -0
  32. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/projects_new.png +0 -0
  33. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/img/trace_comp.png +0 -0
  34. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/prompt_management.md +0 -0
  35. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/docs/trace_management.md +0 -0
  36. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/FinancialAnalysisSystem.ipynb +0 -0
  37. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/TravelPlanner.ipynb +0 -0
  38. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/agentic_rag.py +0 -0
  39. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/custom_tracer_example.py +0 -0
  40. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/customer_support.py +0 -0
  41. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/finance.py +0 -0
  42. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/langgraph_examples/agentic_rag.py +0 -0
  43. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/langgraph_examples/customer_support.py +0 -0
  44. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/langgraph_examples/multi_tool.py +0 -0
  45. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/langgraph_examples/planning_agent.py +0 -0
  46. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/langgraph_multi_tools.py +0 -0
  47. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/azureopenai_react_agent.py +0 -0
  48. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/function_calling_agent.ipynb +0 -0
  49. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/joke_gen_critique.py +0 -0
  50. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/joke_gen_critique_anthropic.py +0 -0
  51. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/joke_gen_critique_async.py +0 -0
  52. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/joke_gen_critique_azureopenai.py +0 -0
  53. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/joke_gen_critique_gemini.py +0 -0
  54. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/joke_gen_critique_litellm.py +0 -0
  55. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/joke_gen_critque_vertex.py +0 -0
  56. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/react_agent.ipynb +0 -0
  57. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/llamaindex_examples/tool_call_agent.py +0 -0
  58. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/planning_agent.py +0 -0
  59. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/prompt_management_litellm.ipynb +0 -0
  60. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/prompt_management_openai.ipynb +0 -0
  61. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/sync_sample_call.py +0 -0
  62. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/travel_agent/agents.py +0 -0
  63. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/examples/travel_agent/tools.py +0 -0
  64. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/__init__.py +0 -0
  65. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/_version.py +0 -0
  66. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/dataset.py +0 -0
  67. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/evaluation.py +0 -0
  68. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/experiment.py +0 -0
  69. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/guard_executor.py +0 -0
  70. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/guardrails_manager.py +0 -0
  71. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/internal_api_completion.py +0 -0
  72. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/prompt_manager.py +0 -0
  73. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/proxy_call.py +0 -0
  74. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/__init__.py +0 -0
  75. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/config/detectors.toml +0 -0
  76. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/data_generator/scenario_generator.py +0 -0
  77. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/data_generator/test_case_generator.py +0 -0
  78. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/evaluator.py +0 -0
  79. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/llm_generator.py +0 -0
  80. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/llm_generator_old.py +0 -0
  81. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/red_teaming.py +0 -0
  82. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/requirements.txt +0 -0
  83. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/tests/grok.ipynb +0 -0
  84. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/tests/stereotype.ipynb +0 -0
  85. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/upload_result.py +0 -0
  86. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/utils/issue_description.py +0 -0
  87. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming/utils/rt.png +0 -0
  88. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/redteaming_old.py +0 -0
  89. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/synthetic_data_generation.py +0 -0
  90. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/__init__.py +0 -0
  91. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/README.md +0 -0
  92. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/__init__.py +0 -0
  93. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/data/__init__.py +0 -0
  94. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/data/data_structure.py +0 -0
  95. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tests/FinancialAnalysisSystem.ipynb +0 -0
  96. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tests/GameActivityEventPlanner.ipynb +0 -0
  97. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tests/TravelPlanner.ipynb +0 -0
  98. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tests/__init__.py +0 -0
  99. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tests/ai_travel_agent.py +0 -0
  100. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tests/unique_decorator_test.py +0 -0
  101. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tracers/__init__.py +0 -0
  102. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tracers/agent_tracer.py +0 -0
  103. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tracers/custom_tracer.py +0 -0
  104. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tracers/langgraph_tracer.py +0 -0
  105. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tracers/main_tracer.py +0 -0
  106. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tracers/network_tracer.py +0 -0
  107. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tracers/tool_tracer.py +0 -0
  108. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/tracers/user_interaction_tracer.py +0 -0
  109. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/upload/__init__.py +0 -0
  110. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_local_metric.py +0 -0
  111. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_trace_metric.py +0 -0
  112. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/__init__.py +0 -0
  113. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/api_utils.py +0 -0
  114. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/file_name_tracker.py +0 -0
  115. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/generic.py +0 -0
  116. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/get_user_trace_metrics.py +0 -0
  117. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/model_costs.json +0 -0
  118. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/span_attributes.py +0 -0
  119. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/supported_llm_provider.toml +0 -0
  120. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/system_monitor.py +0 -0
  121. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/trace_utils.py +0 -0
  122. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/unique_decorator.py +0 -0
  123. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/agentic_tracing/utils/zip_list_of_unique_files.py +0 -0
  124. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/distributed.py +0 -0
  125. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/exporters/__init__.py +0 -0
  126. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/exporters/file_span_exporter.py +0 -0
  127. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/exporters/raga_exporter.py +0 -0
  128. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/instrumentators/__init__.py +0 -0
  129. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/instrumentators/langchain.py +0 -0
  130. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/instrumentators/llamaindex.py +0 -0
  131. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/instrumentators/openai.py +0 -0
  132. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/langchain_callback.py +0 -0
  133. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/llamaindex_callback.py +0 -0
  134. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/llamaindex_instrumentation.py +0 -0
  135. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/upload_traces.py +0 -0
  136. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/utils/__init__.py +0 -0
  137. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/utils/convert_langchain_callbacks_output.py +0 -0
  138. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/utils/convert_llama_instru_callback.py +0 -0
  139. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/utils/extraction_logic_llama_index.py +0 -0
  140. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/utils/langchain_tracer_extraction_logic.py +0 -0
  141. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/tracers/utils/utils.py +0 -0
  142. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst/utils.py +0 -0
  143. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst.egg-info/SOURCES.txt +0 -0
  144. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst.egg-info/dependency_links.txt +0 -0
  145. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst.egg-info/requires.txt +0 -0
  146. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/ragaai_catalyst.egg-info/top_level.txt +0 -0
  147. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/requirements.txt +0 -0
  148. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/setup.cfg +0 -0
  149. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/autonomous_research_agent/.env.example +0 -0
  150. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/autonomous_research_agent/agents/base_agent.py +0 -0
  151. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/autonomous_research_agent/agents/coordinator.py +0 -0
  152. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/autonomous_research_agent/agents/discovery.py +0 -0
  153. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/autonomous_research_agent/agents/synthesis.py +0 -0
  154. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/autonomous_research_agent/research_script.py +0 -0
  155. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/autonomous_research_agent/utils/llm.py +0 -0
  156. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_base_tracer_add_metrics.py +0 -0
  157. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_base_tracer_metrics.py +0 -0
  158. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_configuration.py +0 -0
  159. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_dataset.py +0 -0
  160. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_evaluation.py +0 -0
  161. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_evaluation_metrics.py +0 -0
  162. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_langchain_tracing.py +0 -0
  163. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_llm_providers.py +0 -0
  164. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_prompt_manager.py +0 -0
  165. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_redteaming.py +0 -0
  166. {ragaai_catalyst-2.1.5b31 → ragaai_catalyst-2.1.5b32}/test/test_catalyst/test_synthetic_data_generation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ragaai_catalyst
3
- Version: 2.1.5b31
3
+ Version: 2.1.5b32
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>, Tushar Kumar <tushar.kumar@raga.ai>
6
6
  Requires-Python: <3.13,>=3.9
@@ -15,7 +15,7 @@ def initialize_tracing():
15
15
  )
16
16
 
17
17
  tracer = Tracer(
18
- project_name="UploadProcess",
18
+ project_name="swarnendu-4",
19
19
  dataset_name="travel_agent_dataset",
20
20
  tracer_type="Agentic",
21
21
  )
@@ -1,9 +1,4 @@
1
- import sys
2
- sys.path.append('.')
3
-
4
- import os
5
- os.environ["DEBUG"] = "1"
6
-
1
+ from dotenv import load_dotenv
7
2
  from tools import (
8
3
  llm_call,
9
4
  weather_tool,
@@ -15,7 +10,6 @@ from config import initialize_tracing
15
10
  from ragaai_catalyst import trace_agent, current_span
16
11
 
17
12
  # Load environment variables
18
- from dotenv import load_dotenv
19
13
  load_dotenv()
20
14
 
21
15
  # Initialize distributed tracing
@@ -8,7 +8,7 @@ description = "RAGA AI CATALYST"
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.9,<3.13"
10
10
  # license = {file = "LICENSE"}
11
- version = "2.1.5.b31"
11
+ version = "2.1.5.b32"
12
12
  authors = [
13
13
  {name = "Kiran Scaria", email = "kiran.scaria@raga.ai"},
14
14
  {name = "Kedar Gaikwad", email = "kedar.gaikwad@raga.ai"},
@@ -3,23 +3,12 @@ import logging
3
3
  import requests
4
4
  from typing import Dict, Optional, Union
5
5
  import re
6
- import threading
7
6
  logger = logging.getLogger("RagaAICatalyst")
8
7
 
9
8
 
10
9
  class RagaAICatalyst:
11
10
  BASE_URL = None
12
11
  TIMEOUT = 10 # Default timeout in seconds
13
- _instance = None
14
- _lock = threading.Lock()
15
-
16
- def __new__(cls, *args, **kwargs):
17
- if not cls._instance:
18
- with cls._lock:
19
- if not cls._instance:
20
- cls._instance = super(RagaAICatalyst, cls).__new__(cls)
21
- cls._instance._initialized = False
22
- return cls._instance
23
12
 
24
13
  def __init__(
25
14
  self,
@@ -44,18 +33,6 @@ class RagaAICatalyst:
44
33
  Returns:
45
34
  None
46
35
  """
47
- if self._initialized:
48
- return
49
-
50
- with self._lock:
51
- if not self._initialized:
52
- self.access_key = access_key
53
- self.secret_key = secret_key
54
- self.api_keys = api_keys or {}
55
- self.base_url = base_url
56
- if self.base_url:
57
- RagaAICatalyst.BASE_URL = self.base_url
58
- self._initialized = True
59
36
 
60
37
  if not access_key or not secret_key:
61
38
  logger.error(
@@ -18,9 +18,13 @@ from ragaai_catalyst.tracers.agentic_tracing.data.data_structure import (
18
18
  Resources,
19
19
  Component,
20
20
  )
21
+ from ragaai_catalyst.tracers.agentic_tracing.upload.upload_agentic_traces import UploadAgenticTraces
22
+ from ragaai_catalyst.tracers.agentic_tracing.upload.upload_code import upload_code
23
+ from ragaai_catalyst.tracers.agentic_tracing.upload.upload_trace_metric import upload_trace_metric
21
24
  from ragaai_catalyst.tracers.agentic_tracing.utils.file_name_tracker import TrackName
22
25
  from ragaai_catalyst.tracers.agentic_tracing.utils.zip_list_of_unique_files import zip_list_of_unique_files
23
26
  from ragaai_catalyst.tracers.agentic_tracing.utils.span_attributes import SpanAttributes
27
+ from ragaai_catalyst.tracers.agentic_tracing.utils.create_dataset_schema import create_dataset_schema_with_trace
24
28
  from ragaai_catalyst.tracers.agentic_tracing.utils.system_monitor import SystemMonitor
25
29
 
26
30
  import logging
@@ -175,10 +179,7 @@ class BaseTracer:
175
179
  )
176
180
 
177
181
  def stop(self):
178
- """Stop the trace and save to JSON file.
179
- Trace upload will happen in a separate process and continue even if the main program exits.
180
- """
181
- from ..upload.trace_upload_manager import TraceUploadManager, TraceUploadTask
182
+ """Stop the trace and save to JSON file"""
182
183
  if hasattr(self, "trace"):
183
184
  self.trace.data[0]["end_time"] = datetime.now().astimezone().isoformat()
184
185
  self.trace.end_time = datetime.now().astimezone().isoformat()
@@ -262,25 +263,45 @@ class BaseTracer:
262
263
 
263
264
  logger.info(" Traces saved successfully.")
264
265
  logger.debug(f"Trace saved to {filepath}")
265
- # Submit trace upload task to the manager
266
- upload_task = TraceUploadTask(
267
- json_file_path=str(filepath),
268
- project_name=self.project_name,
269
- project_id=self.project_id,
266
+ # Upload traces
267
+
268
+ json_file_path = str(filepath)
269
+ project_name = self.project_name
270
+ project_id = self.project_id
271
+ dataset_name = self.dataset_name
272
+ user_detail = self.user_details
273
+ base_url = RagaAICatalyst.BASE_URL
274
+
275
+ ## create dataset schema
276
+ response = create_dataset_schema_with_trace(
277
+ dataset_name=dataset_name, project_name=project_name
278
+ )
279
+
280
+ ##Upload trace metrics
281
+ response = upload_trace_metric(
282
+ json_file_path=json_file_path,
270
283
  dataset_name=self.dataset_name,
271
- user_detail=self.user_details,
272
- base_url=RagaAICatalyst.BASE_URL,
284
+ project_name=self.project_name,
285
+ )
286
+
287
+ upload_traces = UploadAgenticTraces(
288
+ json_file_path=json_file_path,
289
+ project_name=project_name,
290
+ project_id=project_id,
291
+ dataset_name=dataset_name,
292
+ user_detail=user_detail,
293
+ base_url=base_url,
294
+ )
295
+ upload_traces.upload_agentic_traces()
296
+
297
+ # Upload Codehash
298
+ response = upload_code(
273
299
  hash_id=hash_id,
274
300
  zip_path=zip_path,
275
- max_retries=2, # Allow 2 retries
276
- retry_delay=1.0 # 1 second between retries
301
+ project_name=project_name,
302
+ dataset_name=dataset_name,
277
303
  )
278
-
279
- # Get upload manager singleton and submit task
280
- upload_manager = TraceUploadManager()
281
- upload_manager.submit_upload(upload_task)
282
-
283
- logger.info(f"Trace upload task submitted and will continue in background")
304
+ print(response)
284
305
 
285
306
  # Cleanup
286
307
  self.components = []
@@ -878,6 +899,8 @@ class BaseTracer:
878
899
 
879
900
  return {"workflow": sorted_interactions}
880
901
 
902
+ # TODO: Add support for execute metrics. Maintain list of all metrics to be added for this span
903
+
881
904
  def execute_metrics(self,
882
905
  name: str,
883
906
  model: str,
@@ -12,6 +12,7 @@ import contextvars
12
12
  import traceback
13
13
  import importlib
14
14
  import sys
15
+ from litellm import model_cost
15
16
  import logging
16
17
 
17
18
  try:
@@ -47,9 +48,12 @@ class LLMTracerMixin:
47
48
  super().__init__(*args, **kwargs)
48
49
  self.file_tracker = TrackName()
49
50
  self.patches = []
50
- # Get model costs from manager
51
- from ..utils.cost_manager import cost_manager
52
- self.cost_manager = cost_manager # Store reference to cost manager
51
+ try:
52
+ self.model_costs = model_cost
53
+ except Exception as e:
54
+ self.model_costs = {
55
+ "default": {"input_cost_per_token": 0.0, "output_cost_per_token": 0.0}
56
+ }
53
57
  self.MAX_PARAMETERS_TO_DISPLAY = 10
54
58
  self.current_llm_call_name = contextvars.ContextVar(
55
59
  "llm_call_name", default=None
@@ -770,7 +774,7 @@ class LLMTracerMixin:
770
774
  token_usage = extract_token_usage(result)
771
775
  else:
772
776
  token_usage = extract_token_usage(result)
773
- cost = calculate_llm_cost(token_usage, model_name)
777
+ cost = calculate_llm_cost(token_usage, model_name, self.model_costs, self.model_custom_cost)
774
778
  parameters = extract_parameters(kwargs)
775
779
  input_data = extract_input_data(args, kwargs, result)
776
780
 
@@ -879,7 +883,7 @@ class LLMTracerMixin:
879
883
  token_usage = extract_token_usage(result)
880
884
  else:
881
885
  token_usage = extract_token_usage(result)
882
- cost = calculate_llm_cost(token_usage, model_name)
886
+ cost = calculate_llm_cost(token_usage, model_name, self.model_costs, self.model_custom_cost)
883
887
  parameters = extract_parameters(kwargs)
884
888
  input_data = extract_input_data(args, kwargs, result)
885
889
 
@@ -2,7 +2,6 @@ import requests
2
2
  import json
3
3
  import os
4
4
  from datetime import datetime
5
- from urllib.parse import urlparse, urlunparse
6
5
 
7
6
 
8
7
  class UploadAgenticTraces:
@@ -21,71 +20,12 @@ class UploadAgenticTraces:
21
20
  self.base_url = base_url
22
21
  self.timeout = 30
23
22
 
24
- @staticmethod
25
- def _normalize_url_core(url):
26
- """Normalize the core domain of a URL by removing common prefixes and handling ports.
27
-
28
- Args:
29
- url (str): The URL to normalize
30
-
31
- Returns:
32
- str: The normalized core domain
33
- """
34
- parsed = urlparse(url.rstrip('/'))
35
- netloc = parsed.netloc.lower()
36
-
37
- # Split host and port
38
- host = netloc.split(':')[0]
39
-
40
- # Remove common prefixes
41
- if host.startswith('www.'):
42
- host = host[4:]
43
-
44
- return host
45
-
46
- def _reconcile_urls(self, presigned_url, base_url):
47
- """Reconcile two URLs by using the base URL's core if they differ.
48
-
49
- Args:
50
- presigned_url (str): The presigned URL from the server
51
- base_url (str): The base URL to compare against
52
-
53
- Returns:
54
- str: The reconciled URL
55
- """
56
- # Get normalized core domains
57
- presigned_core = self._normalize_url_core(presigned_url)
58
- base_core = self._normalize_url_core(base_url)
59
-
60
- # If cores are same, return original presigned URL
61
- if presigned_core == base_core:
62
- return presigned_url
63
-
64
- # Parse URLs
65
- parsed_base = urlparse(base_url.rstrip('/'))
66
- parsed_presigned = urlparse(presigned_url)
67
-
68
- # Remove API version paths from base_url if present
69
- base_path = parsed_base.path
70
- for suffix in ['/api', '/v1']:
71
- if base_path.endswith(suffix):
72
- base_path = base_path[:-len(suffix)]
73
-
74
- # Construct new URL using components
75
- return urlunparse((
76
- parsed_base.scheme,
77
- parsed_base.netloc,
78
- parsed_presigned.path, # Use presigned path
79
- parsed_presigned.params,
80
- parsed_presigned.query,
81
- parsed_presigned.fragment
82
- ))
83
-
23
+
84
24
  def _get_presigned_url(self):
85
25
  payload = json.dumps({
86
- "datasetName": self.dataset_name,
87
- "numFiles": 1,
88
- })
26
+ "datasetName": self.dataset_name,
27
+ "numFiles": 1,
28
+ })
89
29
  headers = {
90
30
  "Content-Type": "application/json",
91
31
  "Authorization": f"Bearer {os.getenv('RAGAAI_CATALYST_TOKEN')}",
@@ -93,16 +33,14 @@ class UploadAgenticTraces:
93
33
  }
94
34
 
95
35
  try:
96
- response = requests.request(
97
- "GET",
98
- f"{self.base_url}/v1/llm/presigned-url",
99
- headers=headers,
100
- data=payload,
101
- timeout=self.timeout
102
- )
36
+ response = requests.request("GET",
37
+ f"{self.base_url}/v1/llm/presigned-url",
38
+ headers=headers,
39
+ data=payload,
40
+ timeout=self.timeout)
103
41
  if response.status_code == 200:
104
- presigned_url = response.json()["data"]["presignedUrls"][0]
105
- return self._reconcile_urls(presigned_url, self.base_url)
42
+ presignedUrls = response.json()["data"]["presignedUrls"][0]
43
+ return presignedUrls
106
44
  except requests.exceptions.RequestException as e:
107
45
  print(f"Error while getting presigned url: {e}")
108
46
  return None
@@ -4,7 +4,6 @@ import json
4
4
  import os
5
5
  import logging
6
6
  from ragaai_catalyst.ragaai_catalyst import RagaAICatalyst
7
- from .upload_agentic_traces import UploadAgenticTraces
8
7
  logger = logging.getLogger(__name__)
9
8
 
10
9
  def upload_code(hash_id, zip_path, project_name, dataset_name):
@@ -62,8 +61,7 @@ def _fetch_presigned_url(project_name, dataset_name):
62
61
  timeout=99999)
63
62
 
64
63
  if response.status_code == 200:
65
- presigned_url = response.json()["data"]["presignedUrls"][0]
66
- return UploadAgenticTraces._reconcile_urls(presigned_url, RagaAICatalyst.BASE_URL)
64
+ return response.json()["data"]["presignedUrls"][0]
67
65
  else:
68
66
  raise Exception(f"Failed to fetch code hashes: {response.json()['message']}")
69
67
  except requests.exceptions.RequestException as e:
@@ -6,7 +6,6 @@ from ragaai_catalyst.tracers.agentic_tracing.tracers.base import RagaAICatalyst
6
6
 
7
7
  def create_dataset_schema_with_trace(project_name, dataset_name):
8
8
  def make_request():
9
- import pdb; pdb.set_trace()
10
9
  headers = {
11
10
  "Content-Type": "application/json",
12
11
  "Authorization": f"Bearer {os.getenv('RAGAAI_CATALYST_TOKEN')}",
@@ -4,6 +4,7 @@ from .trace_utils import (
4
4
  convert_usage_to_dict,
5
5
  )
6
6
  from importlib import resources
7
+ from litellm import model_cost
7
8
  import json
8
9
  import os
9
10
  import asyncio
@@ -304,8 +305,11 @@ def extract_input_data(args, kwargs, result):
304
305
  }
305
306
 
306
307
 
307
- def calculate_llm_cost(token_usage, model_name, model_costs=None, model_custom_cost=None):
308
+ def calculate_llm_cost(token_usage, model_name, model_costs, model_custom_cost=None):
308
309
  """Calculate cost based on token usage and model"""
310
+ if model_custom_cost is None:
311
+ model_custom_cost = {}
312
+ model_costs.update(model_custom_cost)
309
313
  if not isinstance(token_usage, dict):
310
314
  token_usage = {
311
315
  "prompt_tokens": 0,
@@ -313,17 +317,20 @@ def calculate_llm_cost(token_usage, model_name, model_costs=None, model_custom_c
313
317
  "total_tokens": token_usage if isinstance(token_usage, (int, float)) else 0
314
318
  }
315
319
 
316
- # Get model costs from manager
317
- from .cost_manager import cost_manager
318
- model_cost = cost_manager.get_cost(model_name)
319
- if not model_cost:
320
+ # Get model costs, defaulting to default costs if unknown
321
+ model_cost = model_cost = model_costs.get(model_name, {
322
+ "input_cost_per_token": 0.0,
323
+ "output_cost_per_token": 0.0
324
+ })
325
+ if model_cost['input_cost_per_token'] == 0.0 and model_cost['output_cost_per_token'] == 0.0:
320
326
  provide_name = model_name.split('-')[0]
321
327
  if provide_name == 'azure':
322
328
  model_name = os.path.join('azure', '-'.join(model_name.split('-')[1:]))
323
- model_cost = {
329
+
330
+ model_cost = model_costs.get(model_name, {
324
331
  "input_cost_per_token": 0.0,
325
332
  "output_cost_per_token": 0.0
326
- }
333
+ })
327
334
 
328
335
  input_cost = (token_usage.get("prompt_tokens", 0)) * model_cost.get("input_cost_per_token", 0.0)
329
336
  output_cost = (token_usage.get("completion_tokens", 0)) * model_cost.get("output_cost_per_token", 0.0)
@@ -549,9 +556,8 @@ def extract_llm_data(args, kwargs, result):
549
556
 
550
557
  token_usage = extract_token_usage(result)
551
558
 
552
- # Get model costs from manager
553
- from .cost_manager import cost_manager
554
- model_costs = cost_manager.costs
559
+ # Load model costs
560
+ model_costs = model_cost
555
561
 
556
562
  # Calculate cost
557
563
  cost = calculate_llm_cost(token_usage, model_name, model_costs)
@@ -6,6 +6,7 @@ import logging
6
6
  import asyncio
7
7
  import aiohttp
8
8
  import requests
9
+ from litellm import model_cost
9
10
 
10
11
  from contextlib import contextmanager
11
12
  from concurrent.futures import ThreadPoolExecutor
@@ -128,6 +129,7 @@ class Tracer(AgenticTracing):
128
129
  self.timeout = 30
129
130
  self.num_projects = 100
130
131
  self.start_time = datetime.datetime.now().astimezone().isoformat()
132
+ self.model_cost_dict = model_cost
131
133
  self.user_context = "" # Initialize user_context to store context from add_context
132
134
 
133
135
  try:
@@ -181,8 +183,8 @@ class Tracer(AgenticTracing):
181
183
  Args:
182
184
  cost_config (dict): Dictionary containing model cost configuration with keys:
183
185
  - model_name (str): Name of the model
184
- - input_cost_per_million_token (float): Cost per million input tokens
185
- - output_cost_per_million_token (float): Cost per million output tokens
186
+ - input_cost_per_token (float): Cost per input token
187
+ - output_cost_per_token (float): Cost per output token
186
188
 
187
189
  Example:
188
190
  tracer.set_model_cost({
@@ -191,14 +193,17 @@ class Tracer(AgenticTracing):
191
193
  "output_cost_per_million_token": 2.40
192
194
  })
193
195
  """
194
- from .agentic_tracing.utils.cost_manager import cost_manager
195
- cost_manager.set_model_cost(cost_config)
196
-
197
- # Also update local model_custom_cost for backward compatibility
196
+ if not isinstance(cost_config, dict):
197
+ raise TypeError("cost_config must be a dictionary")
198
+
199
+ required_keys = {"model_name", "input_cost_per_million_token", "output_cost_per_million_token"}
200
+ if not all(key in cost_config for key in required_keys):
201
+ raise ValueError(f"cost_config must contain all required keys: {required_keys}")
202
+
198
203
  model_name = cost_config["model_name"]
199
204
  self.model_custom_cost[model_name] = {
200
- "input_cost_per_token": float(cost_config["input_cost_per_million_token"]) / 1000000,
201
- "output_cost_per_token": float(cost_config["output_cost_per_million_token"]) / 1000000
205
+ "input_cost_per_token": float(cost_config["input_cost_per_million_token"])/ 1000000,
206
+ "output_cost_per_token": float(cost_config["output_cost_per_million_token"]) /1000000
202
207
  }
203
208
 
204
209
 
@@ -307,8 +312,7 @@ class Tracer(AgenticTracing):
307
312
  # Add cost if possible
308
313
  if additional_metadata.get('model_name'):
309
314
  try:
310
- from litellm import model_cost
311
- model_cost_data = model_cost[additional_metadata['model_name']]
315
+ model_cost_data = self.model_cost_dict[additional_metadata['model_name']]
312
316
  if 'tokens' in additional_metadata and all(k in additional_metadata['tokens'] for k in ['prompt', 'completion']):
313
317
  prompt_cost = additional_metadata["tokens"]["prompt"]*model_cost_data["input_cost_per_token"]
314
318
  completion_cost = additional_metadata["tokens"]["completion"]*model_cost_data["output_cost_per_token"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ragaai_catalyst
3
- Version: 2.1.5b31
3
+ Version: 2.1.5b32
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>, Tushar Kumar <tushar.kumar@raga.ai>
6
6
  Requires-Python: <3.13,>=3.9
@@ -350,8 +350,7 @@ def _fetch_presigned_url(project_name, dataset_name):
350
350
  timeout=300)
351
351
 
352
352
  if response.status_code == 200:
353
- presigned_url = response.json()["data"]["presignedUrls"][0]
354
- return UploadAgenticTraces._reconcile_urls(presigned_url, RagaAICatalyst.BASE_URL)
353
+ return response.json()["data"]["presignedUrls"][0]
355
354
  else:
356
355
  raise Exception(f"Failed to fetch code hashes: {response.json()['message']}")
357
356
  except requests.exceptions.RequestException as e:
@@ -531,44 +530,53 @@ def get_user_trace_metrics(project_name, dataset_name):
531
530
  print(f"Error fetching traces metrics: {e}")
532
531
  return None
533
532
 
534
- # # Main execution
535
- # if __name__ == "__main__":
536
- # access_key = os.getenv('RAGAAI_ACCESS_KEY')
537
- # secret_key = os.getenv('RAGAAI_SECRET_KEY')
538
- # base_url = os.getenv('RAGAAI_BASE_URL')
539
- # json_file_path = os.getenv('RAGAAI_JSON_FILE_PATH')
533
+ # Main execution
534
+ if __name__ == "__main__":
535
+ access_key = os.getenv('RAGAAI_ACCESS_KEY')
536
+ secret_key = os.getenv('RAGAAI_SECRET_KEY')
537
+ base_url = os.getenv('RAGAAI_BASE_URL')
538
+ json_file_path = os.getenv('RAGAAI_JSON_FILE_PATH')
539
+
540
+ project_name = 'project_name'
541
+ usecase = "Agentic Application"
542
+ dataset_name = "dataset_name"
543
+ zip_path = "zip_path"
544
+
545
+ auth = RagaAICatalyst(access_key=access_key, secret_key=secret_key, base_url=base_url, api_keys=None)
546
+ #if want to create project
547
+ # auth.create_project(
548
+ # project_name=project_name,
549
+ # usecase=usecase,
550
+ # type="llm",
551
+ # )
552
+
553
+ project_list, project_id = auth.list_projects()
554
+
555
+
556
+ response = create_dataset_schema_with_trace(project_name=project_name, dataset_name=dataset_name)
557
+
558
+ response = upload_trace_metric(
559
+ json_file_path=json_file_path,
560
+ dataset_name=dataset_name,
561
+ project_name=project_name,
562
+ )
563
+
564
+ upload_traces = UploadAgenticTraces(
565
+ json_file_path=json_file_path,
566
+ project_name=project_name,
567
+ project_id=project_id,
568
+ dataset_name=dataset_name,
569
+ user_detail=None,
570
+ base_url=base_url,
571
+ ).upload_agentic_traces()
572
+
573
+ response = upload_code(
574
+ hash_id=os.path.basename(zip_path).split('.')[0],
575
+ zip_path=zip_path,
576
+ project_name=project_name,
577
+ dataset_name=dataset_name,
578
+ )
579
+ print(response)
580
+
540
581
 
541
- # project_name = 'project_name'
542
- # usecase = "Agentic Application"
543
- # dataset_name = "dataset_name"
544
- # zip_path = "zip_path"
545
582
 
546
- # auth = RagaAICatalyst(access_key=access_key, secret_key=secret_key, base_url=base_url, api_keys=None)
547
-
548
- # project_list, project_id = auth.list_projects()
549
-
550
-
551
- # response = create_dataset_schema_with_trace(project_name=project_name, dataset_name=dataset_name)
552
-
553
- # response = upload_trace_metric(
554
- # json_file_path=json_file_path,
555
- # dataset_name=dataset_name,
556
- # project_name=project_name,
557
- # )
558
-
559
- # upload_traces = UploadAgenticTraces(
560
- # json_file_path=json_file_path,
561
- # project_name=project_name,
562
- # project_id=project_id,
563
- # dataset_name=dataset_name,
564
- # user_detail=None,
565
- # base_url=base_url,
566
- # ).upload_agentic_traces()
567
-
568
- # response = upload_code(
569
- # hash_id=os.path.basename(zip_path).split('.')[0],
570
- # zip_path=zip_path,
571
- # project_name=project_name,
572
- # dataset_name=dataset_name,
573
- # )
574
- # print(response)