opik 1.9.26__py3-none-any.whl → 1.9.39__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.
- opik/__init__.py +10 -3
- opik/api_objects/dataset/rest_operations.py +2 -0
- opik/api_objects/experiment/experiment.py +31 -5
- opik/api_objects/experiment/helpers.py +34 -10
- opik/api_objects/local_recording.py +8 -3
- opik/api_objects/opik_client.py +218 -46
- opik/api_objects/opik_query_language.py +9 -0
- opik/api_objects/prompt/__init__.py +11 -3
- opik/api_objects/prompt/base_prompt.py +69 -0
- opik/api_objects/prompt/base_prompt_template.py +29 -0
- opik/api_objects/prompt/chat/__init__.py +1 -0
- opik/api_objects/prompt/chat/chat_prompt.py +193 -0
- opik/api_objects/prompt/chat/chat_prompt_template.py +350 -0
- opik/api_objects/prompt/{chat_content_renderer_registry.py → chat/content_renderer_registry.py} +31 -34
- opik/api_objects/prompt/client.py +101 -30
- opik/api_objects/prompt/text/__init__.py +1 -0
- opik/api_objects/prompt/{prompt.py → text/prompt.py} +55 -32
- opik/api_objects/prompt/{prompt_template.py → text/prompt_template.py} +8 -5
- opik/cli/export.py +6 -2
- opik/config.py +0 -5
- opik/decorator/base_track_decorator.py +37 -40
- opik/evaluation/__init__.py +13 -2
- opik/evaluation/engine/engine.py +195 -223
- opik/evaluation/engine/helpers.py +8 -7
- opik/evaluation/engine/metrics_evaluator.py +237 -0
- opik/evaluation/evaluation_result.py +35 -1
- opik/evaluation/evaluator.py +309 -23
- opik/evaluation/models/litellm/util.py +78 -6
- opik/evaluation/report.py +14 -2
- opik/evaluation/rest_operations.py +6 -9
- opik/evaluation/test_case.py +2 -2
- opik/evaluation/types.py +9 -1
- opik/exceptions.py +17 -0
- opik/id_helpers.py +18 -0
- opik/integrations/adk/helpers.py +16 -7
- opik/integrations/adk/legacy_opik_tracer.py +7 -4
- opik/integrations/adk/opik_tracer.py +3 -1
- opik/integrations/adk/patchers/adk_otel_tracer/opik_adk_otel_tracer.py +7 -3
- opik/integrations/dspy/callback.py +1 -4
- opik/integrations/haystack/opik_connector.py +2 -2
- opik/integrations/haystack/opik_tracer.py +2 -4
- opik/integrations/langchain/opik_tracer.py +1 -4
- opik/integrations/llama_index/callback.py +2 -4
- opik/integrations/openai/agents/opik_tracing_processor.py +1 -2
- opik/integrations/openai/opik_tracker.py +1 -1
- opik/opik_context.py +7 -7
- opik/rest_api/__init__.py +123 -11
- opik/rest_api/dashboards/client.py +65 -2
- opik/rest_api/dashboards/raw_client.py +82 -0
- opik/rest_api/datasets/client.py +441 -2
- opik/rest_api/datasets/raw_client.py +1225 -505
- opik/rest_api/experiments/client.py +30 -2
- opik/rest_api/experiments/raw_client.py +26 -0
- opik/rest_api/optimizations/client.py +302 -0
- opik/rest_api/optimizations/raw_client.py +463 -0
- opik/rest_api/optimizations/types/optimization_update_status.py +3 -1
- opik/rest_api/prompts/__init__.py +2 -2
- opik/rest_api/prompts/client.py +34 -4
- opik/rest_api/prompts/raw_client.py +32 -2
- opik/rest_api/prompts/types/__init__.py +3 -1
- opik/rest_api/prompts/types/create_prompt_version_detail_template_structure.py +5 -0
- opik/rest_api/prompts/types/prompt_write_template_structure.py +5 -0
- opik/rest_api/traces/client.py +6 -6
- opik/rest_api/traces/raw_client.py +4 -4
- opik/rest_api/types/__init__.py +121 -11
- opik/rest_api/types/aggregation_data.py +1 -0
- opik/rest_api/types/automation_rule_evaluator.py +23 -1
- opik/rest_api/types/automation_rule_evaluator_llm_as_judge.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_llm_as_judge_public.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_llm_as_judge_write.py +2 -0
- opik/rest_api/types/{automation_rule_evaluator_object_public.py → automation_rule_evaluator_object_object_public.py} +32 -10
- opik/rest_api/types/automation_rule_evaluator_page_public.py +2 -2
- opik/rest_api/types/automation_rule_evaluator_public.py +23 -1
- opik/rest_api/types/automation_rule_evaluator_span_llm_as_judge.py +22 -0
- opik/rest_api/types/automation_rule_evaluator_span_llm_as_judge_public.py +22 -0
- opik/rest_api/types/automation_rule_evaluator_span_llm_as_judge_write.py +22 -0
- opik/rest_api/types/automation_rule_evaluator_trace_thread_llm_as_judge.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_trace_thread_llm_as_judge_public.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_trace_thread_llm_as_judge_write.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_trace_thread_user_defined_metric_python.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_trace_thread_user_defined_metric_python_public.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_trace_thread_user_defined_metric_python_write.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_update.py +23 -1
- opik/rest_api/types/automation_rule_evaluator_update_llm_as_judge.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_update_span_llm_as_judge.py +22 -0
- opik/rest_api/types/automation_rule_evaluator_update_trace_thread_llm_as_judge.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_update_trace_thread_user_defined_metric_python.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_update_user_defined_metric_python.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_user_defined_metric_python.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_user_defined_metric_python_public.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_user_defined_metric_python_write.py +2 -0
- opik/rest_api/types/automation_rule_evaluator_write.py +23 -1
- opik/rest_api/types/dashboard_page_public.py +1 -0
- opik/rest_api/types/dataset.py +2 -0
- opik/rest_api/types/dataset_item.py +1 -0
- opik/rest_api/types/dataset_item_compare.py +1 -0
- opik/rest_api/types/dataset_item_page_compare.py +1 -0
- opik/rest_api/types/dataset_item_page_public.py +1 -0
- opik/rest_api/types/dataset_item_public.py +1 -0
- opik/rest_api/types/dataset_public.py +2 -0
- opik/rest_api/types/dataset_public_status.py +5 -0
- opik/rest_api/types/dataset_status.py +5 -0
- opik/rest_api/types/dataset_version_diff.py +22 -0
- opik/rest_api/types/dataset_version_diff_stats.py +24 -0
- opik/rest_api/types/dataset_version_page_public.py +23 -0
- opik/rest_api/types/dataset_version_public.py +49 -0
- opik/rest_api/types/experiment.py +2 -0
- opik/rest_api/types/experiment_public.py +2 -0
- opik/rest_api/types/experiment_score.py +20 -0
- opik/rest_api/types/experiment_score_public.py +20 -0
- opik/rest_api/types/experiment_score_write.py +20 -0
- opik/rest_api/types/feedback_score_public.py +4 -0
- opik/rest_api/types/optimization.py +2 -0
- opik/rest_api/types/optimization_public.py +2 -0
- opik/rest_api/types/optimization_public_status.py +3 -1
- opik/rest_api/types/optimization_status.py +3 -1
- opik/rest_api/types/optimization_studio_config.py +27 -0
- opik/rest_api/types/optimization_studio_config_public.py +27 -0
- opik/rest_api/types/optimization_studio_config_write.py +27 -0
- opik/rest_api/types/optimization_studio_log.py +22 -0
- opik/rest_api/types/optimization_write.py +2 -0
- opik/rest_api/types/optimization_write_status.py +3 -1
- opik/rest_api/types/prompt.py +6 -0
- opik/rest_api/types/prompt_detail.py +6 -0
- opik/rest_api/types/prompt_detail_template_structure.py +5 -0
- opik/rest_api/types/prompt_public.py +6 -0
- opik/rest_api/types/prompt_public_template_structure.py +5 -0
- opik/rest_api/types/prompt_template_structure.py +5 -0
- opik/rest_api/types/prompt_version.py +2 -0
- opik/rest_api/types/prompt_version_detail.py +2 -0
- opik/rest_api/types/prompt_version_detail_template_structure.py +5 -0
- opik/rest_api/types/prompt_version_public.py +2 -0
- opik/rest_api/types/prompt_version_public_template_structure.py +5 -0
- opik/rest_api/types/prompt_version_template_structure.py +5 -0
- opik/rest_api/types/score_name.py +1 -0
- opik/rest_api/types/service_toggles_config.py +5 -0
- opik/rest_api/types/span_filter.py +23 -0
- opik/rest_api/types/span_filter_operator.py +21 -0
- opik/rest_api/types/span_filter_write.py +23 -0
- opik/rest_api/types/span_filter_write_operator.py +21 -0
- opik/rest_api/types/span_llm_as_judge_code.py +27 -0
- opik/rest_api/types/span_llm_as_judge_code_public.py +27 -0
- opik/rest_api/types/span_llm_as_judge_code_write.py +27 -0
- opik/rest_api/types/studio_evaluation.py +20 -0
- opik/rest_api/types/studio_evaluation_public.py +20 -0
- opik/rest_api/types/studio_evaluation_write.py +20 -0
- opik/rest_api/types/studio_llm_model.py +21 -0
- opik/rest_api/types/studio_llm_model_public.py +21 -0
- opik/rest_api/types/studio_llm_model_write.py +21 -0
- opik/rest_api/types/studio_message.py +20 -0
- opik/rest_api/types/studio_message_public.py +20 -0
- opik/rest_api/types/studio_message_write.py +20 -0
- opik/rest_api/types/studio_metric.py +21 -0
- opik/rest_api/types/studio_metric_public.py +21 -0
- opik/rest_api/types/studio_metric_write.py +21 -0
- opik/rest_api/types/studio_optimizer.py +21 -0
- opik/rest_api/types/studio_optimizer_public.py +21 -0
- opik/rest_api/types/studio_optimizer_write.py +21 -0
- opik/rest_api/types/studio_prompt.py +20 -0
- opik/rest_api/types/studio_prompt_public.py +20 -0
- opik/rest_api/types/studio_prompt_write.py +20 -0
- opik/rest_api/types/trace.py +6 -0
- opik/rest_api/types/trace_public.py +6 -0
- opik/rest_api/types/trace_thread_filter_write.py +23 -0
- opik/rest_api/types/trace_thread_filter_write_operator.py +21 -0
- opik/rest_api/types/value_entry.py +2 -0
- opik/rest_api/types/value_entry_compare.py +2 -0
- opik/rest_api/types/value_entry_experiment_item_bulk_write_view.py +2 -0
- opik/rest_api/types/value_entry_public.py +2 -0
- opik/synchronization.py +5 -6
- opik/{decorator/tracing_runtime_config.py → tracing_runtime_config.py} +6 -7
- {opik-1.9.26.dist-info → opik-1.9.39.dist-info}/METADATA +2 -1
- {opik-1.9.26.dist-info → opik-1.9.39.dist-info}/RECORD +177 -119
- opik/api_objects/prompt/chat_prompt_template.py +0 -200
- {opik-1.9.26.dist-info → opik-1.9.39.dist-info}/WHEEL +0 -0
- {opik-1.9.26.dist-info → opik-1.9.39.dist-info}/entry_points.txt +0 -0
- {opik-1.9.26.dist-info → opik-1.9.39.dist-info}/licenses/LICENSE +0 -0
- {opik-1.9.26.dist-info → opik-1.9.39.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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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,13 @@ 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,
|
|
154
169
|
DatasetVisibility,
|
|
155
170
|
DeleteAttachmentsRequest,
|
|
156
171
|
DeleteAttachmentsRequestEntityType,
|
|
@@ -183,6 +198,9 @@ from .types import (
|
|
|
183
198
|
ExperimentPublic,
|
|
184
199
|
ExperimentPublicStatus,
|
|
185
200
|
ExperimentPublicType,
|
|
201
|
+
ExperimentScore,
|
|
202
|
+
ExperimentScorePublic,
|
|
203
|
+
ExperimentScoreWrite,
|
|
186
204
|
ExperimentStatus,
|
|
187
205
|
ExperimentType,
|
|
188
206
|
ExportTraceServiceRequest,
|
|
@@ -295,6 +313,10 @@ from .types import (
|
|
|
295
313
|
OptimizationPublic,
|
|
296
314
|
OptimizationPublicStatus,
|
|
297
315
|
OptimizationStatus,
|
|
316
|
+
OptimizationStudioConfig,
|
|
317
|
+
OptimizationStudioConfigPublic,
|
|
318
|
+
OptimizationStudioConfigWrite,
|
|
319
|
+
OptimizationStudioLog,
|
|
298
320
|
OptimizationWrite,
|
|
299
321
|
OptimizationWriteStatus,
|
|
300
322
|
PageColumns,
|
|
@@ -321,19 +343,25 @@ from .types import (
|
|
|
321
343
|
ProjectVisibility,
|
|
322
344
|
Prompt,
|
|
323
345
|
PromptDetail,
|
|
346
|
+
PromptDetailTemplateStructure,
|
|
324
347
|
PromptPagePublic,
|
|
325
348
|
PromptPublic,
|
|
349
|
+
PromptPublicTemplateStructure,
|
|
350
|
+
PromptTemplateStructure,
|
|
326
351
|
PromptTokensDetails,
|
|
327
352
|
PromptType,
|
|
328
353
|
PromptVersion,
|
|
329
354
|
PromptVersionDetail,
|
|
355
|
+
PromptVersionDetailTemplateStructure,
|
|
330
356
|
PromptVersionDetailType,
|
|
331
357
|
PromptVersionLink,
|
|
332
358
|
PromptVersionLinkPublic,
|
|
333
359
|
PromptVersionLinkWrite,
|
|
334
360
|
PromptVersionPagePublic,
|
|
335
361
|
PromptVersionPublic,
|
|
362
|
+
PromptVersionPublicTemplateStructure,
|
|
336
363
|
PromptVersionPublicType,
|
|
364
|
+
PromptVersionTemplateStructure,
|
|
337
365
|
PromptVersionType,
|
|
338
366
|
ProviderApiKey,
|
|
339
367
|
ProviderApiKeyPagePublic,
|
|
@@ -351,8 +379,15 @@ from .types import (
|
|
|
351
379
|
SpanEnrichmentOptions,
|
|
352
380
|
SpanExperimentItemBulkWriteView,
|
|
353
381
|
SpanExperimentItemBulkWriteViewType,
|
|
382
|
+
SpanFilter,
|
|
383
|
+
SpanFilterOperator,
|
|
354
384
|
SpanFilterPublic,
|
|
355
385
|
SpanFilterPublicOperator,
|
|
386
|
+
SpanFilterWrite,
|
|
387
|
+
SpanFilterWriteOperator,
|
|
388
|
+
SpanLlmAsJudgeCode,
|
|
389
|
+
SpanLlmAsJudgeCodePublic,
|
|
390
|
+
SpanLlmAsJudgeCodeWrite,
|
|
356
391
|
SpanPagePublic,
|
|
357
392
|
SpanPublic,
|
|
358
393
|
SpanPublicType,
|
|
@@ -364,6 +399,24 @@ from .types import (
|
|
|
364
399
|
SpansCountResponse,
|
|
365
400
|
StartMultipartUploadResponse,
|
|
366
401
|
StreamOptions,
|
|
402
|
+
StudioEvaluation,
|
|
403
|
+
StudioEvaluationPublic,
|
|
404
|
+
StudioEvaluationWrite,
|
|
405
|
+
StudioLlmModel,
|
|
406
|
+
StudioLlmModelPublic,
|
|
407
|
+
StudioLlmModelWrite,
|
|
408
|
+
StudioMessage,
|
|
409
|
+
StudioMessagePublic,
|
|
410
|
+
StudioMessageWrite,
|
|
411
|
+
StudioMetric,
|
|
412
|
+
StudioMetricPublic,
|
|
413
|
+
StudioMetricWrite,
|
|
414
|
+
StudioOptimizer,
|
|
415
|
+
StudioOptimizerPublic,
|
|
416
|
+
StudioOptimizerWrite,
|
|
417
|
+
StudioPrompt,
|
|
418
|
+
StudioPromptPublic,
|
|
419
|
+
StudioPromptWrite,
|
|
367
420
|
Tool,
|
|
368
421
|
ToolCall,
|
|
369
422
|
Trace,
|
|
@@ -385,6 +438,8 @@ from .types import (
|
|
|
385
438
|
TraceThreadFilterOperator,
|
|
386
439
|
TraceThreadFilterPublic,
|
|
387
440
|
TraceThreadFilterPublicOperator,
|
|
441
|
+
TraceThreadFilterWrite,
|
|
442
|
+
TraceThreadFilterWriteOperator,
|
|
388
443
|
TraceThreadIdentifier,
|
|
389
444
|
TraceThreadLlmAsJudgeCode,
|
|
390
445
|
TraceThreadLlmAsJudgeCodePublic,
|
|
@@ -484,7 +539,7 @@ from .projects import (
|
|
|
484
539
|
ProjectUpdateVisibility,
|
|
485
540
|
ProjectWriteVisibility,
|
|
486
541
|
)
|
|
487
|
-
from .prompts import PromptWriteType
|
|
542
|
+
from .prompts import CreatePromptVersionDetailTemplateStructure, PromptWriteTemplateStructure, PromptWriteType
|
|
488
543
|
from .spans import (
|
|
489
544
|
FindFeedbackScoreNames1RequestType,
|
|
490
545
|
GetSpanStatsRequestType,
|
|
@@ -535,17 +590,22 @@ __all__ = [
|
|
|
535
590
|
"AutomationRuleEvaluatorLlmAsJudge",
|
|
536
591
|
"AutomationRuleEvaluatorLlmAsJudgePublic",
|
|
537
592
|
"AutomationRuleEvaluatorLlmAsJudgeWrite",
|
|
538
|
-
"
|
|
539
|
-
"
|
|
540
|
-
"
|
|
541
|
-
"
|
|
542
|
-
"
|
|
593
|
+
"AutomationRuleEvaluatorObjectObjectPublic",
|
|
594
|
+
"AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge",
|
|
595
|
+
"AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge",
|
|
596
|
+
"AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge",
|
|
597
|
+
"AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython",
|
|
598
|
+
"AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython",
|
|
543
599
|
"AutomationRuleEvaluatorPagePublic",
|
|
544
600
|
"AutomationRuleEvaluatorPublic",
|
|
545
601
|
"AutomationRuleEvaluatorPublic_LlmAsJudge",
|
|
602
|
+
"AutomationRuleEvaluatorPublic_SpanLlmAsJudge",
|
|
546
603
|
"AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge",
|
|
547
604
|
"AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython",
|
|
548
605
|
"AutomationRuleEvaluatorPublic_UserDefinedMetricPython",
|
|
606
|
+
"AutomationRuleEvaluatorSpanLlmAsJudge",
|
|
607
|
+
"AutomationRuleEvaluatorSpanLlmAsJudgePublic",
|
|
608
|
+
"AutomationRuleEvaluatorSpanLlmAsJudgeWrite",
|
|
549
609
|
"AutomationRuleEvaluatorTraceThreadLlmAsJudge",
|
|
550
610
|
"AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic",
|
|
551
611
|
"AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite",
|
|
@@ -554,10 +614,12 @@ __all__ = [
|
|
|
554
614
|
"AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite",
|
|
555
615
|
"AutomationRuleEvaluatorUpdate",
|
|
556
616
|
"AutomationRuleEvaluatorUpdateLlmAsJudge",
|
|
617
|
+
"AutomationRuleEvaluatorUpdateSpanLlmAsJudge",
|
|
557
618
|
"AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge",
|
|
558
619
|
"AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython",
|
|
559
620
|
"AutomationRuleEvaluatorUpdateUserDefinedMetricPython",
|
|
560
621
|
"AutomationRuleEvaluatorUpdate_LlmAsJudge",
|
|
622
|
+
"AutomationRuleEvaluatorUpdate_SpanLlmAsJudge",
|
|
561
623
|
"AutomationRuleEvaluatorUpdate_TraceThreadLlmAsJudge",
|
|
562
624
|
"AutomationRuleEvaluatorUpdate_TraceThreadUserDefinedMetricPython",
|
|
563
625
|
"AutomationRuleEvaluatorUpdate_UserDefinedMetricPython",
|
|
@@ -566,10 +628,12 @@ __all__ = [
|
|
|
566
628
|
"AutomationRuleEvaluatorUserDefinedMetricPythonWrite",
|
|
567
629
|
"AutomationRuleEvaluatorWrite",
|
|
568
630
|
"AutomationRuleEvaluatorWrite_LlmAsJudge",
|
|
631
|
+
"AutomationRuleEvaluatorWrite_SpanLlmAsJudge",
|
|
569
632
|
"AutomationRuleEvaluatorWrite_TraceThreadLlmAsJudge",
|
|
570
633
|
"AutomationRuleEvaluatorWrite_TraceThreadUserDefinedMetricPython",
|
|
571
634
|
"AutomationRuleEvaluatorWrite_UserDefinedMetricPython",
|
|
572
635
|
"AutomationRuleEvaluator_LlmAsJudge",
|
|
636
|
+
"AutomationRuleEvaluator_SpanLlmAsJudge",
|
|
573
637
|
"AutomationRuleEvaluator_TraceThreadLlmAsJudge",
|
|
574
638
|
"AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython",
|
|
575
639
|
"AutomationRuleEvaluator_UserDefinedMetricPython",
|
|
@@ -621,6 +685,7 @@ __all__ = [
|
|
|
621
685
|
"CompletionTokensDetails",
|
|
622
686
|
"ConflictError",
|
|
623
687
|
"CountValueStatPublic",
|
|
688
|
+
"CreatePromptVersionDetailTemplateStructure",
|
|
624
689
|
"DashboardPagePublic",
|
|
625
690
|
"DashboardPublic",
|
|
626
691
|
"DataPointDouble",
|
|
@@ -644,8 +709,14 @@ __all__ = [
|
|
|
644
709
|
"DatasetItemWriteSource",
|
|
645
710
|
"DatasetPagePublic",
|
|
646
711
|
"DatasetPublic",
|
|
712
|
+
"DatasetPublicStatus",
|
|
647
713
|
"DatasetPublicVisibility",
|
|
714
|
+
"DatasetStatus",
|
|
648
715
|
"DatasetUpdateVisibility",
|
|
716
|
+
"DatasetVersionDiff",
|
|
717
|
+
"DatasetVersionDiffStats",
|
|
718
|
+
"DatasetVersionPagePublic",
|
|
719
|
+
"DatasetVersionPublic",
|
|
649
720
|
"DatasetVisibility",
|
|
650
721
|
"DatasetWriteVisibility",
|
|
651
722
|
"DeleteAttachmentsRequest",
|
|
@@ -680,6 +751,9 @@ __all__ = [
|
|
|
680
751
|
"ExperimentPublic",
|
|
681
752
|
"ExperimentPublicStatus",
|
|
682
753
|
"ExperimentPublicType",
|
|
754
|
+
"ExperimentScore",
|
|
755
|
+
"ExperimentScorePublic",
|
|
756
|
+
"ExperimentScoreWrite",
|
|
683
757
|
"ExperimentStatus",
|
|
684
758
|
"ExperimentType",
|
|
685
759
|
"ExperimentUpdateStatus",
|
|
@@ -806,6 +880,10 @@ __all__ = [
|
|
|
806
880
|
"OptimizationPublic",
|
|
807
881
|
"OptimizationPublicStatus",
|
|
808
882
|
"OptimizationStatus",
|
|
883
|
+
"OptimizationStudioConfig",
|
|
884
|
+
"OptimizationStudioConfigPublic",
|
|
885
|
+
"OptimizationStudioConfigWrite",
|
|
886
|
+
"OptimizationStudioLog",
|
|
809
887
|
"OptimizationUpdateStatus",
|
|
810
888
|
"OptimizationWrite",
|
|
811
889
|
"OptimizationWriteStatus",
|
|
@@ -837,20 +915,27 @@ __all__ = [
|
|
|
837
915
|
"ProjectWriteVisibility",
|
|
838
916
|
"Prompt",
|
|
839
917
|
"PromptDetail",
|
|
918
|
+
"PromptDetailTemplateStructure",
|
|
840
919
|
"PromptPagePublic",
|
|
841
920
|
"PromptPublic",
|
|
921
|
+
"PromptPublicTemplateStructure",
|
|
922
|
+
"PromptTemplateStructure",
|
|
842
923
|
"PromptTokensDetails",
|
|
843
924
|
"PromptType",
|
|
844
925
|
"PromptVersion",
|
|
845
926
|
"PromptVersionDetail",
|
|
927
|
+
"PromptVersionDetailTemplateStructure",
|
|
846
928
|
"PromptVersionDetailType",
|
|
847
929
|
"PromptVersionLink",
|
|
848
930
|
"PromptVersionLinkPublic",
|
|
849
931
|
"PromptVersionLinkWrite",
|
|
850
932
|
"PromptVersionPagePublic",
|
|
851
933
|
"PromptVersionPublic",
|
|
934
|
+
"PromptVersionPublicTemplateStructure",
|
|
852
935
|
"PromptVersionPublicType",
|
|
936
|
+
"PromptVersionTemplateStructure",
|
|
853
937
|
"PromptVersionType",
|
|
938
|
+
"PromptWriteTemplateStructure",
|
|
854
939
|
"PromptWriteType",
|
|
855
940
|
"ProviderApiKey",
|
|
856
941
|
"ProviderApiKeyPagePublic",
|
|
@@ -869,8 +954,15 @@ __all__ = [
|
|
|
869
954
|
"SpanEnrichmentOptions",
|
|
870
955
|
"SpanExperimentItemBulkWriteView",
|
|
871
956
|
"SpanExperimentItemBulkWriteViewType",
|
|
957
|
+
"SpanFilter",
|
|
958
|
+
"SpanFilterOperator",
|
|
872
959
|
"SpanFilterPublic",
|
|
873
960
|
"SpanFilterPublicOperator",
|
|
961
|
+
"SpanFilterWrite",
|
|
962
|
+
"SpanFilterWriteOperator",
|
|
963
|
+
"SpanLlmAsJudgeCode",
|
|
964
|
+
"SpanLlmAsJudgeCodePublic",
|
|
965
|
+
"SpanLlmAsJudgeCodeWrite",
|
|
874
966
|
"SpanPagePublic",
|
|
875
967
|
"SpanPublic",
|
|
876
968
|
"SpanPublicType",
|
|
@@ -884,6 +976,24 @@ __all__ = [
|
|
|
884
976
|
"StartMultipartUploadRequestEntityType",
|
|
885
977
|
"StartMultipartUploadResponse",
|
|
886
978
|
"StreamOptions",
|
|
979
|
+
"StudioEvaluation",
|
|
980
|
+
"StudioEvaluationPublic",
|
|
981
|
+
"StudioEvaluationWrite",
|
|
982
|
+
"StudioLlmModel",
|
|
983
|
+
"StudioLlmModelPublic",
|
|
984
|
+
"StudioLlmModelWrite",
|
|
985
|
+
"StudioMessage",
|
|
986
|
+
"StudioMessagePublic",
|
|
987
|
+
"StudioMessageWrite",
|
|
988
|
+
"StudioMetric",
|
|
989
|
+
"StudioMetricPublic",
|
|
990
|
+
"StudioMetricWrite",
|
|
991
|
+
"StudioOptimizer",
|
|
992
|
+
"StudioOptimizerPublic",
|
|
993
|
+
"StudioOptimizerWrite",
|
|
994
|
+
"StudioPrompt",
|
|
995
|
+
"StudioPromptPublic",
|
|
996
|
+
"StudioPromptWrite",
|
|
887
997
|
"Tool",
|
|
888
998
|
"ToolCall",
|
|
889
999
|
"Trace",
|
|
@@ -905,6 +1015,8 @@ __all__ = [
|
|
|
905
1015
|
"TraceThreadFilterOperator",
|
|
906
1016
|
"TraceThreadFilterPublic",
|
|
907
1017
|
"TraceThreadFilterPublicOperator",
|
|
1018
|
+
"TraceThreadFilterWrite",
|
|
1019
|
+
"TraceThreadFilterWriteOperator",
|
|
908
1020
|
"TraceThreadIdentifier",
|
|
909
1021
|
"TraceThreadLlmAsJudgeCode",
|
|
910
1022
|
"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(
|
|
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)
|