-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathevaluator_response.py
More file actions
146 lines (117 loc) · 4.86 KB
/
evaluator_response.py
File metadata and controls
146 lines (117 loc) · 4.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
import datetime as dt
import typing
import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel
from .environment_response import EnvironmentResponse
from .evaluator_aggregate import EvaluatorAggregate
from .evaluator_response_spec import EvaluatorResponseSpec
from .input_response import InputResponse
from .user_response import UserResponse
class EvaluatorResponse(UncheckedBaseModel):
"""
Version of the Evaluator used to provide judgments.
"""
path: str = pydantic.Field()
"""
Path of the Evaluator including the Evaluator name, which is used as a unique identifier.
"""
id: str = pydantic.Field()
"""
Unique identifier for the Evaluator.
"""
directory_id: typing.Optional[str] = pydantic.Field(default=None)
"""
ID of the directory that the file is in on Humanloop.
"""
version_name: typing.Optional[str] = pydantic.Field(default=None)
"""
Unique name for the Evaluator version. Version names must be unique for a given Evaluator.
"""
version_description: typing.Optional[str] = pydantic.Field(default=None)
"""
Description of the version, e.g., the changes made in this version.
"""
spec: EvaluatorResponseSpec
name: str = pydantic.Field()
"""
Name of the Evaluator, which is used as a unique identifier.
"""
description: typing.Optional[str] = pydantic.Field(default=None)
"""
Description of the Evaluator.
"""
schema_: typing_extensions.Annotated[
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="schema")
] = pydantic.Field(default=None)
"""
The JSON schema for the File.
"""
readme: typing.Optional[str] = pydantic.Field(default=None)
"""
Long description of the file.
"""
tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
"""
List of tags associated with the file.
"""
version_id: str = pydantic.Field()
"""
Unique identifier for the specific Evaluator Version. If no query params provided, the default deployed Evaluator Version is returned.
"""
type: typing.Optional[typing.Literal["evaluator"]] = None
environments: typing.Optional[typing.List[EnvironmentResponse]] = pydantic.Field(default=None)
"""
The list of environments the Evaluator Version is deployed to.
"""
created_at: dt.datetime
updated_at: dt.datetime
created_by: typing.Optional[UserResponse] = pydantic.Field(default=None)
"""
The user who created the Evaluator.
"""
last_used_at: dt.datetime
version_logs_count: int = pydantic.Field()
"""
The number of logs that have been generated for this Evaluator Version
"""
total_logs_count: int = pydantic.Field()
"""
The number of logs that have been generated across all Evaluator Versions
"""
inputs: typing.List[InputResponse] = pydantic.Field()
"""
Inputs associated to the Evaluator. Inputs correspond to any of the variables used within the Evaluator template.
"""
evaluators: typing.Optional[typing.List["MonitoringEvaluatorResponse"]] = pydantic.Field(default=None)
"""
Evaluators that have been attached to this Evaluator that are used for monitoring logs.
"""
evaluator_aggregates: typing.Optional[typing.List[EvaluatorAggregate]] = pydantic.Field(default=None)
"""
Aggregation of Evaluator results for the Evaluator Version.
"""
attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
"""
Additional fields to describe the Evaluator. Helpful to separate Evaluator versions from each other with details on how they were created or used.
"""
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow
from .agent_linked_file_response import AgentLinkedFileResponse # noqa: E402, F401, I001
from .agent_response import AgentResponse # noqa: E402, F401, I001
from .flow_response import FlowResponse # noqa: E402, F401, I001
from .monitoring_evaluator_response import MonitoringEvaluatorResponse # noqa: E402, F401, I001
from .prompt_response import PromptResponse # noqa: E402, F401, I001
from .tool_response import ToolResponse # noqa: E402, F401, I001
from .version_deployment_response import VersionDeploymentResponse # noqa: E402, F401, I001
from .version_id_response import VersionIdResponse # noqa: E402, F401, I001
update_forward_refs(EvaluatorResponse)