opik 1.9.26__py3-none-any.whl → 1.9.41__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.
Files changed (181) hide show
  1. opik/__init__.py +10 -3
  2. opik/api_objects/dataset/rest_operations.py +2 -0
  3. opik/api_objects/experiment/experiment.py +31 -5
  4. opik/api_objects/experiment/helpers.py +34 -10
  5. opik/api_objects/local_recording.py +8 -3
  6. opik/api_objects/opik_client.py +218 -46
  7. opik/api_objects/opik_query_language.py +9 -0
  8. opik/api_objects/prompt/__init__.py +11 -3
  9. opik/api_objects/prompt/base_prompt.py +69 -0
  10. opik/api_objects/prompt/base_prompt_template.py +29 -0
  11. opik/api_objects/prompt/chat/__init__.py +1 -0
  12. opik/api_objects/prompt/chat/chat_prompt.py +193 -0
  13. opik/api_objects/prompt/chat/chat_prompt_template.py +350 -0
  14. opik/api_objects/prompt/{chat_content_renderer_registry.py → chat/content_renderer_registry.py} +31 -34
  15. opik/api_objects/prompt/client.py +101 -30
  16. opik/api_objects/prompt/text/__init__.py +1 -0
  17. opik/api_objects/prompt/{prompt.py → text/prompt.py} +55 -32
  18. opik/api_objects/prompt/{prompt_template.py → text/prompt_template.py} +8 -5
  19. opik/cli/export.py +6 -2
  20. opik/config.py +0 -5
  21. opik/decorator/base_track_decorator.py +37 -40
  22. opik/evaluation/__init__.py +13 -2
  23. opik/evaluation/engine/engine.py +195 -223
  24. opik/evaluation/engine/helpers.py +8 -7
  25. opik/evaluation/engine/metrics_evaluator.py +237 -0
  26. opik/evaluation/evaluation_result.py +35 -1
  27. opik/evaluation/evaluator.py +309 -23
  28. opik/evaluation/models/litellm/util.py +78 -6
  29. opik/evaluation/report.py +14 -2
  30. opik/evaluation/rest_operations.py +6 -9
  31. opik/evaluation/test_case.py +2 -2
  32. opik/evaluation/types.py +9 -1
  33. opik/exceptions.py +17 -0
  34. opik/id_helpers.py +18 -0
  35. opik/integrations/adk/helpers.py +16 -7
  36. opik/integrations/adk/legacy_opik_tracer.py +7 -4
  37. opik/integrations/adk/opik_tracer.py +3 -1
  38. opik/integrations/adk/patchers/adk_otel_tracer/opik_adk_otel_tracer.py +7 -3
  39. opik/integrations/dspy/callback.py +1 -4
  40. opik/integrations/haystack/opik_connector.py +2 -2
  41. opik/integrations/haystack/opik_tracer.py +2 -4
  42. opik/integrations/langchain/opik_tracer.py +1 -4
  43. opik/integrations/llama_index/callback.py +2 -4
  44. opik/integrations/openai/agents/opik_tracing_processor.py +1 -2
  45. opik/integrations/openai/opik_tracker.py +1 -1
  46. opik/opik_context.py +7 -7
  47. opik/rest_api/__init__.py +127 -11
  48. opik/rest_api/dashboards/client.py +65 -2
  49. opik/rest_api/dashboards/raw_client.py +82 -0
  50. opik/rest_api/datasets/client.py +538 -2
  51. opik/rest_api/datasets/raw_client.py +1347 -441
  52. opik/rest_api/experiments/client.py +30 -2
  53. opik/rest_api/experiments/raw_client.py +26 -0
  54. opik/rest_api/optimizations/client.py +302 -0
  55. opik/rest_api/optimizations/raw_client.py +463 -0
  56. opik/rest_api/optimizations/types/optimization_update_status.py +3 -1
  57. opik/rest_api/prompts/__init__.py +2 -2
  58. opik/rest_api/prompts/client.py +34 -4
  59. opik/rest_api/prompts/raw_client.py +32 -2
  60. opik/rest_api/prompts/types/__init__.py +3 -1
  61. opik/rest_api/prompts/types/create_prompt_version_detail_template_structure.py +5 -0
  62. opik/rest_api/prompts/types/prompt_write_template_structure.py +5 -0
  63. opik/rest_api/traces/client.py +6 -6
  64. opik/rest_api/traces/raw_client.py +4 -4
  65. opik/rest_api/types/__init__.py +125 -11
  66. opik/rest_api/types/aggregation_data.py +1 -0
  67. opik/rest_api/types/automation_rule_evaluator.py +23 -1
  68. opik/rest_api/types/automation_rule_evaluator_llm_as_judge.py +2 -0
  69. opik/rest_api/types/automation_rule_evaluator_llm_as_judge_public.py +2 -0
  70. opik/rest_api/types/automation_rule_evaluator_llm_as_judge_write.py +2 -0
  71. opik/rest_api/types/{automation_rule_evaluator_object_public.py → automation_rule_evaluator_object_object_public.py} +32 -10
  72. opik/rest_api/types/automation_rule_evaluator_page_public.py +2 -2
  73. opik/rest_api/types/automation_rule_evaluator_public.py +23 -1
  74. opik/rest_api/types/automation_rule_evaluator_span_llm_as_judge.py +22 -0
  75. opik/rest_api/types/automation_rule_evaluator_span_llm_as_judge_public.py +22 -0
  76. opik/rest_api/types/automation_rule_evaluator_span_llm_as_judge_write.py +22 -0
  77. opik/rest_api/types/automation_rule_evaluator_trace_thread_llm_as_judge.py +2 -0
  78. opik/rest_api/types/automation_rule_evaluator_trace_thread_llm_as_judge_public.py +2 -0
  79. opik/rest_api/types/automation_rule_evaluator_trace_thread_llm_as_judge_write.py +2 -0
  80. opik/rest_api/types/automation_rule_evaluator_trace_thread_user_defined_metric_python.py +2 -0
  81. opik/rest_api/types/automation_rule_evaluator_trace_thread_user_defined_metric_python_public.py +2 -0
  82. opik/rest_api/types/automation_rule_evaluator_trace_thread_user_defined_metric_python_write.py +2 -0
  83. opik/rest_api/types/automation_rule_evaluator_update.py +23 -1
  84. opik/rest_api/types/automation_rule_evaluator_update_llm_as_judge.py +2 -0
  85. opik/rest_api/types/automation_rule_evaluator_update_span_llm_as_judge.py +22 -0
  86. opik/rest_api/types/automation_rule_evaluator_update_trace_thread_llm_as_judge.py +2 -0
  87. opik/rest_api/types/automation_rule_evaluator_update_trace_thread_user_defined_metric_python.py +2 -0
  88. opik/rest_api/types/automation_rule_evaluator_update_user_defined_metric_python.py +2 -0
  89. opik/rest_api/types/automation_rule_evaluator_user_defined_metric_python.py +2 -0
  90. opik/rest_api/types/automation_rule_evaluator_user_defined_metric_python_public.py +2 -0
  91. opik/rest_api/types/automation_rule_evaluator_user_defined_metric_python_write.py +2 -0
  92. opik/rest_api/types/automation_rule_evaluator_write.py +23 -1
  93. opik/rest_api/types/dashboard_page_public.py +1 -0
  94. opik/rest_api/types/dataset.py +4 -0
  95. opik/rest_api/types/dataset_item.py +1 -0
  96. opik/rest_api/types/dataset_item_compare.py +1 -0
  97. opik/rest_api/types/dataset_item_page_compare.py +1 -0
  98. opik/rest_api/types/dataset_item_page_public.py +1 -0
  99. opik/rest_api/types/dataset_item_public.py +1 -0
  100. opik/rest_api/types/dataset_public.py +4 -0
  101. opik/rest_api/types/dataset_public_status.py +5 -0
  102. opik/rest_api/types/dataset_status.py +5 -0
  103. opik/rest_api/types/dataset_version_diff.py +22 -0
  104. opik/rest_api/types/dataset_version_diff_stats.py +24 -0
  105. opik/rest_api/types/dataset_version_page_public.py +23 -0
  106. opik/rest_api/types/dataset_version_public.py +54 -0
  107. opik/rest_api/types/dataset_version_summary.py +41 -0
  108. opik/rest_api/types/dataset_version_summary_public.py +41 -0
  109. opik/rest_api/types/experiment.py +2 -0
  110. opik/rest_api/types/experiment_public.py +2 -0
  111. opik/rest_api/types/experiment_score.py +20 -0
  112. opik/rest_api/types/experiment_score_public.py +20 -0
  113. opik/rest_api/types/experiment_score_write.py +20 -0
  114. opik/rest_api/types/feedback_score_public.py +4 -0
  115. opik/rest_api/types/group_content_with_aggregations.py +1 -0
  116. opik/rest_api/types/optimization.py +2 -0
  117. opik/rest_api/types/optimization_public.py +2 -0
  118. opik/rest_api/types/optimization_public_status.py +3 -1
  119. opik/rest_api/types/optimization_status.py +3 -1
  120. opik/rest_api/types/optimization_studio_config.py +27 -0
  121. opik/rest_api/types/optimization_studio_config_public.py +27 -0
  122. opik/rest_api/types/optimization_studio_config_write.py +27 -0
  123. opik/rest_api/types/optimization_studio_log.py +22 -0
  124. opik/rest_api/types/optimization_write.py +2 -0
  125. opik/rest_api/types/optimization_write_status.py +3 -1
  126. opik/rest_api/types/prompt.py +6 -0
  127. opik/rest_api/types/prompt_detail.py +6 -0
  128. opik/rest_api/types/prompt_detail_template_structure.py +5 -0
  129. opik/rest_api/types/prompt_public.py +6 -0
  130. opik/rest_api/types/prompt_public_template_structure.py +5 -0
  131. opik/rest_api/types/prompt_template_structure.py +5 -0
  132. opik/rest_api/types/prompt_version.py +2 -0
  133. opik/rest_api/types/prompt_version_detail.py +2 -0
  134. opik/rest_api/types/prompt_version_detail_template_structure.py +5 -0
  135. opik/rest_api/types/prompt_version_public.py +2 -0
  136. opik/rest_api/types/prompt_version_public_template_structure.py +5 -0
  137. opik/rest_api/types/prompt_version_template_structure.py +5 -0
  138. opik/rest_api/types/score_name.py +1 -0
  139. opik/rest_api/types/service_toggles_config.py +5 -0
  140. opik/rest_api/types/span_filter.py +23 -0
  141. opik/rest_api/types/span_filter_operator.py +21 -0
  142. opik/rest_api/types/span_filter_write.py +23 -0
  143. opik/rest_api/types/span_filter_write_operator.py +21 -0
  144. opik/rest_api/types/span_llm_as_judge_code.py +27 -0
  145. opik/rest_api/types/span_llm_as_judge_code_public.py +27 -0
  146. opik/rest_api/types/span_llm_as_judge_code_write.py +27 -0
  147. opik/rest_api/types/studio_evaluation.py +20 -0
  148. opik/rest_api/types/studio_evaluation_public.py +20 -0
  149. opik/rest_api/types/studio_evaluation_write.py +20 -0
  150. opik/rest_api/types/studio_llm_model.py +21 -0
  151. opik/rest_api/types/studio_llm_model_public.py +21 -0
  152. opik/rest_api/types/studio_llm_model_write.py +21 -0
  153. opik/rest_api/types/studio_message.py +20 -0
  154. opik/rest_api/types/studio_message_public.py +20 -0
  155. opik/rest_api/types/studio_message_write.py +20 -0
  156. opik/rest_api/types/studio_metric.py +21 -0
  157. opik/rest_api/types/studio_metric_public.py +21 -0
  158. opik/rest_api/types/studio_metric_write.py +21 -0
  159. opik/rest_api/types/studio_optimizer.py +21 -0
  160. opik/rest_api/types/studio_optimizer_public.py +21 -0
  161. opik/rest_api/types/studio_optimizer_write.py +21 -0
  162. opik/rest_api/types/studio_prompt.py +20 -0
  163. opik/rest_api/types/studio_prompt_public.py +20 -0
  164. opik/rest_api/types/studio_prompt_write.py +20 -0
  165. opik/rest_api/types/trace.py +6 -0
  166. opik/rest_api/types/trace_public.py +6 -0
  167. opik/rest_api/types/trace_thread_filter_write.py +23 -0
  168. opik/rest_api/types/trace_thread_filter_write_operator.py +21 -0
  169. opik/rest_api/types/value_entry.py +2 -0
  170. opik/rest_api/types/value_entry_compare.py +2 -0
  171. opik/rest_api/types/value_entry_experiment_item_bulk_write_view.py +2 -0
  172. opik/rest_api/types/value_entry_public.py +2 -0
  173. opik/synchronization.py +5 -6
  174. opik/{decorator/tracing_runtime_config.py → tracing_runtime_config.py} +6 -7
  175. {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/METADATA +4 -3
  176. {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/RECORD +180 -120
  177. opik/api_objects/prompt/chat_prompt_template.py +0 -200
  178. {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/WHEEL +0 -0
  179. {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/entry_points.txt +0 -0
  180. {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/licenses/LICENSE +0 -0
  181. {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/top_level.txt +0 -0
opik/rest_api/__init__.py CHANGED
@@ -43,17 +43,22 @@ from .types import (
43
43
  AutomationRuleEvaluatorLlmAsJudge,
44
44
  AutomationRuleEvaluatorLlmAsJudgePublic,
45
45
  AutomationRuleEvaluatorLlmAsJudgeWrite,
46
- AutomationRuleEvaluatorObjectPublic,
47
- AutomationRuleEvaluatorObjectPublic_LlmAsJudge,
48
- AutomationRuleEvaluatorObjectPublic_TraceThreadLlmAsJudge,
49
- AutomationRuleEvaluatorObjectPublic_TraceThreadUserDefinedMetricPython,
50
- AutomationRuleEvaluatorObjectPublic_UserDefinedMetricPython,
46
+ AutomationRuleEvaluatorObjectObjectPublic,
47
+ AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge,
48
+ AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge,
49
+ AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge,
50
+ AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython,
51
+ AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython,
51
52
  AutomationRuleEvaluatorPagePublic,
52
53
  AutomationRuleEvaluatorPublic,
53
54
  AutomationRuleEvaluatorPublic_LlmAsJudge,
55
+ AutomationRuleEvaluatorPublic_SpanLlmAsJudge,
54
56
  AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge,
55
57
  AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython,
56
58
  AutomationRuleEvaluatorPublic_UserDefinedMetricPython,
59
+ AutomationRuleEvaluatorSpanLlmAsJudge,
60
+ AutomationRuleEvaluatorSpanLlmAsJudgePublic,
61
+ AutomationRuleEvaluatorSpanLlmAsJudgeWrite,
57
62
  AutomationRuleEvaluatorTraceThreadLlmAsJudge,
58
63
  AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic,
59
64
  AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite,
@@ -62,10 +67,12 @@ from .types import (
62
67
  AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite,
63
68
  AutomationRuleEvaluatorUpdate,
64
69
  AutomationRuleEvaluatorUpdateLlmAsJudge,
70
+ AutomationRuleEvaluatorUpdateSpanLlmAsJudge,
65
71
  AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge,
66
72
  AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython,
67
73
  AutomationRuleEvaluatorUpdateUserDefinedMetricPython,
68
74
  AutomationRuleEvaluatorUpdate_LlmAsJudge,
75
+ AutomationRuleEvaluatorUpdate_SpanLlmAsJudge,
69
76
  AutomationRuleEvaluatorUpdate_TraceThreadLlmAsJudge,
70
77
  AutomationRuleEvaluatorUpdate_TraceThreadUserDefinedMetricPython,
71
78
  AutomationRuleEvaluatorUpdate_UserDefinedMetricPython,
@@ -74,10 +81,12 @@ from .types import (
74
81
  AutomationRuleEvaluatorUserDefinedMetricPythonWrite,
75
82
  AutomationRuleEvaluatorWrite,
76
83
  AutomationRuleEvaluatorWrite_LlmAsJudge,
84
+ AutomationRuleEvaluatorWrite_SpanLlmAsJudge,
77
85
  AutomationRuleEvaluatorWrite_TraceThreadLlmAsJudge,
78
86
  AutomationRuleEvaluatorWrite_TraceThreadUserDefinedMetricPython,
79
87
  AutomationRuleEvaluatorWrite_UserDefinedMetricPython,
80
88
  AutomationRuleEvaluator_LlmAsJudge,
89
+ AutomationRuleEvaluator_SpanLlmAsJudge,
81
90
  AutomationRuleEvaluator_TraceThreadLlmAsJudge,
82
91
  AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython,
83
92
  AutomationRuleEvaluator_UserDefinedMetricPython,
@@ -150,7 +159,15 @@ from .types import (
150
159
  DatasetItemWriteSource,
151
160
  DatasetPagePublic,
152
161
  DatasetPublic,
162
+ DatasetPublicStatus,
153
163
  DatasetPublicVisibility,
164
+ DatasetStatus,
165
+ DatasetVersionDiff,
166
+ DatasetVersionDiffStats,
167
+ DatasetVersionPagePublic,
168
+ DatasetVersionPublic,
169
+ DatasetVersionSummary,
170
+ DatasetVersionSummaryPublic,
154
171
  DatasetVisibility,
155
172
  DeleteAttachmentsRequest,
156
173
  DeleteAttachmentsRequestEntityType,
@@ -183,6 +200,9 @@ from .types import (
183
200
  ExperimentPublic,
184
201
  ExperimentPublicStatus,
185
202
  ExperimentPublicType,
203
+ ExperimentScore,
204
+ ExperimentScorePublic,
205
+ ExperimentScoreWrite,
186
206
  ExperimentStatus,
187
207
  ExperimentType,
188
208
  ExportTraceServiceRequest,
@@ -295,6 +315,10 @@ from .types import (
295
315
  OptimizationPublic,
296
316
  OptimizationPublicStatus,
297
317
  OptimizationStatus,
318
+ OptimizationStudioConfig,
319
+ OptimizationStudioConfigPublic,
320
+ OptimizationStudioConfigWrite,
321
+ OptimizationStudioLog,
298
322
  OptimizationWrite,
299
323
  OptimizationWriteStatus,
300
324
  PageColumns,
@@ -321,19 +345,25 @@ from .types import (
321
345
  ProjectVisibility,
322
346
  Prompt,
323
347
  PromptDetail,
348
+ PromptDetailTemplateStructure,
324
349
  PromptPagePublic,
325
350
  PromptPublic,
351
+ PromptPublicTemplateStructure,
352
+ PromptTemplateStructure,
326
353
  PromptTokensDetails,
327
354
  PromptType,
328
355
  PromptVersion,
329
356
  PromptVersionDetail,
357
+ PromptVersionDetailTemplateStructure,
330
358
  PromptVersionDetailType,
331
359
  PromptVersionLink,
332
360
  PromptVersionLinkPublic,
333
361
  PromptVersionLinkWrite,
334
362
  PromptVersionPagePublic,
335
363
  PromptVersionPublic,
364
+ PromptVersionPublicTemplateStructure,
336
365
  PromptVersionPublicType,
366
+ PromptVersionTemplateStructure,
337
367
  PromptVersionType,
338
368
  ProviderApiKey,
339
369
  ProviderApiKeyPagePublic,
@@ -351,8 +381,15 @@ from .types import (
351
381
  SpanEnrichmentOptions,
352
382
  SpanExperimentItemBulkWriteView,
353
383
  SpanExperimentItemBulkWriteViewType,
384
+ SpanFilter,
385
+ SpanFilterOperator,
354
386
  SpanFilterPublic,
355
387
  SpanFilterPublicOperator,
388
+ SpanFilterWrite,
389
+ SpanFilterWriteOperator,
390
+ SpanLlmAsJudgeCode,
391
+ SpanLlmAsJudgeCodePublic,
392
+ SpanLlmAsJudgeCodeWrite,
356
393
  SpanPagePublic,
357
394
  SpanPublic,
358
395
  SpanPublicType,
@@ -364,6 +401,24 @@ from .types import (
364
401
  SpansCountResponse,
365
402
  StartMultipartUploadResponse,
366
403
  StreamOptions,
404
+ StudioEvaluation,
405
+ StudioEvaluationPublic,
406
+ StudioEvaluationWrite,
407
+ StudioLlmModel,
408
+ StudioLlmModelPublic,
409
+ StudioLlmModelWrite,
410
+ StudioMessage,
411
+ StudioMessagePublic,
412
+ StudioMessageWrite,
413
+ StudioMetric,
414
+ StudioMetricPublic,
415
+ StudioMetricWrite,
416
+ StudioOptimizer,
417
+ StudioOptimizerPublic,
418
+ StudioOptimizerWrite,
419
+ StudioPrompt,
420
+ StudioPromptPublic,
421
+ StudioPromptWrite,
367
422
  Tool,
368
423
  ToolCall,
369
424
  Trace,
@@ -385,6 +440,8 @@ from .types import (
385
440
  TraceThreadFilterOperator,
386
441
  TraceThreadFilterPublic,
387
442
  TraceThreadFilterPublicOperator,
443
+ TraceThreadFilterWrite,
444
+ TraceThreadFilterWriteOperator,
388
445
  TraceThreadIdentifier,
389
446
  TraceThreadLlmAsJudgeCode,
390
447
  TraceThreadLlmAsJudgeCodePublic,
@@ -484,7 +541,7 @@ from .projects import (
484
541
  ProjectUpdateVisibility,
485
542
  ProjectWriteVisibility,
486
543
  )
487
- from .prompts import PromptWriteType
544
+ from .prompts import CreatePromptVersionDetailTemplateStructure, PromptWriteTemplateStructure, PromptWriteType
488
545
  from .spans import (
489
546
  FindFeedbackScoreNames1RequestType,
490
547
  GetSpanStatsRequestType,
@@ -535,17 +592,22 @@ __all__ = [
535
592
  "AutomationRuleEvaluatorLlmAsJudge",
536
593
  "AutomationRuleEvaluatorLlmAsJudgePublic",
537
594
  "AutomationRuleEvaluatorLlmAsJudgeWrite",
538
- "AutomationRuleEvaluatorObjectPublic",
539
- "AutomationRuleEvaluatorObjectPublic_LlmAsJudge",
540
- "AutomationRuleEvaluatorObjectPublic_TraceThreadLlmAsJudge",
541
- "AutomationRuleEvaluatorObjectPublic_TraceThreadUserDefinedMetricPython",
542
- "AutomationRuleEvaluatorObjectPublic_UserDefinedMetricPython",
595
+ "AutomationRuleEvaluatorObjectObjectPublic",
596
+ "AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge",
597
+ "AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge",
598
+ "AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge",
599
+ "AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython",
600
+ "AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython",
543
601
  "AutomationRuleEvaluatorPagePublic",
544
602
  "AutomationRuleEvaluatorPublic",
545
603
  "AutomationRuleEvaluatorPublic_LlmAsJudge",
604
+ "AutomationRuleEvaluatorPublic_SpanLlmAsJudge",
546
605
  "AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge",
547
606
  "AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython",
548
607
  "AutomationRuleEvaluatorPublic_UserDefinedMetricPython",
608
+ "AutomationRuleEvaluatorSpanLlmAsJudge",
609
+ "AutomationRuleEvaluatorSpanLlmAsJudgePublic",
610
+ "AutomationRuleEvaluatorSpanLlmAsJudgeWrite",
549
611
  "AutomationRuleEvaluatorTraceThreadLlmAsJudge",
550
612
  "AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic",
551
613
  "AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite",
@@ -554,10 +616,12 @@ __all__ = [
554
616
  "AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite",
555
617
  "AutomationRuleEvaluatorUpdate",
556
618
  "AutomationRuleEvaluatorUpdateLlmAsJudge",
619
+ "AutomationRuleEvaluatorUpdateSpanLlmAsJudge",
557
620
  "AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge",
558
621
  "AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython",
559
622
  "AutomationRuleEvaluatorUpdateUserDefinedMetricPython",
560
623
  "AutomationRuleEvaluatorUpdate_LlmAsJudge",
624
+ "AutomationRuleEvaluatorUpdate_SpanLlmAsJudge",
561
625
  "AutomationRuleEvaluatorUpdate_TraceThreadLlmAsJudge",
562
626
  "AutomationRuleEvaluatorUpdate_TraceThreadUserDefinedMetricPython",
563
627
  "AutomationRuleEvaluatorUpdate_UserDefinedMetricPython",
@@ -566,10 +630,12 @@ __all__ = [
566
630
  "AutomationRuleEvaluatorUserDefinedMetricPythonWrite",
567
631
  "AutomationRuleEvaluatorWrite",
568
632
  "AutomationRuleEvaluatorWrite_LlmAsJudge",
633
+ "AutomationRuleEvaluatorWrite_SpanLlmAsJudge",
569
634
  "AutomationRuleEvaluatorWrite_TraceThreadLlmAsJudge",
570
635
  "AutomationRuleEvaluatorWrite_TraceThreadUserDefinedMetricPython",
571
636
  "AutomationRuleEvaluatorWrite_UserDefinedMetricPython",
572
637
  "AutomationRuleEvaluator_LlmAsJudge",
638
+ "AutomationRuleEvaluator_SpanLlmAsJudge",
573
639
  "AutomationRuleEvaluator_TraceThreadLlmAsJudge",
574
640
  "AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython",
575
641
  "AutomationRuleEvaluator_UserDefinedMetricPython",
@@ -621,6 +687,7 @@ __all__ = [
621
687
  "CompletionTokensDetails",
622
688
  "ConflictError",
623
689
  "CountValueStatPublic",
690
+ "CreatePromptVersionDetailTemplateStructure",
624
691
  "DashboardPagePublic",
625
692
  "DashboardPublic",
626
693
  "DataPointDouble",
@@ -644,8 +711,16 @@ __all__ = [
644
711
  "DatasetItemWriteSource",
645
712
  "DatasetPagePublic",
646
713
  "DatasetPublic",
714
+ "DatasetPublicStatus",
647
715
  "DatasetPublicVisibility",
716
+ "DatasetStatus",
648
717
  "DatasetUpdateVisibility",
718
+ "DatasetVersionDiff",
719
+ "DatasetVersionDiffStats",
720
+ "DatasetVersionPagePublic",
721
+ "DatasetVersionPublic",
722
+ "DatasetVersionSummary",
723
+ "DatasetVersionSummaryPublic",
649
724
  "DatasetVisibility",
650
725
  "DatasetWriteVisibility",
651
726
  "DeleteAttachmentsRequest",
@@ -680,6 +755,9 @@ __all__ = [
680
755
  "ExperimentPublic",
681
756
  "ExperimentPublicStatus",
682
757
  "ExperimentPublicType",
758
+ "ExperimentScore",
759
+ "ExperimentScorePublic",
760
+ "ExperimentScoreWrite",
683
761
  "ExperimentStatus",
684
762
  "ExperimentType",
685
763
  "ExperimentUpdateStatus",
@@ -806,6 +884,10 @@ __all__ = [
806
884
  "OptimizationPublic",
807
885
  "OptimizationPublicStatus",
808
886
  "OptimizationStatus",
887
+ "OptimizationStudioConfig",
888
+ "OptimizationStudioConfigPublic",
889
+ "OptimizationStudioConfigWrite",
890
+ "OptimizationStudioLog",
809
891
  "OptimizationUpdateStatus",
810
892
  "OptimizationWrite",
811
893
  "OptimizationWriteStatus",
@@ -837,20 +919,27 @@ __all__ = [
837
919
  "ProjectWriteVisibility",
838
920
  "Prompt",
839
921
  "PromptDetail",
922
+ "PromptDetailTemplateStructure",
840
923
  "PromptPagePublic",
841
924
  "PromptPublic",
925
+ "PromptPublicTemplateStructure",
926
+ "PromptTemplateStructure",
842
927
  "PromptTokensDetails",
843
928
  "PromptType",
844
929
  "PromptVersion",
845
930
  "PromptVersionDetail",
931
+ "PromptVersionDetailTemplateStructure",
846
932
  "PromptVersionDetailType",
847
933
  "PromptVersionLink",
848
934
  "PromptVersionLinkPublic",
849
935
  "PromptVersionLinkWrite",
850
936
  "PromptVersionPagePublic",
851
937
  "PromptVersionPublic",
938
+ "PromptVersionPublicTemplateStructure",
852
939
  "PromptVersionPublicType",
940
+ "PromptVersionTemplateStructure",
853
941
  "PromptVersionType",
942
+ "PromptWriteTemplateStructure",
854
943
  "PromptWriteType",
855
944
  "ProviderApiKey",
856
945
  "ProviderApiKeyPagePublic",
@@ -869,8 +958,15 @@ __all__ = [
869
958
  "SpanEnrichmentOptions",
870
959
  "SpanExperimentItemBulkWriteView",
871
960
  "SpanExperimentItemBulkWriteViewType",
961
+ "SpanFilter",
962
+ "SpanFilterOperator",
872
963
  "SpanFilterPublic",
873
964
  "SpanFilterPublicOperator",
965
+ "SpanFilterWrite",
966
+ "SpanFilterWriteOperator",
967
+ "SpanLlmAsJudgeCode",
968
+ "SpanLlmAsJudgeCodePublic",
969
+ "SpanLlmAsJudgeCodeWrite",
874
970
  "SpanPagePublic",
875
971
  "SpanPublic",
876
972
  "SpanPublicType",
@@ -884,6 +980,24 @@ __all__ = [
884
980
  "StartMultipartUploadRequestEntityType",
885
981
  "StartMultipartUploadResponse",
886
982
  "StreamOptions",
983
+ "StudioEvaluation",
984
+ "StudioEvaluationPublic",
985
+ "StudioEvaluationWrite",
986
+ "StudioLlmModel",
987
+ "StudioLlmModelPublic",
988
+ "StudioLlmModelWrite",
989
+ "StudioMessage",
990
+ "StudioMessagePublic",
991
+ "StudioMessageWrite",
992
+ "StudioMetric",
993
+ "StudioMetricPublic",
994
+ "StudioMetricWrite",
995
+ "StudioOptimizer",
996
+ "StudioOptimizerPublic",
997
+ "StudioOptimizerWrite",
998
+ "StudioPrompt",
999
+ "StudioPromptPublic",
1000
+ "StudioPromptWrite",
887
1001
  "Tool",
888
1002
  "ToolCall",
889
1003
  "Trace",
@@ -905,6 +1019,8 @@ __all__ = [
905
1019
  "TraceThreadFilterOperator",
906
1020
  "TraceThreadFilterPublic",
907
1021
  "TraceThreadFilterPublicOperator",
1022
+ "TraceThreadFilterWrite",
1023
+ "TraceThreadFilterWriteOperator",
908
1024
  "TraceThreadIdentifier",
909
1025
  "TraceThreadLlmAsJudgeCode",
910
1026
  "TraceThreadLlmAsJudgeCodePublic",
@@ -35,6 +35,7 @@ class DashboardsClient:
35
35
  page: typing.Optional[int] = None,
36
36
  size: typing.Optional[int] = None,
37
37
  name: typing.Optional[str] = None,
38
+ sorting: typing.Optional[str] = None,
38
39
  request_options: typing.Optional[RequestOptions] = None,
39
40
  ) -> DashboardPagePublic:
40
41
  """
@@ -48,6 +49,8 @@ class DashboardsClient:
48
49
 
49
50
  name : typing.Optional[str]
50
51
 
52
+ sorting : typing.Optional[str]
53
+
51
54
  request_options : typing.Optional[RequestOptions]
52
55
  Request-specific configuration.
53
56
 
@@ -62,7 +65,9 @@ class DashboardsClient:
62
65
  client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
63
66
  client.dashboards.find_dashboards()
64
67
  """
65
- _response = self._raw_client.find_dashboards(page=page, size=size, name=name, request_options=request_options)
68
+ _response = self._raw_client.find_dashboards(
69
+ page=page, size=size, name=name, sorting=sorting, request_options=request_options
70
+ )
66
71
  return _response.data
67
72
 
68
73
  def create_dashboard(
@@ -196,6 +201,32 @@ class DashboardsClient:
196
201
  )
197
202
  return _response.data
198
203
 
204
+ def delete_dashboards_batch(
205
+ self, *, ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
206
+ ) -> None:
207
+ """
208
+ Delete dashboards batch
209
+
210
+ Parameters
211
+ ----------
212
+ ids : typing.Sequence[str]
213
+
214
+ request_options : typing.Optional[RequestOptions]
215
+ Request-specific configuration.
216
+
217
+ Returns
218
+ -------
219
+ None
220
+
221
+ Examples
222
+ --------
223
+ from Opik import OpikApi
224
+ client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
225
+ client.dashboards.delete_dashboards_batch(ids=['ids'], )
226
+ """
227
+ _response = self._raw_client.delete_dashboards_batch(ids=ids, request_options=request_options)
228
+ return _response.data
229
+
199
230
 
200
231
  class AsyncDashboardsClient:
201
232
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -218,6 +249,7 @@ class AsyncDashboardsClient:
218
249
  page: typing.Optional[int] = None,
219
250
  size: typing.Optional[int] = None,
220
251
  name: typing.Optional[str] = None,
252
+ sorting: typing.Optional[str] = None,
221
253
  request_options: typing.Optional[RequestOptions] = None,
222
254
  ) -> DashboardPagePublic:
223
255
  """
@@ -231,6 +263,8 @@ class AsyncDashboardsClient:
231
263
 
232
264
  name : typing.Optional[str]
233
265
 
266
+ sorting : typing.Optional[str]
267
+
234
268
  request_options : typing.Optional[RequestOptions]
235
269
  Request-specific configuration.
236
270
 
@@ -249,7 +283,7 @@ class AsyncDashboardsClient:
249
283
  asyncio.run(main())
250
284
  """
251
285
  _response = await self._raw_client.find_dashboards(
252
- page=page, size=size, name=name, request_options=request_options
286
+ page=page, size=size, name=name, sorting=sorting, request_options=request_options
253
287
  )
254
288
  return _response.data
255
289
 
@@ -397,3 +431,32 @@ class AsyncDashboardsClient:
397
431
  dashboard_id, name=name, description=description, config=config, request_options=request_options
398
432
  )
399
433
  return _response.data
434
+
435
+ async def delete_dashboards_batch(
436
+ self, *, ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
437
+ ) -> None:
438
+ """
439
+ Delete dashboards batch
440
+
441
+ Parameters
442
+ ----------
443
+ ids : typing.Sequence[str]
444
+
445
+ request_options : typing.Optional[RequestOptions]
446
+ Request-specific configuration.
447
+
448
+ Returns
449
+ -------
450
+ None
451
+
452
+ Examples
453
+ --------
454
+ from Opik import AsyncOpikApi
455
+ import asyncio
456
+ client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
457
+ async def main() -> None:
458
+ await client.dashboards.delete_dashboards_batch(ids=['ids'], )
459
+ asyncio.run(main())
460
+ """
461
+ _response = await self._raw_client.delete_dashboards_batch(ids=ids, request_options=request_options)
462
+ return _response.data
@@ -30,6 +30,7 @@ class RawDashboardsClient:
30
30
  page: typing.Optional[int] = None,
31
31
  size: typing.Optional[int] = None,
32
32
  name: typing.Optional[str] = None,
33
+ sorting: typing.Optional[str] = None,
33
34
  request_options: typing.Optional[RequestOptions] = None,
34
35
  ) -> HttpResponse[DashboardPagePublic]:
35
36
  """
@@ -43,6 +44,8 @@ class RawDashboardsClient:
43
44
 
44
45
  name : typing.Optional[str]
45
46
 
47
+ sorting : typing.Optional[str]
48
+
46
49
  request_options : typing.Optional[RequestOptions]
47
50
  Request-specific configuration.
48
51
 
@@ -58,6 +61,7 @@ class RawDashboardsClient:
58
61
  "page": page,
59
62
  "size": size,
60
63
  "name": name,
64
+ "sorting": sorting,
61
65
  },
62
66
  request_options=request_options,
63
67
  )
@@ -292,6 +296,43 @@ class RawDashboardsClient:
292
296
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
293
297
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
294
298
 
299
+ def delete_dashboards_batch(
300
+ self, *, ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
301
+ ) -> HttpResponse[None]:
302
+ """
303
+ Delete dashboards batch
304
+
305
+ Parameters
306
+ ----------
307
+ ids : typing.Sequence[str]
308
+
309
+ request_options : typing.Optional[RequestOptions]
310
+ Request-specific configuration.
311
+
312
+ Returns
313
+ -------
314
+ HttpResponse[None]
315
+ """
316
+ _response = self._client_wrapper.httpx_client.request(
317
+ "v1/private/dashboards/delete-batch",
318
+ method="POST",
319
+ json={
320
+ "ids": ids,
321
+ },
322
+ headers={
323
+ "content-type": "application/json",
324
+ },
325
+ request_options=request_options,
326
+ omit=OMIT,
327
+ )
328
+ try:
329
+ if 200 <= _response.status_code < 300:
330
+ return HttpResponse(response=_response, data=None)
331
+ _response_json = _response.json()
332
+ except JSONDecodeError:
333
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
334
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
335
+
295
336
 
296
337
  class AsyncRawDashboardsClient:
297
338
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -303,6 +344,7 @@ class AsyncRawDashboardsClient:
303
344
  page: typing.Optional[int] = None,
304
345
  size: typing.Optional[int] = None,
305
346
  name: typing.Optional[str] = None,
347
+ sorting: typing.Optional[str] = None,
306
348
  request_options: typing.Optional[RequestOptions] = None,
307
349
  ) -> AsyncHttpResponse[DashboardPagePublic]:
308
350
  """
@@ -316,6 +358,8 @@ class AsyncRawDashboardsClient:
316
358
 
317
359
  name : typing.Optional[str]
318
360
 
361
+ sorting : typing.Optional[str]
362
+
319
363
  request_options : typing.Optional[RequestOptions]
320
364
  Request-specific configuration.
321
365
 
@@ -331,6 +375,7 @@ class AsyncRawDashboardsClient:
331
375
  "page": page,
332
376
  "size": size,
333
377
  "name": name,
378
+ "sorting": sorting,
334
379
  },
335
380
  request_options=request_options,
336
381
  )
@@ -564,3 +609,40 @@ class AsyncRawDashboardsClient:
564
609
  except JSONDecodeError:
565
610
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
566
611
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
612
+
613
+ async def delete_dashboards_batch(
614
+ self, *, ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
615
+ ) -> AsyncHttpResponse[None]:
616
+ """
617
+ Delete dashboards batch
618
+
619
+ Parameters
620
+ ----------
621
+ ids : typing.Sequence[str]
622
+
623
+ request_options : typing.Optional[RequestOptions]
624
+ Request-specific configuration.
625
+
626
+ Returns
627
+ -------
628
+ AsyncHttpResponse[None]
629
+ """
630
+ _response = await self._client_wrapper.httpx_client.request(
631
+ "v1/private/dashboards/delete-batch",
632
+ method="POST",
633
+ json={
634
+ "ids": ids,
635
+ },
636
+ headers={
637
+ "content-type": "application/json",
638
+ },
639
+ request_options=request_options,
640
+ omit=OMIT,
641
+ )
642
+ try:
643
+ if 200 <= _response.status_code < 300:
644
+ return AsyncHttpResponse(response=_response, data=None)
645
+ _response_json = _response.json()
646
+ except JSONDecodeError:
647
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
648
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)