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.
- 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 +127 -11
- opik/rest_api/dashboards/client.py +65 -2
- opik/rest_api/dashboards/raw_client.py +82 -0
- opik/rest_api/datasets/client.py +538 -2
- opik/rest_api/datasets/raw_client.py +1347 -441
- 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 +125 -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 +4 -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 +4 -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 +54 -0
- opik/rest_api/types/dataset_version_summary.py +41 -0
- opik/rest_api/types/dataset_version_summary_public.py +41 -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/group_content_with_aggregations.py +1 -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.41.dist-info}/METADATA +4 -3
- {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/RECORD +180 -120
- opik/api_objects/prompt/chat_prompt_template.py +0 -200
- {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/WHEEL +0 -0
- {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/entry_points.txt +0 -0
- {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/licenses/LICENSE +0 -0
- {opik-1.9.26.dist-info → opik-1.9.41.dist-info}/top_level.txt +0 -0
opik/rest_api/types/__init__.py
CHANGED
|
@@ -41,6 +41,7 @@ from .auth_details_holder import AuthDetailsHolder
|
|
|
41
41
|
from .automation_rule_evaluator import (
|
|
42
42
|
AutomationRuleEvaluator,
|
|
43
43
|
AutomationRuleEvaluator_LlmAsJudge,
|
|
44
|
+
AutomationRuleEvaluator_SpanLlmAsJudge,
|
|
44
45
|
AutomationRuleEvaluator_TraceThreadLlmAsJudge,
|
|
45
46
|
AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython,
|
|
46
47
|
AutomationRuleEvaluator_UserDefinedMetricPython,
|
|
@@ -48,21 +49,26 @@ from .automation_rule_evaluator import (
|
|
|
48
49
|
from .automation_rule_evaluator_llm_as_judge import AutomationRuleEvaluatorLlmAsJudge
|
|
49
50
|
from .automation_rule_evaluator_llm_as_judge_public import AutomationRuleEvaluatorLlmAsJudgePublic
|
|
50
51
|
from .automation_rule_evaluator_llm_as_judge_write import AutomationRuleEvaluatorLlmAsJudgeWrite
|
|
51
|
-
from .
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
from .automation_rule_evaluator_object_object_public import (
|
|
53
|
+
AutomationRuleEvaluatorObjectObjectPublic,
|
|
54
|
+
AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge,
|
|
55
|
+
AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge,
|
|
56
|
+
AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge,
|
|
57
|
+
AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython,
|
|
58
|
+
AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython,
|
|
57
59
|
)
|
|
58
60
|
from .automation_rule_evaluator_page_public import AutomationRuleEvaluatorPagePublic
|
|
59
61
|
from .automation_rule_evaluator_public import (
|
|
60
62
|
AutomationRuleEvaluatorPublic,
|
|
61
63
|
AutomationRuleEvaluatorPublic_LlmAsJudge,
|
|
64
|
+
AutomationRuleEvaluatorPublic_SpanLlmAsJudge,
|
|
62
65
|
AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge,
|
|
63
66
|
AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython,
|
|
64
67
|
AutomationRuleEvaluatorPublic_UserDefinedMetricPython,
|
|
65
68
|
)
|
|
69
|
+
from .automation_rule_evaluator_span_llm_as_judge import AutomationRuleEvaluatorSpanLlmAsJudge
|
|
70
|
+
from .automation_rule_evaluator_span_llm_as_judge_public import AutomationRuleEvaluatorSpanLlmAsJudgePublic
|
|
71
|
+
from .automation_rule_evaluator_span_llm_as_judge_write import AutomationRuleEvaluatorSpanLlmAsJudgeWrite
|
|
66
72
|
from .automation_rule_evaluator_trace_thread_llm_as_judge import AutomationRuleEvaluatorTraceThreadLlmAsJudge
|
|
67
73
|
from .automation_rule_evaluator_trace_thread_llm_as_judge_public import (
|
|
68
74
|
AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic,
|
|
@@ -80,11 +86,13 @@ from .automation_rule_evaluator_trace_thread_user_defined_metric_python_write im
|
|
|
80
86
|
from .automation_rule_evaluator_update import (
|
|
81
87
|
AutomationRuleEvaluatorUpdate,
|
|
82
88
|
AutomationRuleEvaluatorUpdate_LlmAsJudge,
|
|
89
|
+
AutomationRuleEvaluatorUpdate_SpanLlmAsJudge,
|
|
83
90
|
AutomationRuleEvaluatorUpdate_TraceThreadLlmAsJudge,
|
|
84
91
|
AutomationRuleEvaluatorUpdate_TraceThreadUserDefinedMetricPython,
|
|
85
92
|
AutomationRuleEvaluatorUpdate_UserDefinedMetricPython,
|
|
86
93
|
)
|
|
87
94
|
from .automation_rule_evaluator_update_llm_as_judge import AutomationRuleEvaluatorUpdateLlmAsJudge
|
|
95
|
+
from .automation_rule_evaluator_update_span_llm_as_judge import AutomationRuleEvaluatorUpdateSpanLlmAsJudge
|
|
88
96
|
from .automation_rule_evaluator_update_trace_thread_llm_as_judge import (
|
|
89
97
|
AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge,
|
|
90
98
|
)
|
|
@@ -104,6 +112,7 @@ from .automation_rule_evaluator_user_defined_metric_python_write import (
|
|
|
104
112
|
from .automation_rule_evaluator_write import (
|
|
105
113
|
AutomationRuleEvaluatorWrite,
|
|
106
114
|
AutomationRuleEvaluatorWrite_LlmAsJudge,
|
|
115
|
+
AutomationRuleEvaluatorWrite_SpanLlmAsJudge,
|
|
107
116
|
AutomationRuleEvaluatorWrite_TraceThreadLlmAsJudge,
|
|
108
117
|
AutomationRuleEvaluatorWrite_TraceThreadUserDefinedMetricPython,
|
|
109
118
|
AutomationRuleEvaluatorWrite_UserDefinedMetricPython,
|
|
@@ -177,7 +186,15 @@ from .dataset_item_write import DatasetItemWrite
|
|
|
177
186
|
from .dataset_item_write_source import DatasetItemWriteSource
|
|
178
187
|
from .dataset_page_public import DatasetPagePublic
|
|
179
188
|
from .dataset_public import DatasetPublic
|
|
189
|
+
from .dataset_public_status import DatasetPublicStatus
|
|
180
190
|
from .dataset_public_visibility import DatasetPublicVisibility
|
|
191
|
+
from .dataset_status import DatasetStatus
|
|
192
|
+
from .dataset_version_diff import DatasetVersionDiff
|
|
193
|
+
from .dataset_version_diff_stats import DatasetVersionDiffStats
|
|
194
|
+
from .dataset_version_page_public import DatasetVersionPagePublic
|
|
195
|
+
from .dataset_version_public import DatasetVersionPublic
|
|
196
|
+
from .dataset_version_summary import DatasetVersionSummary
|
|
197
|
+
from .dataset_version_summary_public import DatasetVersionSummaryPublic
|
|
181
198
|
from .dataset_visibility import DatasetVisibility
|
|
182
199
|
from .delete_attachments_request import DeleteAttachmentsRequest
|
|
183
200
|
from .delete_attachments_request_entity_type import DeleteAttachmentsRequestEntityType
|
|
@@ -212,6 +229,9 @@ from .experiment_page_public import ExperimentPagePublic
|
|
|
212
229
|
from .experiment_public import ExperimentPublic
|
|
213
230
|
from .experiment_public_status import ExperimentPublicStatus
|
|
214
231
|
from .experiment_public_type import ExperimentPublicType
|
|
232
|
+
from .experiment_score import ExperimentScore
|
|
233
|
+
from .experiment_score_public import ExperimentScorePublic
|
|
234
|
+
from .experiment_score_write import ExperimentScoreWrite
|
|
215
235
|
from .experiment_status import ExperimentStatus
|
|
216
236
|
from .experiment_type import ExperimentType
|
|
217
237
|
from .export_trace_service_request import ExportTraceServiceRequest
|
|
@@ -329,6 +349,10 @@ from .optimization_page_public import OptimizationPagePublic
|
|
|
329
349
|
from .optimization_public import OptimizationPublic
|
|
330
350
|
from .optimization_public_status import OptimizationPublicStatus
|
|
331
351
|
from .optimization_status import OptimizationStatus
|
|
352
|
+
from .optimization_studio_config import OptimizationStudioConfig
|
|
353
|
+
from .optimization_studio_config_public import OptimizationStudioConfigPublic
|
|
354
|
+
from .optimization_studio_config_write import OptimizationStudioConfigWrite
|
|
355
|
+
from .optimization_studio_log import OptimizationStudioLog
|
|
332
356
|
from .optimization_write import OptimizationWrite
|
|
333
357
|
from .optimization_write_status import OptimizationWriteStatus
|
|
334
358
|
from .page_columns import PageColumns
|
|
@@ -357,19 +381,25 @@ from .project_stats_summary_item import ProjectStatsSummaryItem
|
|
|
357
381
|
from .project_visibility import ProjectVisibility
|
|
358
382
|
from .prompt import Prompt
|
|
359
383
|
from .prompt_detail import PromptDetail
|
|
384
|
+
from .prompt_detail_template_structure import PromptDetailTemplateStructure
|
|
360
385
|
from .prompt_page_public import PromptPagePublic
|
|
361
386
|
from .prompt_public import PromptPublic
|
|
387
|
+
from .prompt_public_template_structure import PromptPublicTemplateStructure
|
|
388
|
+
from .prompt_template_structure import PromptTemplateStructure
|
|
362
389
|
from .prompt_tokens_details import PromptTokensDetails
|
|
363
390
|
from .prompt_type import PromptType
|
|
364
391
|
from .prompt_version import PromptVersion
|
|
365
392
|
from .prompt_version_detail import PromptVersionDetail
|
|
393
|
+
from .prompt_version_detail_template_structure import PromptVersionDetailTemplateStructure
|
|
366
394
|
from .prompt_version_detail_type import PromptVersionDetailType
|
|
367
395
|
from .prompt_version_link import PromptVersionLink
|
|
368
396
|
from .prompt_version_link_public import PromptVersionLinkPublic
|
|
369
397
|
from .prompt_version_link_write import PromptVersionLinkWrite
|
|
370
398
|
from .prompt_version_page_public import PromptVersionPagePublic
|
|
371
399
|
from .prompt_version_public import PromptVersionPublic
|
|
400
|
+
from .prompt_version_public_template_structure import PromptVersionPublicTemplateStructure
|
|
372
401
|
from .prompt_version_public_type import PromptVersionPublicType
|
|
402
|
+
from .prompt_version_template_structure import PromptVersionTemplateStructure
|
|
373
403
|
from .prompt_version_type import PromptVersionType
|
|
374
404
|
from .provider_api_key import ProviderApiKey
|
|
375
405
|
from .provider_api_key_page_public import ProviderApiKeyPagePublic
|
|
@@ -387,8 +417,15 @@ from .span_batch import SpanBatch
|
|
|
387
417
|
from .span_enrichment_options import SpanEnrichmentOptions
|
|
388
418
|
from .span_experiment_item_bulk_write_view import SpanExperimentItemBulkWriteView
|
|
389
419
|
from .span_experiment_item_bulk_write_view_type import SpanExperimentItemBulkWriteViewType
|
|
420
|
+
from .span_filter import SpanFilter
|
|
421
|
+
from .span_filter_operator import SpanFilterOperator
|
|
390
422
|
from .span_filter_public import SpanFilterPublic
|
|
391
423
|
from .span_filter_public_operator import SpanFilterPublicOperator
|
|
424
|
+
from .span_filter_write import SpanFilterWrite
|
|
425
|
+
from .span_filter_write_operator import SpanFilterWriteOperator
|
|
426
|
+
from .span_llm_as_judge_code import SpanLlmAsJudgeCode
|
|
427
|
+
from .span_llm_as_judge_code_public import SpanLlmAsJudgeCodePublic
|
|
428
|
+
from .span_llm_as_judge_code_write import SpanLlmAsJudgeCodeWrite
|
|
392
429
|
from .span_page_public import SpanPagePublic
|
|
393
430
|
from .span_public import SpanPublic
|
|
394
431
|
from .span_public_type import SpanPublicType
|
|
@@ -400,6 +437,24 @@ from .span_write_type import SpanWriteType
|
|
|
400
437
|
from .spans_count_response import SpansCountResponse
|
|
401
438
|
from .start_multipart_upload_response import StartMultipartUploadResponse
|
|
402
439
|
from .stream_options import StreamOptions
|
|
440
|
+
from .studio_evaluation import StudioEvaluation
|
|
441
|
+
from .studio_evaluation_public import StudioEvaluationPublic
|
|
442
|
+
from .studio_evaluation_write import StudioEvaluationWrite
|
|
443
|
+
from .studio_llm_model import StudioLlmModel
|
|
444
|
+
from .studio_llm_model_public import StudioLlmModelPublic
|
|
445
|
+
from .studio_llm_model_write import StudioLlmModelWrite
|
|
446
|
+
from .studio_message import StudioMessage
|
|
447
|
+
from .studio_message_public import StudioMessagePublic
|
|
448
|
+
from .studio_message_write import StudioMessageWrite
|
|
449
|
+
from .studio_metric import StudioMetric
|
|
450
|
+
from .studio_metric_public import StudioMetricPublic
|
|
451
|
+
from .studio_metric_write import StudioMetricWrite
|
|
452
|
+
from .studio_optimizer import StudioOptimizer
|
|
453
|
+
from .studio_optimizer_public import StudioOptimizerPublic
|
|
454
|
+
from .studio_optimizer_write import StudioOptimizerWrite
|
|
455
|
+
from .studio_prompt import StudioPrompt
|
|
456
|
+
from .studio_prompt_public import StudioPromptPublic
|
|
457
|
+
from .studio_prompt_write import StudioPromptWrite
|
|
403
458
|
from .tool import Tool
|
|
404
459
|
from .tool_call import ToolCall
|
|
405
460
|
from .trace import Trace
|
|
@@ -421,6 +476,8 @@ from .trace_thread_filter import TraceThreadFilter
|
|
|
421
476
|
from .trace_thread_filter_operator import TraceThreadFilterOperator
|
|
422
477
|
from .trace_thread_filter_public import TraceThreadFilterPublic
|
|
423
478
|
from .trace_thread_filter_public_operator import TraceThreadFilterPublicOperator
|
|
479
|
+
from .trace_thread_filter_write import TraceThreadFilterWrite
|
|
480
|
+
from .trace_thread_filter_write_operator import TraceThreadFilterWriteOperator
|
|
424
481
|
from .trace_thread_identifier import TraceThreadIdentifier
|
|
425
482
|
from .trace_thread_llm_as_judge_code import TraceThreadLlmAsJudgeCode
|
|
426
483
|
from .trace_thread_llm_as_judge_code_public import TraceThreadLlmAsJudgeCodePublic
|
|
@@ -506,17 +563,22 @@ __all__ = [
|
|
|
506
563
|
"AutomationRuleEvaluatorLlmAsJudge",
|
|
507
564
|
"AutomationRuleEvaluatorLlmAsJudgePublic",
|
|
508
565
|
"AutomationRuleEvaluatorLlmAsJudgeWrite",
|
|
509
|
-
"
|
|
510
|
-
"
|
|
511
|
-
"
|
|
512
|
-
"
|
|
513
|
-
"
|
|
566
|
+
"AutomationRuleEvaluatorObjectObjectPublic",
|
|
567
|
+
"AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge",
|
|
568
|
+
"AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge",
|
|
569
|
+
"AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge",
|
|
570
|
+
"AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython",
|
|
571
|
+
"AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython",
|
|
514
572
|
"AutomationRuleEvaluatorPagePublic",
|
|
515
573
|
"AutomationRuleEvaluatorPublic",
|
|
516
574
|
"AutomationRuleEvaluatorPublic_LlmAsJudge",
|
|
575
|
+
"AutomationRuleEvaluatorPublic_SpanLlmAsJudge",
|
|
517
576
|
"AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge",
|
|
518
577
|
"AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython",
|
|
519
578
|
"AutomationRuleEvaluatorPublic_UserDefinedMetricPython",
|
|
579
|
+
"AutomationRuleEvaluatorSpanLlmAsJudge",
|
|
580
|
+
"AutomationRuleEvaluatorSpanLlmAsJudgePublic",
|
|
581
|
+
"AutomationRuleEvaluatorSpanLlmAsJudgeWrite",
|
|
520
582
|
"AutomationRuleEvaluatorTraceThreadLlmAsJudge",
|
|
521
583
|
"AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic",
|
|
522
584
|
"AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite",
|
|
@@ -525,10 +587,12 @@ __all__ = [
|
|
|
525
587
|
"AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite",
|
|
526
588
|
"AutomationRuleEvaluatorUpdate",
|
|
527
589
|
"AutomationRuleEvaluatorUpdateLlmAsJudge",
|
|
590
|
+
"AutomationRuleEvaluatorUpdateSpanLlmAsJudge",
|
|
528
591
|
"AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge",
|
|
529
592
|
"AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython",
|
|
530
593
|
"AutomationRuleEvaluatorUpdateUserDefinedMetricPython",
|
|
531
594
|
"AutomationRuleEvaluatorUpdate_LlmAsJudge",
|
|
595
|
+
"AutomationRuleEvaluatorUpdate_SpanLlmAsJudge",
|
|
532
596
|
"AutomationRuleEvaluatorUpdate_TraceThreadLlmAsJudge",
|
|
533
597
|
"AutomationRuleEvaluatorUpdate_TraceThreadUserDefinedMetricPython",
|
|
534
598
|
"AutomationRuleEvaluatorUpdate_UserDefinedMetricPython",
|
|
@@ -537,10 +601,12 @@ __all__ = [
|
|
|
537
601
|
"AutomationRuleEvaluatorUserDefinedMetricPythonWrite",
|
|
538
602
|
"AutomationRuleEvaluatorWrite",
|
|
539
603
|
"AutomationRuleEvaluatorWrite_LlmAsJudge",
|
|
604
|
+
"AutomationRuleEvaluatorWrite_SpanLlmAsJudge",
|
|
540
605
|
"AutomationRuleEvaluatorWrite_TraceThreadLlmAsJudge",
|
|
541
606
|
"AutomationRuleEvaluatorWrite_TraceThreadUserDefinedMetricPython",
|
|
542
607
|
"AutomationRuleEvaluatorWrite_UserDefinedMetricPython",
|
|
543
608
|
"AutomationRuleEvaluator_LlmAsJudge",
|
|
609
|
+
"AutomationRuleEvaluator_SpanLlmAsJudge",
|
|
544
610
|
"AutomationRuleEvaluator_TraceThreadLlmAsJudge",
|
|
545
611
|
"AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython",
|
|
546
612
|
"AutomationRuleEvaluator_UserDefinedMetricPython",
|
|
@@ -613,7 +679,15 @@ __all__ = [
|
|
|
613
679
|
"DatasetItemWriteSource",
|
|
614
680
|
"DatasetPagePublic",
|
|
615
681
|
"DatasetPublic",
|
|
682
|
+
"DatasetPublicStatus",
|
|
616
683
|
"DatasetPublicVisibility",
|
|
684
|
+
"DatasetStatus",
|
|
685
|
+
"DatasetVersionDiff",
|
|
686
|
+
"DatasetVersionDiffStats",
|
|
687
|
+
"DatasetVersionPagePublic",
|
|
688
|
+
"DatasetVersionPublic",
|
|
689
|
+
"DatasetVersionSummary",
|
|
690
|
+
"DatasetVersionSummaryPublic",
|
|
617
691
|
"DatasetVisibility",
|
|
618
692
|
"DeleteAttachmentsRequest",
|
|
619
693
|
"DeleteAttachmentsRequestEntityType",
|
|
@@ -646,6 +720,9 @@ __all__ = [
|
|
|
646
720
|
"ExperimentPublic",
|
|
647
721
|
"ExperimentPublicStatus",
|
|
648
722
|
"ExperimentPublicType",
|
|
723
|
+
"ExperimentScore",
|
|
724
|
+
"ExperimentScorePublic",
|
|
725
|
+
"ExperimentScoreWrite",
|
|
649
726
|
"ExperimentStatus",
|
|
650
727
|
"ExperimentType",
|
|
651
728
|
"ExportTraceServiceRequest",
|
|
@@ -758,6 +835,10 @@ __all__ = [
|
|
|
758
835
|
"OptimizationPublic",
|
|
759
836
|
"OptimizationPublicStatus",
|
|
760
837
|
"OptimizationStatus",
|
|
838
|
+
"OptimizationStudioConfig",
|
|
839
|
+
"OptimizationStudioConfigPublic",
|
|
840
|
+
"OptimizationStudioConfigWrite",
|
|
841
|
+
"OptimizationStudioLog",
|
|
761
842
|
"OptimizationWrite",
|
|
762
843
|
"OptimizationWriteStatus",
|
|
763
844
|
"PageColumns",
|
|
@@ -784,19 +865,25 @@ __all__ = [
|
|
|
784
865
|
"ProjectVisibility",
|
|
785
866
|
"Prompt",
|
|
786
867
|
"PromptDetail",
|
|
868
|
+
"PromptDetailTemplateStructure",
|
|
787
869
|
"PromptPagePublic",
|
|
788
870
|
"PromptPublic",
|
|
871
|
+
"PromptPublicTemplateStructure",
|
|
872
|
+
"PromptTemplateStructure",
|
|
789
873
|
"PromptTokensDetails",
|
|
790
874
|
"PromptType",
|
|
791
875
|
"PromptVersion",
|
|
792
876
|
"PromptVersionDetail",
|
|
877
|
+
"PromptVersionDetailTemplateStructure",
|
|
793
878
|
"PromptVersionDetailType",
|
|
794
879
|
"PromptVersionLink",
|
|
795
880
|
"PromptVersionLinkPublic",
|
|
796
881
|
"PromptVersionLinkWrite",
|
|
797
882
|
"PromptVersionPagePublic",
|
|
798
883
|
"PromptVersionPublic",
|
|
884
|
+
"PromptVersionPublicTemplateStructure",
|
|
799
885
|
"PromptVersionPublicType",
|
|
886
|
+
"PromptVersionTemplateStructure",
|
|
800
887
|
"PromptVersionType",
|
|
801
888
|
"ProviderApiKey",
|
|
802
889
|
"ProviderApiKeyPagePublic",
|
|
@@ -814,8 +901,15 @@ __all__ = [
|
|
|
814
901
|
"SpanEnrichmentOptions",
|
|
815
902
|
"SpanExperimentItemBulkWriteView",
|
|
816
903
|
"SpanExperimentItemBulkWriteViewType",
|
|
904
|
+
"SpanFilter",
|
|
905
|
+
"SpanFilterOperator",
|
|
817
906
|
"SpanFilterPublic",
|
|
818
907
|
"SpanFilterPublicOperator",
|
|
908
|
+
"SpanFilterWrite",
|
|
909
|
+
"SpanFilterWriteOperator",
|
|
910
|
+
"SpanLlmAsJudgeCode",
|
|
911
|
+
"SpanLlmAsJudgeCodePublic",
|
|
912
|
+
"SpanLlmAsJudgeCodeWrite",
|
|
819
913
|
"SpanPagePublic",
|
|
820
914
|
"SpanPublic",
|
|
821
915
|
"SpanPublicType",
|
|
@@ -827,6 +921,24 @@ __all__ = [
|
|
|
827
921
|
"SpansCountResponse",
|
|
828
922
|
"StartMultipartUploadResponse",
|
|
829
923
|
"StreamOptions",
|
|
924
|
+
"StudioEvaluation",
|
|
925
|
+
"StudioEvaluationPublic",
|
|
926
|
+
"StudioEvaluationWrite",
|
|
927
|
+
"StudioLlmModel",
|
|
928
|
+
"StudioLlmModelPublic",
|
|
929
|
+
"StudioLlmModelWrite",
|
|
930
|
+
"StudioMessage",
|
|
931
|
+
"StudioMessagePublic",
|
|
932
|
+
"StudioMessageWrite",
|
|
933
|
+
"StudioMetric",
|
|
934
|
+
"StudioMetricPublic",
|
|
935
|
+
"StudioMetricWrite",
|
|
936
|
+
"StudioOptimizer",
|
|
937
|
+
"StudioOptimizerPublic",
|
|
938
|
+
"StudioOptimizerWrite",
|
|
939
|
+
"StudioPrompt",
|
|
940
|
+
"StudioPromptPublic",
|
|
941
|
+
"StudioPromptWrite",
|
|
830
942
|
"Tool",
|
|
831
943
|
"ToolCall",
|
|
832
944
|
"Trace",
|
|
@@ -848,6 +960,8 @@ __all__ = [
|
|
|
848
960
|
"TraceThreadFilterOperator",
|
|
849
961
|
"TraceThreadFilterPublic",
|
|
850
962
|
"TraceThreadFilterPublicOperator",
|
|
963
|
+
"TraceThreadFilterWrite",
|
|
964
|
+
"TraceThreadFilterWriteOperator",
|
|
851
965
|
"TraceThreadIdentifier",
|
|
852
966
|
"TraceThreadLlmAsJudgeCode",
|
|
853
967
|
"TraceThreadLlmAsJudgeCodePublic",
|
|
@@ -15,6 +15,7 @@ class AggregationData(UniversalBaseModel):
|
|
|
15
15
|
total_estimated_cost_avg: typing.Optional[float] = None
|
|
16
16
|
duration: typing.Optional[PercentageValues] = None
|
|
17
17
|
feedback_scores: typing.Optional[typing.List[FeedbackScoreAverage]] = None
|
|
18
|
+
experiment_scores: typing.Optional[typing.List[FeedbackScoreAverage]] = None
|
|
18
19
|
|
|
19
20
|
if IS_PYDANTIC_V2:
|
|
20
21
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -8,7 +8,10 @@ import typing
|
|
|
8
8
|
import pydantic
|
|
9
9
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
10
10
|
from .llm_as_judge_code import LlmAsJudgeCode
|
|
11
|
+
from .span_filter import SpanFilter
|
|
12
|
+
from .span_llm_as_judge_code import SpanLlmAsJudgeCode
|
|
11
13
|
from .trace_filter import TraceFilter
|
|
14
|
+
from .trace_thread_filter import TraceThreadFilter
|
|
12
15
|
from .trace_thread_llm_as_judge_code import TraceThreadLlmAsJudgeCode
|
|
13
16
|
from .trace_thread_user_defined_metric_python_code import TraceThreadUserDefinedMetricPythonCode
|
|
14
17
|
from .user_defined_metric_python_code import UserDefinedMetricPythonCode
|
|
@@ -21,7 +24,6 @@ class Base(UniversalBaseModel):
|
|
|
21
24
|
name: str
|
|
22
25
|
sampling_rate: typing.Optional[float] = None
|
|
23
26
|
enabled: typing.Optional[bool] = None
|
|
24
|
-
filters: typing.Optional[typing.List[TraceFilter]] = None
|
|
25
27
|
created_at: typing.Optional[dt.datetime] = None
|
|
26
28
|
created_by: typing.Optional[str] = None
|
|
27
29
|
last_updated_at: typing.Optional[dt.datetime] = None
|
|
@@ -40,6 +42,7 @@ class Base(UniversalBaseModel):
|
|
|
40
42
|
|
|
41
43
|
class AutomationRuleEvaluator_LlmAsJudge(Base):
|
|
42
44
|
type: typing.Literal["llm_as_judge"] = "llm_as_judge"
|
|
45
|
+
filters: typing.Optional[typing.List[TraceFilter]] = None
|
|
43
46
|
code: typing.Optional[LlmAsJudgeCode] = None
|
|
44
47
|
|
|
45
48
|
if IS_PYDANTIC_V2:
|
|
@@ -54,6 +57,7 @@ class AutomationRuleEvaluator_LlmAsJudge(Base):
|
|
|
54
57
|
|
|
55
58
|
class AutomationRuleEvaluator_UserDefinedMetricPython(Base):
|
|
56
59
|
type: typing.Literal["user_defined_metric_python"] = "user_defined_metric_python"
|
|
60
|
+
filters: typing.Optional[typing.List[TraceFilter]] = None
|
|
57
61
|
code: typing.Optional[UserDefinedMetricPythonCode] = None
|
|
58
62
|
|
|
59
63
|
if IS_PYDANTIC_V2:
|
|
@@ -68,6 +72,7 @@ class AutomationRuleEvaluator_UserDefinedMetricPython(Base):
|
|
|
68
72
|
|
|
69
73
|
class AutomationRuleEvaluator_TraceThreadLlmAsJudge(Base):
|
|
70
74
|
type: typing.Literal["trace_thread_llm_as_judge"] = "trace_thread_llm_as_judge"
|
|
75
|
+
filters: typing.Optional[typing.List[TraceThreadFilter]] = None
|
|
71
76
|
code: typing.Optional[TraceThreadLlmAsJudgeCode] = None
|
|
72
77
|
|
|
73
78
|
if IS_PYDANTIC_V2:
|
|
@@ -82,6 +87,7 @@ class AutomationRuleEvaluator_TraceThreadLlmAsJudge(Base):
|
|
|
82
87
|
|
|
83
88
|
class AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython(Base):
|
|
84
89
|
type: typing.Literal["trace_thread_user_defined_metric_python"] = "trace_thread_user_defined_metric_python"
|
|
90
|
+
filters: typing.Optional[typing.List[TraceThreadFilter]] = None
|
|
85
91
|
code: typing.Optional[TraceThreadUserDefinedMetricPythonCode] = None
|
|
86
92
|
|
|
87
93
|
if IS_PYDANTIC_V2:
|
|
@@ -94,9 +100,25 @@ class AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython(Base):
|
|
|
94
100
|
extra = pydantic.Extra.allow
|
|
95
101
|
|
|
96
102
|
|
|
103
|
+
class AutomationRuleEvaluator_SpanLlmAsJudge(Base):
|
|
104
|
+
type: typing.Literal["span_llm_as_judge"] = "span_llm_as_judge"
|
|
105
|
+
filters: typing.Optional[typing.List[SpanFilter]] = None
|
|
106
|
+
code: typing.Optional[SpanLlmAsJudgeCode] = None
|
|
107
|
+
|
|
108
|
+
if IS_PYDANTIC_V2:
|
|
109
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
110
|
+
else:
|
|
111
|
+
|
|
112
|
+
class Config:
|
|
113
|
+
frozen = True
|
|
114
|
+
smart_union = True
|
|
115
|
+
extra = pydantic.Extra.allow
|
|
116
|
+
|
|
117
|
+
|
|
97
118
|
AutomationRuleEvaluator = typing.Union[
|
|
98
119
|
AutomationRuleEvaluator_LlmAsJudge,
|
|
99
120
|
AutomationRuleEvaluator_UserDefinedMetricPython,
|
|
100
121
|
AutomationRuleEvaluator_TraceThreadLlmAsJudge,
|
|
101
122
|
AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython,
|
|
123
|
+
AutomationRuleEvaluator_SpanLlmAsJudge,
|
|
102
124
|
]
|
|
@@ -5,9 +5,11 @@ import typing
|
|
|
5
5
|
import pydantic
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
7
|
from .llm_as_judge_code import LlmAsJudgeCode
|
|
8
|
+
from .trace_filter import TraceFilter
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class AutomationRuleEvaluatorLlmAsJudge(UniversalBaseModel):
|
|
12
|
+
filters: typing.Optional[typing.List[TraceFilter]] = None
|
|
11
13
|
code: typing.Optional[LlmAsJudgeCode] = None
|
|
12
14
|
|
|
13
15
|
if IS_PYDANTIC_V2:
|
|
@@ -5,9 +5,11 @@ import typing
|
|
|
5
5
|
import pydantic
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
7
|
from .llm_as_judge_code_public import LlmAsJudgeCodePublic
|
|
8
|
+
from .trace_filter_public import TraceFilterPublic
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class AutomationRuleEvaluatorLlmAsJudgePublic(UniversalBaseModel):
|
|
12
|
+
filters: typing.Optional[typing.List[TraceFilterPublic]] = None
|
|
11
13
|
code: typing.Optional[LlmAsJudgeCodePublic] = None
|
|
12
14
|
|
|
13
15
|
if IS_PYDANTIC_V2:
|
|
@@ -5,9 +5,11 @@ import typing
|
|
|
5
5
|
import pydantic
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
7
|
from .llm_as_judge_code_write import LlmAsJudgeCodeWrite
|
|
8
|
+
from .trace_filter_write import TraceFilterWrite
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class AutomationRuleEvaluatorLlmAsJudgeWrite(UniversalBaseModel):
|
|
12
|
+
filters: typing.Optional[typing.List[TraceFilterWrite]] = None
|
|
11
13
|
code: typing.Optional[LlmAsJudgeCodeWrite] = None
|
|
12
14
|
|
|
13
15
|
if IS_PYDANTIC_V2:
|
|
@@ -8,7 +8,10 @@ import typing
|
|
|
8
8
|
import pydantic
|
|
9
9
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
10
10
|
from .llm_as_judge_code_public import LlmAsJudgeCodePublic
|
|
11
|
+
from .span_filter_public import SpanFilterPublic
|
|
12
|
+
from .span_llm_as_judge_code_public import SpanLlmAsJudgeCodePublic
|
|
11
13
|
from .trace_filter_public import TraceFilterPublic
|
|
14
|
+
from .trace_thread_filter_public import TraceThreadFilterPublic
|
|
12
15
|
from .trace_thread_llm_as_judge_code_public import TraceThreadLlmAsJudgeCodePublic
|
|
13
16
|
from .trace_thread_user_defined_metric_python_code_public import TraceThreadUserDefinedMetricPythonCodePublic
|
|
14
17
|
from .user_defined_metric_python_code_public import UserDefinedMetricPythonCodePublic
|
|
@@ -21,7 +24,6 @@ class Base(UniversalBaseModel):
|
|
|
21
24
|
name: str
|
|
22
25
|
sampling_rate: typing.Optional[float] = None
|
|
23
26
|
enabled: typing.Optional[bool] = None
|
|
24
|
-
filters: typing.Optional[typing.List[TraceFilterPublic]] = None
|
|
25
27
|
created_at: typing.Optional[dt.datetime] = None
|
|
26
28
|
created_by: typing.Optional[str] = None
|
|
27
29
|
last_updated_at: typing.Optional[dt.datetime] = None
|
|
@@ -38,8 +40,9 @@ class Base(UniversalBaseModel):
|
|
|
38
40
|
extra = pydantic.Extra.allow
|
|
39
41
|
|
|
40
42
|
|
|
41
|
-
class
|
|
43
|
+
class AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge(Base):
|
|
42
44
|
type: typing.Literal["llm_as_judge"] = "llm_as_judge"
|
|
45
|
+
filters: typing.Optional[typing.List[TraceFilterPublic]] = None
|
|
43
46
|
code: typing.Optional[LlmAsJudgeCodePublic] = None
|
|
44
47
|
|
|
45
48
|
if IS_PYDANTIC_V2:
|
|
@@ -52,8 +55,9 @@ class AutomationRuleEvaluatorObjectPublic_LlmAsJudge(Base):
|
|
|
52
55
|
extra = pydantic.Extra.allow
|
|
53
56
|
|
|
54
57
|
|
|
55
|
-
class
|
|
58
|
+
class AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython(Base):
|
|
56
59
|
type: typing.Literal["user_defined_metric_python"] = "user_defined_metric_python"
|
|
60
|
+
filters: typing.Optional[typing.List[TraceFilterPublic]] = None
|
|
57
61
|
code: typing.Optional[UserDefinedMetricPythonCodePublic] = None
|
|
58
62
|
|
|
59
63
|
if IS_PYDANTIC_V2:
|
|
@@ -66,8 +70,9 @@ class AutomationRuleEvaluatorObjectPublic_UserDefinedMetricPython(Base):
|
|
|
66
70
|
extra = pydantic.Extra.allow
|
|
67
71
|
|
|
68
72
|
|
|
69
|
-
class
|
|
73
|
+
class AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge(Base):
|
|
70
74
|
type: typing.Literal["trace_thread_llm_as_judge"] = "trace_thread_llm_as_judge"
|
|
75
|
+
filters: typing.Optional[typing.List[TraceThreadFilterPublic]] = None
|
|
71
76
|
code: typing.Optional[TraceThreadLlmAsJudgeCodePublic] = None
|
|
72
77
|
|
|
73
78
|
if IS_PYDANTIC_V2:
|
|
@@ -80,8 +85,9 @@ class AutomationRuleEvaluatorObjectPublic_TraceThreadLlmAsJudge(Base):
|
|
|
80
85
|
extra = pydantic.Extra.allow
|
|
81
86
|
|
|
82
87
|
|
|
83
|
-
class
|
|
88
|
+
class AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython(Base):
|
|
84
89
|
type: typing.Literal["trace_thread_user_defined_metric_python"] = "trace_thread_user_defined_metric_python"
|
|
90
|
+
filters: typing.Optional[typing.List[TraceThreadFilterPublic]] = None
|
|
85
91
|
code: typing.Optional[TraceThreadUserDefinedMetricPythonCodePublic] = None
|
|
86
92
|
|
|
87
93
|
if IS_PYDANTIC_V2:
|
|
@@ -94,9 +100,25 @@ class AutomationRuleEvaluatorObjectPublic_TraceThreadUserDefinedMetricPython(Bas
|
|
|
94
100
|
extra = pydantic.Extra.allow
|
|
95
101
|
|
|
96
102
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
class AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge(Base):
|
|
104
|
+
type: typing.Literal["span_llm_as_judge"] = "span_llm_as_judge"
|
|
105
|
+
filters: typing.Optional[typing.List[SpanFilterPublic]] = None
|
|
106
|
+
code: typing.Optional[SpanLlmAsJudgeCodePublic] = None
|
|
107
|
+
|
|
108
|
+
if IS_PYDANTIC_V2:
|
|
109
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
110
|
+
else:
|
|
111
|
+
|
|
112
|
+
class Config:
|
|
113
|
+
frozen = True
|
|
114
|
+
smart_union = True
|
|
115
|
+
extra = pydantic.Extra.allow
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
AutomationRuleEvaluatorObjectObjectPublic = typing.Union[
|
|
119
|
+
AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge,
|
|
120
|
+
AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython,
|
|
121
|
+
AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge,
|
|
122
|
+
AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython,
|
|
123
|
+
AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge,
|
|
102
124
|
]
|
|
@@ -4,14 +4,14 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
import pydantic
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
-
from .
|
|
7
|
+
from .automation_rule_evaluator_object_object_public import AutomationRuleEvaluatorObjectObjectPublic
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class AutomationRuleEvaluatorPagePublic(UniversalBaseModel):
|
|
11
11
|
page: typing.Optional[int] = None
|
|
12
12
|
size: typing.Optional[int] = None
|
|
13
13
|
total: typing.Optional[int] = None
|
|
14
|
-
content: typing.Optional[typing.List[
|
|
14
|
+
content: typing.Optional[typing.List[AutomationRuleEvaluatorObjectObjectPublic]] = None
|
|
15
15
|
sortable_by: typing.Optional[typing.List[str]] = None
|
|
16
16
|
|
|
17
17
|
if IS_PYDANTIC_V2:
|
|
@@ -8,7 +8,10 @@ import typing
|
|
|
8
8
|
import pydantic
|
|
9
9
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
10
10
|
from .llm_as_judge_code_public import LlmAsJudgeCodePublic
|
|
11
|
+
from .span_filter_public import SpanFilterPublic
|
|
12
|
+
from .span_llm_as_judge_code_public import SpanLlmAsJudgeCodePublic
|
|
11
13
|
from .trace_filter_public import TraceFilterPublic
|
|
14
|
+
from .trace_thread_filter_public import TraceThreadFilterPublic
|
|
12
15
|
from .trace_thread_llm_as_judge_code_public import TraceThreadLlmAsJudgeCodePublic
|
|
13
16
|
from .trace_thread_user_defined_metric_python_code_public import TraceThreadUserDefinedMetricPythonCodePublic
|
|
14
17
|
from .user_defined_metric_python_code_public import UserDefinedMetricPythonCodePublic
|
|
@@ -21,7 +24,6 @@ class Base(UniversalBaseModel):
|
|
|
21
24
|
name: str
|
|
22
25
|
sampling_rate: typing.Optional[float] = None
|
|
23
26
|
enabled: typing.Optional[bool] = None
|
|
24
|
-
filters: typing.Optional[typing.List[TraceFilterPublic]] = None
|
|
25
27
|
created_at: typing.Optional[dt.datetime] = None
|
|
26
28
|
created_by: typing.Optional[str] = None
|
|
27
29
|
last_updated_at: typing.Optional[dt.datetime] = None
|
|
@@ -40,6 +42,7 @@ class Base(UniversalBaseModel):
|
|
|
40
42
|
|
|
41
43
|
class AutomationRuleEvaluatorPublic_LlmAsJudge(Base):
|
|
42
44
|
type: typing.Literal["llm_as_judge"] = "llm_as_judge"
|
|
45
|
+
filters: typing.Optional[typing.List[TraceFilterPublic]] = None
|
|
43
46
|
code: typing.Optional[LlmAsJudgeCodePublic] = None
|
|
44
47
|
|
|
45
48
|
if IS_PYDANTIC_V2:
|
|
@@ -54,6 +57,7 @@ class AutomationRuleEvaluatorPublic_LlmAsJudge(Base):
|
|
|
54
57
|
|
|
55
58
|
class AutomationRuleEvaluatorPublic_UserDefinedMetricPython(Base):
|
|
56
59
|
type: typing.Literal["user_defined_metric_python"] = "user_defined_metric_python"
|
|
60
|
+
filters: typing.Optional[typing.List[TraceFilterPublic]] = None
|
|
57
61
|
code: typing.Optional[UserDefinedMetricPythonCodePublic] = None
|
|
58
62
|
|
|
59
63
|
if IS_PYDANTIC_V2:
|
|
@@ -68,6 +72,7 @@ class AutomationRuleEvaluatorPublic_UserDefinedMetricPython(Base):
|
|
|
68
72
|
|
|
69
73
|
class AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge(Base):
|
|
70
74
|
type: typing.Literal["trace_thread_llm_as_judge"] = "trace_thread_llm_as_judge"
|
|
75
|
+
filters: typing.Optional[typing.List[TraceThreadFilterPublic]] = None
|
|
71
76
|
code: typing.Optional[TraceThreadLlmAsJudgeCodePublic] = None
|
|
72
77
|
|
|
73
78
|
if IS_PYDANTIC_V2:
|
|
@@ -82,6 +87,7 @@ class AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge(Base):
|
|
|
82
87
|
|
|
83
88
|
class AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython(Base):
|
|
84
89
|
type: typing.Literal["trace_thread_user_defined_metric_python"] = "trace_thread_user_defined_metric_python"
|
|
90
|
+
filters: typing.Optional[typing.List[TraceThreadFilterPublic]] = None
|
|
85
91
|
code: typing.Optional[TraceThreadUserDefinedMetricPythonCodePublic] = None
|
|
86
92
|
|
|
87
93
|
if IS_PYDANTIC_V2:
|
|
@@ -94,9 +100,25 @@ class AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython(Base):
|
|
|
94
100
|
extra = pydantic.Extra.allow
|
|
95
101
|
|
|
96
102
|
|
|
103
|
+
class AutomationRuleEvaluatorPublic_SpanLlmAsJudge(Base):
|
|
104
|
+
type: typing.Literal["span_llm_as_judge"] = "span_llm_as_judge"
|
|
105
|
+
filters: typing.Optional[typing.List[SpanFilterPublic]] = None
|
|
106
|
+
code: typing.Optional[SpanLlmAsJudgeCodePublic] = None
|
|
107
|
+
|
|
108
|
+
if IS_PYDANTIC_V2:
|
|
109
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
110
|
+
else:
|
|
111
|
+
|
|
112
|
+
class Config:
|
|
113
|
+
frozen = True
|
|
114
|
+
smart_union = True
|
|
115
|
+
extra = pydantic.Extra.allow
|
|
116
|
+
|
|
117
|
+
|
|
97
118
|
AutomationRuleEvaluatorPublic = typing.Union[
|
|
98
119
|
AutomationRuleEvaluatorPublic_LlmAsJudge,
|
|
99
120
|
AutomationRuleEvaluatorPublic_UserDefinedMetricPython,
|
|
100
121
|
AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge,
|
|
101
122
|
AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython,
|
|
123
|
+
AutomationRuleEvaluatorPublic_SpanLlmAsJudge,
|
|
102
124
|
]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .span_filter import SpanFilter
|
|
8
|
+
from .span_llm_as_judge_code import SpanLlmAsJudgeCode
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AutomationRuleEvaluatorSpanLlmAsJudge(UniversalBaseModel):
|
|
12
|
+
filters: typing.Optional[typing.List[SpanFilter]] = None
|
|
13
|
+
code: typing.Optional[SpanLlmAsJudgeCode] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|