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/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,13 @@ 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
|
|
181
196
|
from .dataset_visibility import DatasetVisibility
|
|
182
197
|
from .delete_attachments_request import DeleteAttachmentsRequest
|
|
183
198
|
from .delete_attachments_request_entity_type import DeleteAttachmentsRequestEntityType
|
|
@@ -212,6 +227,9 @@ from .experiment_page_public import ExperimentPagePublic
|
|
|
212
227
|
from .experiment_public import ExperimentPublic
|
|
213
228
|
from .experiment_public_status import ExperimentPublicStatus
|
|
214
229
|
from .experiment_public_type import ExperimentPublicType
|
|
230
|
+
from .experiment_score import ExperimentScore
|
|
231
|
+
from .experiment_score_public import ExperimentScorePublic
|
|
232
|
+
from .experiment_score_write import ExperimentScoreWrite
|
|
215
233
|
from .experiment_status import ExperimentStatus
|
|
216
234
|
from .experiment_type import ExperimentType
|
|
217
235
|
from .export_trace_service_request import ExportTraceServiceRequest
|
|
@@ -329,6 +347,10 @@ from .optimization_page_public import OptimizationPagePublic
|
|
|
329
347
|
from .optimization_public import OptimizationPublic
|
|
330
348
|
from .optimization_public_status import OptimizationPublicStatus
|
|
331
349
|
from .optimization_status import OptimizationStatus
|
|
350
|
+
from .optimization_studio_config import OptimizationStudioConfig
|
|
351
|
+
from .optimization_studio_config_public import OptimizationStudioConfigPublic
|
|
352
|
+
from .optimization_studio_config_write import OptimizationStudioConfigWrite
|
|
353
|
+
from .optimization_studio_log import OptimizationStudioLog
|
|
332
354
|
from .optimization_write import OptimizationWrite
|
|
333
355
|
from .optimization_write_status import OptimizationWriteStatus
|
|
334
356
|
from .page_columns import PageColumns
|
|
@@ -357,19 +379,25 @@ from .project_stats_summary_item import ProjectStatsSummaryItem
|
|
|
357
379
|
from .project_visibility import ProjectVisibility
|
|
358
380
|
from .prompt import Prompt
|
|
359
381
|
from .prompt_detail import PromptDetail
|
|
382
|
+
from .prompt_detail_template_structure import PromptDetailTemplateStructure
|
|
360
383
|
from .prompt_page_public import PromptPagePublic
|
|
361
384
|
from .prompt_public import PromptPublic
|
|
385
|
+
from .prompt_public_template_structure import PromptPublicTemplateStructure
|
|
386
|
+
from .prompt_template_structure import PromptTemplateStructure
|
|
362
387
|
from .prompt_tokens_details import PromptTokensDetails
|
|
363
388
|
from .prompt_type import PromptType
|
|
364
389
|
from .prompt_version import PromptVersion
|
|
365
390
|
from .prompt_version_detail import PromptVersionDetail
|
|
391
|
+
from .prompt_version_detail_template_structure import PromptVersionDetailTemplateStructure
|
|
366
392
|
from .prompt_version_detail_type import PromptVersionDetailType
|
|
367
393
|
from .prompt_version_link import PromptVersionLink
|
|
368
394
|
from .prompt_version_link_public import PromptVersionLinkPublic
|
|
369
395
|
from .prompt_version_link_write import PromptVersionLinkWrite
|
|
370
396
|
from .prompt_version_page_public import PromptVersionPagePublic
|
|
371
397
|
from .prompt_version_public import PromptVersionPublic
|
|
398
|
+
from .prompt_version_public_template_structure import PromptVersionPublicTemplateStructure
|
|
372
399
|
from .prompt_version_public_type import PromptVersionPublicType
|
|
400
|
+
from .prompt_version_template_structure import PromptVersionTemplateStructure
|
|
373
401
|
from .prompt_version_type import PromptVersionType
|
|
374
402
|
from .provider_api_key import ProviderApiKey
|
|
375
403
|
from .provider_api_key_page_public import ProviderApiKeyPagePublic
|
|
@@ -387,8 +415,15 @@ from .span_batch import SpanBatch
|
|
|
387
415
|
from .span_enrichment_options import SpanEnrichmentOptions
|
|
388
416
|
from .span_experiment_item_bulk_write_view import SpanExperimentItemBulkWriteView
|
|
389
417
|
from .span_experiment_item_bulk_write_view_type import SpanExperimentItemBulkWriteViewType
|
|
418
|
+
from .span_filter import SpanFilter
|
|
419
|
+
from .span_filter_operator import SpanFilterOperator
|
|
390
420
|
from .span_filter_public import SpanFilterPublic
|
|
391
421
|
from .span_filter_public_operator import SpanFilterPublicOperator
|
|
422
|
+
from .span_filter_write import SpanFilterWrite
|
|
423
|
+
from .span_filter_write_operator import SpanFilterWriteOperator
|
|
424
|
+
from .span_llm_as_judge_code import SpanLlmAsJudgeCode
|
|
425
|
+
from .span_llm_as_judge_code_public import SpanLlmAsJudgeCodePublic
|
|
426
|
+
from .span_llm_as_judge_code_write import SpanLlmAsJudgeCodeWrite
|
|
392
427
|
from .span_page_public import SpanPagePublic
|
|
393
428
|
from .span_public import SpanPublic
|
|
394
429
|
from .span_public_type import SpanPublicType
|
|
@@ -400,6 +435,24 @@ from .span_write_type import SpanWriteType
|
|
|
400
435
|
from .spans_count_response import SpansCountResponse
|
|
401
436
|
from .start_multipart_upload_response import StartMultipartUploadResponse
|
|
402
437
|
from .stream_options import StreamOptions
|
|
438
|
+
from .studio_evaluation import StudioEvaluation
|
|
439
|
+
from .studio_evaluation_public import StudioEvaluationPublic
|
|
440
|
+
from .studio_evaluation_write import StudioEvaluationWrite
|
|
441
|
+
from .studio_llm_model import StudioLlmModel
|
|
442
|
+
from .studio_llm_model_public import StudioLlmModelPublic
|
|
443
|
+
from .studio_llm_model_write import StudioLlmModelWrite
|
|
444
|
+
from .studio_message import StudioMessage
|
|
445
|
+
from .studio_message_public import StudioMessagePublic
|
|
446
|
+
from .studio_message_write import StudioMessageWrite
|
|
447
|
+
from .studio_metric import StudioMetric
|
|
448
|
+
from .studio_metric_public import StudioMetricPublic
|
|
449
|
+
from .studio_metric_write import StudioMetricWrite
|
|
450
|
+
from .studio_optimizer import StudioOptimizer
|
|
451
|
+
from .studio_optimizer_public import StudioOptimizerPublic
|
|
452
|
+
from .studio_optimizer_write import StudioOptimizerWrite
|
|
453
|
+
from .studio_prompt import StudioPrompt
|
|
454
|
+
from .studio_prompt_public import StudioPromptPublic
|
|
455
|
+
from .studio_prompt_write import StudioPromptWrite
|
|
403
456
|
from .tool import Tool
|
|
404
457
|
from .tool_call import ToolCall
|
|
405
458
|
from .trace import Trace
|
|
@@ -421,6 +474,8 @@ from .trace_thread_filter import TraceThreadFilter
|
|
|
421
474
|
from .trace_thread_filter_operator import TraceThreadFilterOperator
|
|
422
475
|
from .trace_thread_filter_public import TraceThreadFilterPublic
|
|
423
476
|
from .trace_thread_filter_public_operator import TraceThreadFilterPublicOperator
|
|
477
|
+
from .trace_thread_filter_write import TraceThreadFilterWrite
|
|
478
|
+
from .trace_thread_filter_write_operator import TraceThreadFilterWriteOperator
|
|
424
479
|
from .trace_thread_identifier import TraceThreadIdentifier
|
|
425
480
|
from .trace_thread_llm_as_judge_code import TraceThreadLlmAsJudgeCode
|
|
426
481
|
from .trace_thread_llm_as_judge_code_public import TraceThreadLlmAsJudgeCodePublic
|
|
@@ -506,17 +561,22 @@ __all__ = [
|
|
|
506
561
|
"AutomationRuleEvaluatorLlmAsJudge",
|
|
507
562
|
"AutomationRuleEvaluatorLlmAsJudgePublic",
|
|
508
563
|
"AutomationRuleEvaluatorLlmAsJudgeWrite",
|
|
509
|
-
"
|
|
510
|
-
"
|
|
511
|
-
"
|
|
512
|
-
"
|
|
513
|
-
"
|
|
564
|
+
"AutomationRuleEvaluatorObjectObjectPublic",
|
|
565
|
+
"AutomationRuleEvaluatorObjectObjectPublic_LlmAsJudge",
|
|
566
|
+
"AutomationRuleEvaluatorObjectObjectPublic_SpanLlmAsJudge",
|
|
567
|
+
"AutomationRuleEvaluatorObjectObjectPublic_TraceThreadLlmAsJudge",
|
|
568
|
+
"AutomationRuleEvaluatorObjectObjectPublic_TraceThreadUserDefinedMetricPython",
|
|
569
|
+
"AutomationRuleEvaluatorObjectObjectPublic_UserDefinedMetricPython",
|
|
514
570
|
"AutomationRuleEvaluatorPagePublic",
|
|
515
571
|
"AutomationRuleEvaluatorPublic",
|
|
516
572
|
"AutomationRuleEvaluatorPublic_LlmAsJudge",
|
|
573
|
+
"AutomationRuleEvaluatorPublic_SpanLlmAsJudge",
|
|
517
574
|
"AutomationRuleEvaluatorPublic_TraceThreadLlmAsJudge",
|
|
518
575
|
"AutomationRuleEvaluatorPublic_TraceThreadUserDefinedMetricPython",
|
|
519
576
|
"AutomationRuleEvaluatorPublic_UserDefinedMetricPython",
|
|
577
|
+
"AutomationRuleEvaluatorSpanLlmAsJudge",
|
|
578
|
+
"AutomationRuleEvaluatorSpanLlmAsJudgePublic",
|
|
579
|
+
"AutomationRuleEvaluatorSpanLlmAsJudgeWrite",
|
|
520
580
|
"AutomationRuleEvaluatorTraceThreadLlmAsJudge",
|
|
521
581
|
"AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic",
|
|
522
582
|
"AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite",
|
|
@@ -525,10 +585,12 @@ __all__ = [
|
|
|
525
585
|
"AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite",
|
|
526
586
|
"AutomationRuleEvaluatorUpdate",
|
|
527
587
|
"AutomationRuleEvaluatorUpdateLlmAsJudge",
|
|
588
|
+
"AutomationRuleEvaluatorUpdateSpanLlmAsJudge",
|
|
528
589
|
"AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge",
|
|
529
590
|
"AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython",
|
|
530
591
|
"AutomationRuleEvaluatorUpdateUserDefinedMetricPython",
|
|
531
592
|
"AutomationRuleEvaluatorUpdate_LlmAsJudge",
|
|
593
|
+
"AutomationRuleEvaluatorUpdate_SpanLlmAsJudge",
|
|
532
594
|
"AutomationRuleEvaluatorUpdate_TraceThreadLlmAsJudge",
|
|
533
595
|
"AutomationRuleEvaluatorUpdate_TraceThreadUserDefinedMetricPython",
|
|
534
596
|
"AutomationRuleEvaluatorUpdate_UserDefinedMetricPython",
|
|
@@ -537,10 +599,12 @@ __all__ = [
|
|
|
537
599
|
"AutomationRuleEvaluatorUserDefinedMetricPythonWrite",
|
|
538
600
|
"AutomationRuleEvaluatorWrite",
|
|
539
601
|
"AutomationRuleEvaluatorWrite_LlmAsJudge",
|
|
602
|
+
"AutomationRuleEvaluatorWrite_SpanLlmAsJudge",
|
|
540
603
|
"AutomationRuleEvaluatorWrite_TraceThreadLlmAsJudge",
|
|
541
604
|
"AutomationRuleEvaluatorWrite_TraceThreadUserDefinedMetricPython",
|
|
542
605
|
"AutomationRuleEvaluatorWrite_UserDefinedMetricPython",
|
|
543
606
|
"AutomationRuleEvaluator_LlmAsJudge",
|
|
607
|
+
"AutomationRuleEvaluator_SpanLlmAsJudge",
|
|
544
608
|
"AutomationRuleEvaluator_TraceThreadLlmAsJudge",
|
|
545
609
|
"AutomationRuleEvaluator_TraceThreadUserDefinedMetricPython",
|
|
546
610
|
"AutomationRuleEvaluator_UserDefinedMetricPython",
|
|
@@ -613,7 +677,13 @@ __all__ = [
|
|
|
613
677
|
"DatasetItemWriteSource",
|
|
614
678
|
"DatasetPagePublic",
|
|
615
679
|
"DatasetPublic",
|
|
680
|
+
"DatasetPublicStatus",
|
|
616
681
|
"DatasetPublicVisibility",
|
|
682
|
+
"DatasetStatus",
|
|
683
|
+
"DatasetVersionDiff",
|
|
684
|
+
"DatasetVersionDiffStats",
|
|
685
|
+
"DatasetVersionPagePublic",
|
|
686
|
+
"DatasetVersionPublic",
|
|
617
687
|
"DatasetVisibility",
|
|
618
688
|
"DeleteAttachmentsRequest",
|
|
619
689
|
"DeleteAttachmentsRequestEntityType",
|
|
@@ -646,6 +716,9 @@ __all__ = [
|
|
|
646
716
|
"ExperimentPublic",
|
|
647
717
|
"ExperimentPublicStatus",
|
|
648
718
|
"ExperimentPublicType",
|
|
719
|
+
"ExperimentScore",
|
|
720
|
+
"ExperimentScorePublic",
|
|
721
|
+
"ExperimentScoreWrite",
|
|
649
722
|
"ExperimentStatus",
|
|
650
723
|
"ExperimentType",
|
|
651
724
|
"ExportTraceServiceRequest",
|
|
@@ -758,6 +831,10 @@ __all__ = [
|
|
|
758
831
|
"OptimizationPublic",
|
|
759
832
|
"OptimizationPublicStatus",
|
|
760
833
|
"OptimizationStatus",
|
|
834
|
+
"OptimizationStudioConfig",
|
|
835
|
+
"OptimizationStudioConfigPublic",
|
|
836
|
+
"OptimizationStudioConfigWrite",
|
|
837
|
+
"OptimizationStudioLog",
|
|
761
838
|
"OptimizationWrite",
|
|
762
839
|
"OptimizationWriteStatus",
|
|
763
840
|
"PageColumns",
|
|
@@ -784,19 +861,25 @@ __all__ = [
|
|
|
784
861
|
"ProjectVisibility",
|
|
785
862
|
"Prompt",
|
|
786
863
|
"PromptDetail",
|
|
864
|
+
"PromptDetailTemplateStructure",
|
|
787
865
|
"PromptPagePublic",
|
|
788
866
|
"PromptPublic",
|
|
867
|
+
"PromptPublicTemplateStructure",
|
|
868
|
+
"PromptTemplateStructure",
|
|
789
869
|
"PromptTokensDetails",
|
|
790
870
|
"PromptType",
|
|
791
871
|
"PromptVersion",
|
|
792
872
|
"PromptVersionDetail",
|
|
873
|
+
"PromptVersionDetailTemplateStructure",
|
|
793
874
|
"PromptVersionDetailType",
|
|
794
875
|
"PromptVersionLink",
|
|
795
876
|
"PromptVersionLinkPublic",
|
|
796
877
|
"PromptVersionLinkWrite",
|
|
797
878
|
"PromptVersionPagePublic",
|
|
798
879
|
"PromptVersionPublic",
|
|
880
|
+
"PromptVersionPublicTemplateStructure",
|
|
799
881
|
"PromptVersionPublicType",
|
|
882
|
+
"PromptVersionTemplateStructure",
|
|
800
883
|
"PromptVersionType",
|
|
801
884
|
"ProviderApiKey",
|
|
802
885
|
"ProviderApiKeyPagePublic",
|
|
@@ -814,8 +897,15 @@ __all__ = [
|
|
|
814
897
|
"SpanEnrichmentOptions",
|
|
815
898
|
"SpanExperimentItemBulkWriteView",
|
|
816
899
|
"SpanExperimentItemBulkWriteViewType",
|
|
900
|
+
"SpanFilter",
|
|
901
|
+
"SpanFilterOperator",
|
|
817
902
|
"SpanFilterPublic",
|
|
818
903
|
"SpanFilterPublicOperator",
|
|
904
|
+
"SpanFilterWrite",
|
|
905
|
+
"SpanFilterWriteOperator",
|
|
906
|
+
"SpanLlmAsJudgeCode",
|
|
907
|
+
"SpanLlmAsJudgeCodePublic",
|
|
908
|
+
"SpanLlmAsJudgeCodeWrite",
|
|
819
909
|
"SpanPagePublic",
|
|
820
910
|
"SpanPublic",
|
|
821
911
|
"SpanPublicType",
|
|
@@ -827,6 +917,24 @@ __all__ = [
|
|
|
827
917
|
"SpansCountResponse",
|
|
828
918
|
"StartMultipartUploadResponse",
|
|
829
919
|
"StreamOptions",
|
|
920
|
+
"StudioEvaluation",
|
|
921
|
+
"StudioEvaluationPublic",
|
|
922
|
+
"StudioEvaluationWrite",
|
|
923
|
+
"StudioLlmModel",
|
|
924
|
+
"StudioLlmModelPublic",
|
|
925
|
+
"StudioLlmModelWrite",
|
|
926
|
+
"StudioMessage",
|
|
927
|
+
"StudioMessagePublic",
|
|
928
|
+
"StudioMessageWrite",
|
|
929
|
+
"StudioMetric",
|
|
930
|
+
"StudioMetricPublic",
|
|
931
|
+
"StudioMetricWrite",
|
|
932
|
+
"StudioOptimizer",
|
|
933
|
+
"StudioOptimizerPublic",
|
|
934
|
+
"StudioOptimizerWrite",
|
|
935
|
+
"StudioPrompt",
|
|
936
|
+
"StudioPromptPublic",
|
|
937
|
+
"StudioPromptWrite",
|
|
830
938
|
"Tool",
|
|
831
939
|
"ToolCall",
|
|
832
940
|
"Trace",
|
|
@@ -848,6 +956,8 @@ __all__ = [
|
|
|
848
956
|
"TraceThreadFilterOperator",
|
|
849
957
|
"TraceThreadFilterPublic",
|
|
850
958
|
"TraceThreadFilterPublicOperator",
|
|
959
|
+
"TraceThreadFilterWrite",
|
|
960
|
+
"TraceThreadFilterWriteOperator",
|
|
851
961
|
"TraceThreadIdentifier",
|
|
852
962
|
"TraceThreadLlmAsJudgeCode",
|
|
853
963
|
"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
|