scale-gp-beta 0.1.0a8__py3-none-any.whl → 0.1.0a10__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.
- scale_gp_beta/_base_client.py +40 -2
- scale_gp_beta/_client.py +9 -1
- scale_gp_beta/_models.py +0 -1
- scale_gp_beta/_utils/_transform.py +46 -1
- scale_gp_beta/_utils/_typing.py +3 -1
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/resources/__init__.py +14 -0
- scale_gp_beta/resources/chat/completions.py +6 -2
- scale_gp_beta/resources/completions.py +6 -2
- scale_gp_beta/resources/datasets.py +17 -1
- scale_gp_beta/resources/evaluations.py +40 -4
- scale_gp_beta/resources/spans.py +654 -0
- scale_gp_beta/types/__init__.py +5 -0
- scale_gp_beta/types/dataset.py +4 -1
- scale_gp_beta/types/dataset_create_params.py +4 -1
- scale_gp_beta/types/dataset_update_params.py +4 -0
- scale_gp_beta/types/evaluation.py +7 -0
- scale_gp_beta/types/evaluation_create_params.py +12 -0
- scale_gp_beta/types/evaluation_list_params.py +4 -2
- scale_gp_beta/types/evaluation_retrieve_params.py +4 -1
- scale_gp_beta/types/evaluation_task.py +205 -0
- scale_gp_beta/types/evaluation_task_param.py +39 -45
- scale_gp_beta/types/span.py +38 -0
- scale_gp_beta/types/span_create_params.py +58 -0
- scale_gp_beta/types/span_list_params.py +27 -0
- scale_gp_beta/types/span_update_params.py +21 -0
- {scale_gp_beta-0.1.0a8.dist-info → scale_gp_beta-0.1.0a10.dist-info}/METADATA +8 -8
- {scale_gp_beta-0.1.0a8.dist-info → scale_gp_beta-0.1.0a10.dist-info}/RECORD +30 -24
- {scale_gp_beta-0.1.0a8.dist-info → scale_gp_beta-0.1.0a10.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a8.dist-info → scale_gp_beta-0.1.0a10.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict, Iterable
|
|
5
|
+
from typing import Dict, List, Iterable
|
|
6
6
|
from typing_extensions import Required, TypedDict
|
|
7
7
|
|
|
8
8
|
__all__ = ["DatasetCreateParams"]
|
|
@@ -15,3 +15,6 @@ class DatasetCreateParams(TypedDict, total=False):
|
|
|
15
15
|
name: Required[str]
|
|
16
16
|
|
|
17
17
|
description: str
|
|
18
|
+
|
|
19
|
+
tags: List[str]
|
|
20
|
+
"""The tags associated with the entity"""
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from typing import List
|
|
5
6
|
from typing_extensions import TypedDict
|
|
6
7
|
|
|
7
8
|
__all__ = ["DatasetUpdateParams"]
|
|
@@ -11,3 +12,6 @@ class DatasetUpdateParams(TypedDict, total=False):
|
|
|
11
12
|
description: str
|
|
12
13
|
|
|
13
14
|
name: str
|
|
15
|
+
|
|
16
|
+
tags: List[str]
|
|
17
|
+
"""The tags associated with the entity"""
|
|
@@ -6,6 +6,7 @@ from typing_extensions import Literal
|
|
|
6
6
|
|
|
7
7
|
from .dataset import Dataset
|
|
8
8
|
from .._models import BaseModel
|
|
9
|
+
from .evaluation_task import EvaluationTask
|
|
9
10
|
|
|
10
11
|
__all__ = ["Evaluation"]
|
|
11
12
|
|
|
@@ -23,8 +24,14 @@ class Evaluation(BaseModel):
|
|
|
23
24
|
|
|
24
25
|
status: Literal["failed", "completed", "running"]
|
|
25
26
|
|
|
27
|
+
tags: List[str]
|
|
28
|
+
"""The tags associated with the entity"""
|
|
29
|
+
|
|
26
30
|
archived_at: Optional[datetime] = None
|
|
27
31
|
|
|
28
32
|
description: Optional[str] = None
|
|
29
33
|
|
|
30
34
|
object: Optional[Literal["evaluation"]] = None
|
|
35
|
+
|
|
36
|
+
tasks: Optional[List[EvaluationTask]] = None
|
|
37
|
+
"""Tasks executed during evaluation. Populated with optional `task` view."""
|
|
@@ -25,6 +25,9 @@ class EvaluationStandaloneCreateRequest(TypedDict, total=False):
|
|
|
25
25
|
|
|
26
26
|
description: str
|
|
27
27
|
|
|
28
|
+
tags: List[str]
|
|
29
|
+
"""The tags associated with the entity"""
|
|
30
|
+
|
|
28
31
|
tasks: Iterable[EvaluationTaskParam]
|
|
29
32
|
"""Tasks allow you to augment and evaluate your data"""
|
|
30
33
|
|
|
@@ -40,6 +43,9 @@ class EvaluationFromDatasetCreateRequest(TypedDict, total=False):
|
|
|
40
43
|
|
|
41
44
|
description: str
|
|
42
45
|
|
|
46
|
+
tags: List[str]
|
|
47
|
+
"""The tags associated with the entity"""
|
|
48
|
+
|
|
43
49
|
tasks: Iterable[EvaluationTaskParam]
|
|
44
50
|
"""Tasks allow you to augment and evaluate your data"""
|
|
45
51
|
|
|
@@ -64,6 +70,9 @@ class EvaluationWithDatasetCreateRequest(TypedDict, total=False):
|
|
|
64
70
|
|
|
65
71
|
description: str
|
|
66
72
|
|
|
73
|
+
tags: List[str]
|
|
74
|
+
"""The tags associated with the entity"""
|
|
75
|
+
|
|
67
76
|
tasks: Iterable[EvaluationTaskParam]
|
|
68
77
|
"""Tasks allow you to augment and evaluate your data"""
|
|
69
78
|
|
|
@@ -79,6 +88,9 @@ class EvaluationWithDatasetCreateRequestDataset(TypedDict, total=False):
|
|
|
79
88
|
If not provided, all keys will be included.
|
|
80
89
|
"""
|
|
81
90
|
|
|
91
|
+
tags: List[str]
|
|
92
|
+
"""The tags associated with the entity"""
|
|
93
|
+
|
|
82
94
|
|
|
83
95
|
EvaluationCreateParams: TypeAlias = Union[
|
|
84
96
|
EvaluationStandaloneCreateRequest, EvaluationFromDatasetCreateRequest, EvaluationWithDatasetCreateRequest
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
6
|
-
from typing_extensions import TypedDict
|
|
5
|
+
from typing import List, Optional
|
|
6
|
+
from typing_extensions import Literal, TypedDict
|
|
7
7
|
|
|
8
8
|
__all__ = ["EvaluationListParams"]
|
|
9
9
|
|
|
@@ -16,3 +16,5 @@ class EvaluationListParams(TypedDict, total=False):
|
|
|
16
16
|
limit: int
|
|
17
17
|
|
|
18
18
|
starting_after: Optional[str]
|
|
19
|
+
|
|
20
|
+
views: List[Literal["tasks"]]
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from
|
|
5
|
+
from typing import List
|
|
6
|
+
from typing_extensions import Literal, TypedDict
|
|
6
7
|
|
|
7
8
|
__all__ = ["EvaluationRetrieveParams"]
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class EvaluationRetrieveParams(TypedDict, total=False):
|
|
11
12
|
include_archived: bool
|
|
13
|
+
|
|
14
|
+
views: List[Literal["tasks"]]
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Dict, List, Union, Optional
|
|
4
|
+
from typing_extensions import Literal, Annotated, TypeAlias
|
|
5
|
+
|
|
6
|
+
from .._utils import PropertyInfo
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
"EvaluationTask",
|
|
11
|
+
"ChatCompletionEvaluationTask",
|
|
12
|
+
"ChatCompletionEvaluationTaskConfiguration",
|
|
13
|
+
"GenericInferenceEvaluationTask",
|
|
14
|
+
"GenericInferenceEvaluationTaskConfiguration",
|
|
15
|
+
"GenericInferenceEvaluationTaskConfigurationInferenceConfiguration",
|
|
16
|
+
"GenericInferenceEvaluationTaskConfigurationInferenceConfigurationLaunchInferenceConfiguration",
|
|
17
|
+
"ApplicationVariantV1EvaluationTask",
|
|
18
|
+
"ApplicationVariantV1EvaluationTaskConfiguration",
|
|
19
|
+
"ApplicationVariantV1EvaluationTaskConfigurationHistoryUnionMember0",
|
|
20
|
+
"ApplicationVariantV1EvaluationTaskConfigurationOverrides",
|
|
21
|
+
"ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides",
|
|
22
|
+
"ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState",
|
|
23
|
+
"ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ChatCompletionEvaluationTaskConfiguration(BaseModel):
|
|
28
|
+
messages: Union[List[Dict[str, object]], str]
|
|
29
|
+
|
|
30
|
+
model: str
|
|
31
|
+
|
|
32
|
+
audio: Union[Dict[str, object], str, None] = None
|
|
33
|
+
|
|
34
|
+
frequency_penalty: Union[float, str, None] = None
|
|
35
|
+
|
|
36
|
+
function_call: Union[Dict[str, object], str, None] = None
|
|
37
|
+
|
|
38
|
+
functions: Union[List[Dict[str, object]], str, None] = None
|
|
39
|
+
|
|
40
|
+
logit_bias: Union[Dict[str, int], str, None] = None
|
|
41
|
+
|
|
42
|
+
logprobs: Union[bool, str, None] = None
|
|
43
|
+
|
|
44
|
+
max_completion_tokens: Union[int, str, None] = None
|
|
45
|
+
|
|
46
|
+
max_tokens: Union[int, str, None] = None
|
|
47
|
+
|
|
48
|
+
metadata: Union[Dict[str, str], str, None] = None
|
|
49
|
+
|
|
50
|
+
modalities: Union[List[str], str, None] = None
|
|
51
|
+
|
|
52
|
+
n: Union[int, str, None] = None
|
|
53
|
+
|
|
54
|
+
parallel_tool_calls: Union[bool, str, None] = None
|
|
55
|
+
|
|
56
|
+
prediction: Union[Dict[str, object], str, None] = None
|
|
57
|
+
|
|
58
|
+
presence_penalty: Union[float, str, None] = None
|
|
59
|
+
|
|
60
|
+
reasoning_effort: Optional[str] = None
|
|
61
|
+
|
|
62
|
+
response_format: Union[Dict[str, object], str, None] = None
|
|
63
|
+
|
|
64
|
+
seed: Union[int, str, None] = None
|
|
65
|
+
|
|
66
|
+
stop: Optional[str] = None
|
|
67
|
+
|
|
68
|
+
store: Union[bool, str, None] = None
|
|
69
|
+
|
|
70
|
+
temperature: Union[float, str, None] = None
|
|
71
|
+
|
|
72
|
+
tool_choice: Optional[str] = None
|
|
73
|
+
|
|
74
|
+
tools: Union[List[Dict[str, object]], str, None] = None
|
|
75
|
+
|
|
76
|
+
top_k: Union[int, str, None] = None
|
|
77
|
+
|
|
78
|
+
top_logprobs: Union[int, str, None] = None
|
|
79
|
+
|
|
80
|
+
top_p: Union[float, str, None] = None
|
|
81
|
+
|
|
82
|
+
if TYPE_CHECKING:
|
|
83
|
+
# Stub to indicate that arbitrary properties are accepted.
|
|
84
|
+
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
85
|
+
# `getattr(obj, '$type')`
|
|
86
|
+
def __getattr__(self, attr: str) -> object: ...
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class ChatCompletionEvaluationTask(BaseModel):
|
|
90
|
+
configuration: ChatCompletionEvaluationTaskConfiguration
|
|
91
|
+
|
|
92
|
+
alias: Optional[str] = None
|
|
93
|
+
"""Alias to title the results column. Defaults to the `task_type`"""
|
|
94
|
+
|
|
95
|
+
task_type: Optional[Literal["chat_completion"]] = None
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class GenericInferenceEvaluationTaskConfigurationInferenceConfigurationLaunchInferenceConfiguration(BaseModel):
|
|
99
|
+
num_retries: Optional[int] = None
|
|
100
|
+
|
|
101
|
+
timeout_seconds: Optional[int] = None
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
GenericInferenceEvaluationTaskConfigurationInferenceConfiguration: TypeAlias = Union[
|
|
105
|
+
GenericInferenceEvaluationTaskConfigurationInferenceConfigurationLaunchInferenceConfiguration, str
|
|
106
|
+
]
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class GenericInferenceEvaluationTaskConfiguration(BaseModel):
|
|
110
|
+
model: str
|
|
111
|
+
|
|
112
|
+
args: Union[Dict[str, object], str, None] = None
|
|
113
|
+
|
|
114
|
+
inference_configuration: Optional[GenericInferenceEvaluationTaskConfigurationInferenceConfiguration] = None
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class GenericInferenceEvaluationTask(BaseModel):
|
|
118
|
+
configuration: GenericInferenceEvaluationTaskConfiguration
|
|
119
|
+
|
|
120
|
+
alias: Optional[str] = None
|
|
121
|
+
"""Alias to title the results column. Defaults to the `task_type`"""
|
|
122
|
+
|
|
123
|
+
task_type: Optional[Literal["inference"]] = None
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class ApplicationVariantV1EvaluationTaskConfigurationHistoryUnionMember0(BaseModel):
|
|
127
|
+
request: str
|
|
128
|
+
"""Request inputs"""
|
|
129
|
+
|
|
130
|
+
response: str
|
|
131
|
+
"""Response outputs"""
|
|
132
|
+
|
|
133
|
+
session_data: Optional[Dict[str, object]] = None
|
|
134
|
+
"""Session data corresponding to the request response pair"""
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
class ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState(BaseModel):
|
|
138
|
+
current_node: str
|
|
139
|
+
|
|
140
|
+
state: Dict[str, object]
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace(BaseModel):
|
|
144
|
+
duration_ms: int
|
|
145
|
+
|
|
146
|
+
node_id: str
|
|
147
|
+
|
|
148
|
+
operation_input: str
|
|
149
|
+
|
|
150
|
+
operation_output: str
|
|
151
|
+
|
|
152
|
+
operation_type: str
|
|
153
|
+
|
|
154
|
+
start_timestamp: str
|
|
155
|
+
|
|
156
|
+
workflow_id: str
|
|
157
|
+
|
|
158
|
+
operation_metadata: Optional[Dict[str, object]] = None
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
class ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides(BaseModel):
|
|
162
|
+
concurrent: Optional[bool] = None
|
|
163
|
+
|
|
164
|
+
initial_state: Optional[
|
|
165
|
+
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState
|
|
166
|
+
] = None
|
|
167
|
+
|
|
168
|
+
partial_trace: Optional[
|
|
169
|
+
List[ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace]
|
|
170
|
+
] = None
|
|
171
|
+
|
|
172
|
+
use_channels: Optional[bool] = None
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
ApplicationVariantV1EvaluationTaskConfigurationOverrides: TypeAlias = Union[
|
|
176
|
+
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides, str
|
|
177
|
+
]
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class ApplicationVariantV1EvaluationTaskConfiguration(BaseModel):
|
|
181
|
+
application_variant_id: str
|
|
182
|
+
|
|
183
|
+
inputs: Union[Dict[str, object], str]
|
|
184
|
+
|
|
185
|
+
history: Union[List[ApplicationVariantV1EvaluationTaskConfigurationHistoryUnionMember0], str, None] = None
|
|
186
|
+
|
|
187
|
+
operation_metadata: Union[Dict[str, object], str, None] = None
|
|
188
|
+
|
|
189
|
+
overrides: Optional[ApplicationVariantV1EvaluationTaskConfigurationOverrides] = None
|
|
190
|
+
"""Execution override options for agentic applications"""
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
class ApplicationVariantV1EvaluationTask(BaseModel):
|
|
194
|
+
configuration: ApplicationVariantV1EvaluationTaskConfiguration
|
|
195
|
+
|
|
196
|
+
alias: Optional[str] = None
|
|
197
|
+
"""Alias to title the results column. Defaults to the `task_type`"""
|
|
198
|
+
|
|
199
|
+
task_type: Optional[Literal["application_variant"]] = None
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
EvaluationTask: TypeAlias = Annotated[
|
|
203
|
+
Union[ChatCompletionEvaluationTask, GenericInferenceEvaluationTask, ApplicationVariantV1EvaluationTask],
|
|
204
|
+
PropertyInfo(discriminator="task_type"),
|
|
205
|
+
]
|
|
@@ -7,23 +7,23 @@ from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
|
7
7
|
|
|
8
8
|
__all__ = [
|
|
9
9
|
"EvaluationTaskParam",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
10
|
+
"ChatCompletionEvaluationTask",
|
|
11
|
+
"ChatCompletionEvaluationTaskConfiguration",
|
|
12
|
+
"GenericInferenceEvaluationTask",
|
|
13
|
+
"GenericInferenceEvaluationTaskConfiguration",
|
|
14
|
+
"GenericInferenceEvaluationTaskConfigurationInferenceConfiguration",
|
|
15
|
+
"GenericInferenceEvaluationTaskConfigurationInferenceConfigurationLaunchInferenceConfiguration",
|
|
16
|
+
"ApplicationVariantV1EvaluationTask",
|
|
17
|
+
"ApplicationVariantV1EvaluationTaskConfiguration",
|
|
18
|
+
"ApplicationVariantV1EvaluationTaskConfigurationHistoryUnionMember0",
|
|
19
|
+
"ApplicationVariantV1EvaluationTaskConfigurationOverrides",
|
|
20
|
+
"ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides",
|
|
21
|
+
"ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState",
|
|
22
|
+
"ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace",
|
|
23
23
|
]
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class ChatCompletionEvaluationTaskConfigurationTyped(TypedDict, total=False):
|
|
27
27
|
messages: Required[Union[Iterable[Dict[str, object]], str]]
|
|
28
28
|
|
|
29
29
|
model: Required[str]
|
|
@@ -79,13 +79,13 @@ class ChatCompletionEvaluationTaskRequestConfigurationTyped(TypedDict, total=Fal
|
|
|
79
79
|
top_p: Union[float, str]
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
ChatCompletionEvaluationTaskConfiguration: TypeAlias = Union[
|
|
83
|
+
ChatCompletionEvaluationTaskConfigurationTyped, Dict[str, object]
|
|
84
84
|
]
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
class
|
|
88
|
-
configuration: Required[
|
|
87
|
+
class ChatCompletionEvaluationTask(TypedDict, total=False):
|
|
88
|
+
configuration: Required[ChatCompletionEvaluationTaskConfiguration]
|
|
89
89
|
|
|
90
90
|
alias: str
|
|
91
91
|
"""Alias to title the results column. Defaults to the `task_type`"""
|
|
@@ -93,7 +93,7 @@ class ChatCompletionEvaluationTaskRequest(TypedDict, total=False):
|
|
|
93
93
|
task_type: Literal["chat_completion"]
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
class
|
|
96
|
+
class GenericInferenceEvaluationTaskConfigurationInferenceConfigurationLaunchInferenceConfiguration(
|
|
97
97
|
TypedDict, total=False
|
|
98
98
|
):
|
|
99
99
|
num_retries: int
|
|
@@ -101,21 +101,21 @@ class GenericInferenceEvaluationTaskRequestConfigurationInferenceConfigurationLa
|
|
|
101
101
|
timeout_seconds: int
|
|
102
102
|
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
GenericInferenceEvaluationTaskConfigurationInferenceConfiguration: TypeAlias = Union[
|
|
105
|
+
GenericInferenceEvaluationTaskConfigurationInferenceConfigurationLaunchInferenceConfiguration, str
|
|
106
106
|
]
|
|
107
107
|
|
|
108
108
|
|
|
109
|
-
class
|
|
109
|
+
class GenericInferenceEvaluationTaskConfiguration(TypedDict, total=False):
|
|
110
110
|
model: Required[str]
|
|
111
111
|
|
|
112
112
|
args: Union[Dict[str, object], str]
|
|
113
113
|
|
|
114
|
-
inference_configuration:
|
|
114
|
+
inference_configuration: GenericInferenceEvaluationTaskConfigurationInferenceConfiguration
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
class
|
|
118
|
-
configuration: Required[
|
|
117
|
+
class GenericInferenceEvaluationTask(TypedDict, total=False):
|
|
118
|
+
configuration: Required[GenericInferenceEvaluationTaskConfiguration]
|
|
119
119
|
|
|
120
120
|
alias: str
|
|
121
121
|
"""Alias to title the results column. Defaults to the `task_type`"""
|
|
@@ -123,7 +123,7 @@ class GenericInferenceEvaluationTaskRequest(TypedDict, total=False):
|
|
|
123
123
|
task_type: Literal["inference"]
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
class
|
|
126
|
+
class ApplicationVariantV1EvaluationTaskConfigurationHistoryUnionMember0(TypedDict, total=False):
|
|
127
127
|
request: Required[str]
|
|
128
128
|
"""Request inputs"""
|
|
129
129
|
|
|
@@ -134,7 +134,7 @@ class ApplicationVariantV1EvaluationTaskRequestConfigurationHistoryUnionMember0(
|
|
|
134
134
|
"""Session data corresponding to the request response pair"""
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
class
|
|
137
|
+
class ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState(
|
|
138
138
|
TypedDict, total=False
|
|
139
139
|
):
|
|
140
140
|
current_node: Required[str]
|
|
@@ -142,7 +142,7 @@ class ApplicationVariantV1EvaluationTaskRequestConfigurationOverridesAgenticAppl
|
|
|
142
142
|
state: Required[Dict[str, object]]
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
class
|
|
145
|
+
class ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace(
|
|
146
146
|
TypedDict, total=False
|
|
147
147
|
):
|
|
148
148
|
duration_ms: Required[int]
|
|
@@ -162,42 +162,38 @@ class ApplicationVariantV1EvaluationTaskRequestConfigurationOverridesAgenticAppl
|
|
|
162
162
|
operation_metadata: Dict[str, object]
|
|
163
163
|
|
|
164
164
|
|
|
165
|
-
class
|
|
166
|
-
TypedDict, total=False
|
|
167
|
-
):
|
|
165
|
+
class ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides(TypedDict, total=False):
|
|
168
166
|
concurrent: bool
|
|
169
167
|
|
|
170
|
-
initial_state:
|
|
171
|
-
ApplicationVariantV1EvaluationTaskRequestConfigurationOverridesAgenticApplicationOverridesInitialState
|
|
172
|
-
)
|
|
168
|
+
initial_state: ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState
|
|
173
169
|
|
|
174
170
|
partial_trace: Iterable[
|
|
175
|
-
|
|
171
|
+
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace
|
|
176
172
|
]
|
|
177
173
|
|
|
178
174
|
use_channels: bool
|
|
179
175
|
|
|
180
176
|
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
ApplicationVariantV1EvaluationTaskConfigurationOverrides: TypeAlias = Union[
|
|
178
|
+
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides, str
|
|
183
179
|
]
|
|
184
180
|
|
|
185
181
|
|
|
186
|
-
class
|
|
182
|
+
class ApplicationVariantV1EvaluationTaskConfiguration(TypedDict, total=False):
|
|
187
183
|
application_variant_id: Required[str]
|
|
188
184
|
|
|
189
185
|
inputs: Required[Union[Dict[str, object], str]]
|
|
190
186
|
|
|
191
|
-
history: Union[Iterable[
|
|
187
|
+
history: Union[Iterable[ApplicationVariantV1EvaluationTaskConfigurationHistoryUnionMember0], str]
|
|
192
188
|
|
|
193
189
|
operation_metadata: Union[Dict[str, object], str]
|
|
194
190
|
|
|
195
|
-
overrides:
|
|
191
|
+
overrides: ApplicationVariantV1EvaluationTaskConfigurationOverrides
|
|
196
192
|
"""Execution override options for agentic applications"""
|
|
197
193
|
|
|
198
194
|
|
|
199
|
-
class
|
|
200
|
-
configuration: Required[
|
|
195
|
+
class ApplicationVariantV1EvaluationTask(TypedDict, total=False):
|
|
196
|
+
configuration: Required[ApplicationVariantV1EvaluationTaskConfiguration]
|
|
201
197
|
|
|
202
198
|
alias: str
|
|
203
199
|
"""Alias to title the results column. Defaults to the `task_type`"""
|
|
@@ -206,7 +202,5 @@ class ApplicationVariantV1EvaluationTaskRequest(TypedDict, total=False):
|
|
|
206
202
|
|
|
207
203
|
|
|
208
204
|
EvaluationTaskParam: TypeAlias = Union[
|
|
209
|
-
|
|
210
|
-
GenericInferenceEvaluationTaskRequest,
|
|
211
|
-
ApplicationVariantV1EvaluationTaskRequest,
|
|
205
|
+
ChatCompletionEvaluationTask, GenericInferenceEvaluationTask, ApplicationVariantV1EvaluationTask
|
|
212
206
|
]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import builtins
|
|
4
|
+
from typing import Dict, Optional
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["Span"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Span(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
|
|
16
|
+
account_id: str
|
|
17
|
+
|
|
18
|
+
created_by_user_id: str
|
|
19
|
+
|
|
20
|
+
name: str
|
|
21
|
+
|
|
22
|
+
start_timestamp: datetime
|
|
23
|
+
|
|
24
|
+
trace_id: str
|
|
25
|
+
"""id for grouping traces together, uuid is recommended"""
|
|
26
|
+
|
|
27
|
+
data: Optional[Dict[str, object]] = None
|
|
28
|
+
|
|
29
|
+
end_timestamp: Optional[datetime] = None
|
|
30
|
+
|
|
31
|
+
input: Optional[Dict[str, object]] = None
|
|
32
|
+
|
|
33
|
+
object: Optional[Literal["span"]] = None
|
|
34
|
+
|
|
35
|
+
output: Optional[Dict[str, builtins.object]] = None
|
|
36
|
+
|
|
37
|
+
parent_id: Optional[str] = None
|
|
38
|
+
"""Reference to a parent span_id"""
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Required, Annotated, TypeAlias, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["SpanCreateParams", "BaseSpanCreateRequest", "LegacyApplicationSpanCreateRequest"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class BaseSpanCreateRequest(TypedDict, total=False):
|
|
15
|
+
name: Required[str]
|
|
16
|
+
|
|
17
|
+
start_timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
18
|
+
|
|
19
|
+
trace_id: Required[str]
|
|
20
|
+
"""id for grouping traces together, uuid is recommended"""
|
|
21
|
+
|
|
22
|
+
data: Dict[str, object]
|
|
23
|
+
|
|
24
|
+
end_timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
|
25
|
+
|
|
26
|
+
input: Dict[str, object]
|
|
27
|
+
|
|
28
|
+
output: Dict[str, object]
|
|
29
|
+
|
|
30
|
+
parent_id: str
|
|
31
|
+
"""Reference to a parent span_id"""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class LegacyApplicationSpanCreateRequest(TypedDict, total=False):
|
|
35
|
+
application_interaction_id: Required[str]
|
|
36
|
+
|
|
37
|
+
application_variant_id: Required[str]
|
|
38
|
+
|
|
39
|
+
name: Required[str]
|
|
40
|
+
|
|
41
|
+
start_timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
42
|
+
|
|
43
|
+
trace_id: Required[str]
|
|
44
|
+
"""id for grouping traces together, uuid is recommended"""
|
|
45
|
+
|
|
46
|
+
data: Dict[str, object]
|
|
47
|
+
|
|
48
|
+
end_timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
|
49
|
+
|
|
50
|
+
input: Dict[str, object]
|
|
51
|
+
|
|
52
|
+
output: Dict[str, object]
|
|
53
|
+
|
|
54
|
+
parent_id: str
|
|
55
|
+
"""Reference to a parent span_id"""
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
SpanCreateParams: TypeAlias = Union[BaseSpanCreateRequest, LegacyApplicationSpanCreateRequest]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["SpanListParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SpanListParams(TypedDict, total=False):
|
|
15
|
+
ending_before: Optional[str]
|
|
16
|
+
|
|
17
|
+
from_ts: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
18
|
+
|
|
19
|
+
limit: int
|
|
20
|
+
|
|
21
|
+
parents_only: Optional[bool]
|
|
22
|
+
|
|
23
|
+
starting_after: Optional[str]
|
|
24
|
+
|
|
25
|
+
to_ts: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
26
|
+
|
|
27
|
+
trace_id: Optional[str]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["SpanUpdateParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SpanUpdateParams(TypedDict, total=False):
|
|
15
|
+
data: Dict[str, object]
|
|
16
|
+
|
|
17
|
+
end_timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
|
18
|
+
|
|
19
|
+
name: str
|
|
20
|
+
|
|
21
|
+
output: Dict[str, object]
|