scale-gp-beta 0.1.0a28__py3-none-any.whl → 0.1.0a30__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 +4 -1
- scale_gp_beta/_client.py +9 -0
- scale_gp_beta/_files.py +4 -4
- scale_gp_beta/_models.py +24 -3
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/lib/CONTRIBUTING.MD +53 -0
- scale_gp_beta/lib/tracing/integrations/openai/openai_span_type_map.py +3 -3
- scale_gp_beta/lib/tracing/span.py +8 -7
- scale_gp_beta/lib/tracing/trace.py +7 -5
- scale_gp_beta/lib/tracing/trace_queue_manager.py +14 -0
- scale_gp_beta/lib/tracing/tracing.py +7 -5
- scale_gp_beta/lib/tracing/types.py +1 -39
- scale_gp_beta/resources/__init__.py +14 -0
- scale_gp_beta/resources/chat/completions.py +4 -0
- scale_gp_beta/resources/responses.py +314 -0
- scale_gp_beta/resources/spans.py +28 -144
- scale_gp_beta/types/__init__.py +19 -0
- scale_gp_beta/types/chat/chat_completion.py +61 -6
- scale_gp_beta/types/chat/chat_completion_chunk.py +17 -1
- scale_gp_beta/types/chat/completion_models_params.py +2 -0
- scale_gp_beta/types/chat/model_definition.py +6 -0
- scale_gp_beta/types/completion.py +8 -0
- scale_gp_beta/types/container.py +0 -6
- scale_gp_beta/types/dataset.py +3 -1
- scale_gp_beta/types/dataset_item.py +3 -1
- scale_gp_beta/types/evaluation.py +3 -7
- scale_gp_beta/types/evaluation_item.py +3 -1
- scale_gp_beta/types/evaluation_task.py +31 -55
- scale_gp_beta/types/evaluation_task_param.py +28 -1
- scale_gp_beta/types/file.py +3 -1
- scale_gp_beta/types/inference_model.py +3 -0
- scale_gp_beta/types/question.py +11 -10
- scale_gp_beta/types/response.py +2852 -0
- scale_gp_beta/types/response_create_params.py +817 -0
- scale_gp_beta/types/response_create_response.py +20891 -0
- scale_gp_beta/types/shared/__init__.py +3 -0
- scale_gp_beta/types/shared/identity.py +16 -0
- scale_gp_beta/types/span.py +9 -33
- scale_gp_beta/types/span_batch_params.py +6 -30
- scale_gp_beta/types/span_create_params.py +6 -30
- scale_gp_beta/types/span_search_params.py +8 -37
- scale_gp_beta/types/span_status.py +7 -0
- scale_gp_beta/types/span_type.py +33 -0
- scale_gp_beta/types/span_update_params.py +3 -2
- scale_gp_beta/types/span_upsert_batch_params.py +6 -30
- {scale_gp_beta-0.1.0a28.dist-info → scale_gp_beta-0.1.0a30.dist-info}/METADATA +2 -3
- {scale_gp_beta-0.1.0a28.dist-info → scale_gp_beta-0.1.0a30.dist-info}/RECORD +49 -40
- {scale_gp_beta-0.1.0a28.dist-info → scale_gp_beta-0.1.0a30.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a28.dist-info → scale_gp_beta-0.1.0a30.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import builtins
|
|
4
|
-
from typing import TYPE_CHECKING, List, Optional
|
|
5
|
-
from typing_extensions import Literal
|
|
4
|
+
from typing import TYPE_CHECKING, Dict, List, Union, Optional
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
6
8
|
|
|
7
9
|
from ..._models import BaseModel
|
|
8
10
|
|
|
@@ -15,7 +17,10 @@ __all__ = [
|
|
|
15
17
|
"ChoiceMessageAudio",
|
|
16
18
|
"ChoiceMessageFunctionCall",
|
|
17
19
|
"ChoiceMessageToolCall",
|
|
18
|
-
"
|
|
20
|
+
"ChoiceMessageToolCallChatCompletionMessageFunctionToolCall",
|
|
21
|
+
"ChoiceMessageToolCallChatCompletionMessageFunctionToolCallFunction",
|
|
22
|
+
"ChoiceMessageToolCallChatCompletionMessageCustomToolCall",
|
|
23
|
+
"ChoiceMessageToolCallChatCompletionMessageCustomToolCallCustom",
|
|
19
24
|
"ChoiceLogprobs",
|
|
20
25
|
"ChoiceLogprobsContent",
|
|
21
26
|
"ChoiceLogprobsContentTopLogprob",
|
|
@@ -36,6 +41,7 @@ class ChoiceMessageAnnotationURLCitation(BaseModel):
|
|
|
36
41
|
|
|
37
42
|
url: str
|
|
38
43
|
|
|
44
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
39
45
|
if TYPE_CHECKING:
|
|
40
46
|
# Stub to indicate that arbitrary properties are accepted.
|
|
41
47
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -48,6 +54,7 @@ class ChoiceMessageAnnotation(BaseModel):
|
|
|
48
54
|
|
|
49
55
|
url_citation: ChoiceMessageAnnotationURLCitation
|
|
50
56
|
|
|
57
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
51
58
|
if TYPE_CHECKING:
|
|
52
59
|
# Stub to indicate that arbitrary properties are accepted.
|
|
53
60
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -64,6 +71,7 @@ class ChoiceMessageAudio(BaseModel):
|
|
|
64
71
|
|
|
65
72
|
transcript: str
|
|
66
73
|
|
|
74
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
67
75
|
if TYPE_CHECKING:
|
|
68
76
|
# Stub to indicate that arbitrary properties are accepted.
|
|
69
77
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -76,6 +84,7 @@ class ChoiceMessageFunctionCall(BaseModel):
|
|
|
76
84
|
|
|
77
85
|
name: str
|
|
78
86
|
|
|
87
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
79
88
|
if TYPE_CHECKING:
|
|
80
89
|
# Stub to indicate that arbitrary properties are accepted.
|
|
81
90
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -83,11 +92,12 @@ class ChoiceMessageFunctionCall(BaseModel):
|
|
|
83
92
|
def __getattr__(self, attr: str) -> object: ...
|
|
84
93
|
|
|
85
94
|
|
|
86
|
-
class
|
|
95
|
+
class ChoiceMessageToolCallChatCompletionMessageFunctionToolCallFunction(BaseModel):
|
|
87
96
|
arguments: str
|
|
88
97
|
|
|
89
98
|
name: str
|
|
90
99
|
|
|
100
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
91
101
|
if TYPE_CHECKING:
|
|
92
102
|
# Stub to indicate that arbitrary properties are accepted.
|
|
93
103
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -95,13 +105,14 @@ class ChoiceMessageToolCallFunction(BaseModel):
|
|
|
95
105
|
def __getattr__(self, attr: str) -> object: ...
|
|
96
106
|
|
|
97
107
|
|
|
98
|
-
class
|
|
108
|
+
class ChoiceMessageToolCallChatCompletionMessageFunctionToolCall(BaseModel):
|
|
99
109
|
id: str
|
|
100
110
|
|
|
101
|
-
function:
|
|
111
|
+
function: ChoiceMessageToolCallChatCompletionMessageFunctionToolCallFunction
|
|
102
112
|
|
|
103
113
|
type: Literal["function"]
|
|
104
114
|
|
|
115
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
105
116
|
if TYPE_CHECKING:
|
|
106
117
|
# Stub to indicate that arbitrary properties are accepted.
|
|
107
118
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -109,6 +120,39 @@ class ChoiceMessageToolCall(BaseModel):
|
|
|
109
120
|
def __getattr__(self, attr: str) -> object: ...
|
|
110
121
|
|
|
111
122
|
|
|
123
|
+
class ChoiceMessageToolCallChatCompletionMessageCustomToolCallCustom(BaseModel):
|
|
124
|
+
input: str
|
|
125
|
+
|
|
126
|
+
name: str
|
|
127
|
+
|
|
128
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
129
|
+
if TYPE_CHECKING:
|
|
130
|
+
# Stub to indicate that arbitrary properties are accepted.
|
|
131
|
+
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
132
|
+
# `getattr(obj, '$type')`
|
|
133
|
+
def __getattr__(self, attr: str) -> object: ...
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class ChoiceMessageToolCallChatCompletionMessageCustomToolCall(BaseModel):
|
|
137
|
+
id: str
|
|
138
|
+
|
|
139
|
+
custom: ChoiceMessageToolCallChatCompletionMessageCustomToolCallCustom
|
|
140
|
+
|
|
141
|
+
type: Literal["custom"]
|
|
142
|
+
|
|
143
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
144
|
+
if TYPE_CHECKING:
|
|
145
|
+
# Stub to indicate that arbitrary properties are accepted.
|
|
146
|
+
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
147
|
+
# `getattr(obj, '$type')`
|
|
148
|
+
def __getattr__(self, attr: str) -> object: ...
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
ChoiceMessageToolCall: TypeAlias = Union[
|
|
152
|
+
ChoiceMessageToolCallChatCompletionMessageFunctionToolCall, ChoiceMessageToolCallChatCompletionMessageCustomToolCall
|
|
153
|
+
]
|
|
154
|
+
|
|
155
|
+
|
|
112
156
|
class ChoiceMessage(BaseModel):
|
|
113
157
|
role: Literal["assistant"]
|
|
114
158
|
|
|
@@ -124,6 +168,7 @@ class ChoiceMessage(BaseModel):
|
|
|
124
168
|
|
|
125
169
|
tool_calls: Optional[List[ChoiceMessageToolCall]] = None
|
|
126
170
|
|
|
171
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
127
172
|
if TYPE_CHECKING:
|
|
128
173
|
# Stub to indicate that arbitrary properties are accepted.
|
|
129
174
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -138,6 +183,7 @@ class ChoiceLogprobsContentTopLogprob(BaseModel):
|
|
|
138
183
|
|
|
139
184
|
bytes: Optional[List[int]] = None
|
|
140
185
|
|
|
186
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
141
187
|
if TYPE_CHECKING:
|
|
142
188
|
# Stub to indicate that arbitrary properties are accepted.
|
|
143
189
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -154,6 +200,7 @@ class ChoiceLogprobsContent(BaseModel):
|
|
|
154
200
|
|
|
155
201
|
bytes: Optional[List[int]] = None
|
|
156
202
|
|
|
203
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
157
204
|
if TYPE_CHECKING:
|
|
158
205
|
# Stub to indicate that arbitrary properties are accepted.
|
|
159
206
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -168,6 +215,7 @@ class ChoiceLogprobsRefusalTopLogprob(BaseModel):
|
|
|
168
215
|
|
|
169
216
|
bytes: Optional[List[int]] = None
|
|
170
217
|
|
|
218
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
171
219
|
if TYPE_CHECKING:
|
|
172
220
|
# Stub to indicate that arbitrary properties are accepted.
|
|
173
221
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -184,6 +232,7 @@ class ChoiceLogprobsRefusal(BaseModel):
|
|
|
184
232
|
|
|
185
233
|
bytes: Optional[List[int]] = None
|
|
186
234
|
|
|
235
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
187
236
|
if TYPE_CHECKING:
|
|
188
237
|
# Stub to indicate that arbitrary properties are accepted.
|
|
189
238
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -196,6 +245,7 @@ class ChoiceLogprobs(BaseModel):
|
|
|
196
245
|
|
|
197
246
|
refusal: Optional[List[ChoiceLogprobsRefusal]] = None
|
|
198
247
|
|
|
248
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
199
249
|
if TYPE_CHECKING:
|
|
200
250
|
# Stub to indicate that arbitrary properties are accepted.
|
|
201
251
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -212,6 +262,7 @@ class Choice(BaseModel):
|
|
|
212
262
|
|
|
213
263
|
logprobs: Optional[ChoiceLogprobs] = None
|
|
214
264
|
|
|
265
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
215
266
|
if TYPE_CHECKING:
|
|
216
267
|
# Stub to indicate that arbitrary properties are accepted.
|
|
217
268
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -228,6 +279,7 @@ class UsageCompletionTokensDetails(BaseModel):
|
|
|
228
279
|
|
|
229
280
|
rejected_prediction_tokens: Optional[int] = None
|
|
230
281
|
|
|
282
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
231
283
|
if TYPE_CHECKING:
|
|
232
284
|
# Stub to indicate that arbitrary properties are accepted.
|
|
233
285
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -240,6 +292,7 @@ class UsagePromptTokensDetails(BaseModel):
|
|
|
240
292
|
|
|
241
293
|
cached_tokens: Optional[int] = None
|
|
242
294
|
|
|
295
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
243
296
|
if TYPE_CHECKING:
|
|
244
297
|
# Stub to indicate that arbitrary properties are accepted.
|
|
245
298
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -258,6 +311,7 @@ class Usage(BaseModel):
|
|
|
258
311
|
|
|
259
312
|
prompt_tokens_details: Optional[UsagePromptTokensDetails] = None
|
|
260
313
|
|
|
314
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
261
315
|
if TYPE_CHECKING:
|
|
262
316
|
# Stub to indicate that arbitrary properties are accepted.
|
|
263
317
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -282,6 +336,7 @@ class ChatCompletion(BaseModel):
|
|
|
282
336
|
|
|
283
337
|
usage: Optional[Usage] = None
|
|
284
338
|
|
|
339
|
+
__pydantic_extra__: Dict[str, builtins.object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
285
340
|
if TYPE_CHECKING:
|
|
286
341
|
# Stub to indicate that arbitrary properties are accepted.
|
|
287
342
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import builtins
|
|
4
|
-
from typing import TYPE_CHECKING, List, Optional
|
|
4
|
+
from typing import TYPE_CHECKING, Dict, List, Optional
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
7
9
|
from ..._models import BaseModel
|
|
8
10
|
|
|
9
11
|
__all__ = [
|
|
@@ -29,6 +31,7 @@ class ChoiceDeltaFunctionCall(BaseModel):
|
|
|
29
31
|
|
|
30
32
|
name: Optional[str] = None
|
|
31
33
|
|
|
34
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
32
35
|
if TYPE_CHECKING:
|
|
33
36
|
# Stub to indicate that arbitrary properties are accepted.
|
|
34
37
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -41,6 +44,7 @@ class ChoiceDeltaToolCallFunction(BaseModel):
|
|
|
41
44
|
|
|
42
45
|
name: Optional[str] = None
|
|
43
46
|
|
|
47
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
44
48
|
if TYPE_CHECKING:
|
|
45
49
|
# Stub to indicate that arbitrary properties are accepted.
|
|
46
50
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -57,6 +61,7 @@ class ChoiceDeltaToolCall(BaseModel):
|
|
|
57
61
|
|
|
58
62
|
type: Optional[Literal["function"]] = None
|
|
59
63
|
|
|
64
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
60
65
|
if TYPE_CHECKING:
|
|
61
66
|
# Stub to indicate that arbitrary properties are accepted.
|
|
62
67
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -75,6 +80,7 @@ class ChoiceDelta(BaseModel):
|
|
|
75
80
|
|
|
76
81
|
tool_calls: Optional[List[ChoiceDeltaToolCall]] = None
|
|
77
82
|
|
|
83
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
78
84
|
if TYPE_CHECKING:
|
|
79
85
|
# Stub to indicate that arbitrary properties are accepted.
|
|
80
86
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -89,6 +95,7 @@ class ChoiceLogprobsContentTopLogprob(BaseModel):
|
|
|
89
95
|
|
|
90
96
|
bytes: Optional[List[int]] = None
|
|
91
97
|
|
|
98
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
92
99
|
if TYPE_CHECKING:
|
|
93
100
|
# Stub to indicate that arbitrary properties are accepted.
|
|
94
101
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -105,6 +112,7 @@ class ChoiceLogprobsContent(BaseModel):
|
|
|
105
112
|
|
|
106
113
|
bytes: Optional[List[int]] = None
|
|
107
114
|
|
|
115
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
108
116
|
if TYPE_CHECKING:
|
|
109
117
|
# Stub to indicate that arbitrary properties are accepted.
|
|
110
118
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -119,6 +127,7 @@ class ChoiceLogprobsRefusalTopLogprob(BaseModel):
|
|
|
119
127
|
|
|
120
128
|
bytes: Optional[List[int]] = None
|
|
121
129
|
|
|
130
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
122
131
|
if TYPE_CHECKING:
|
|
123
132
|
# Stub to indicate that arbitrary properties are accepted.
|
|
124
133
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -135,6 +144,7 @@ class ChoiceLogprobsRefusal(BaseModel):
|
|
|
135
144
|
|
|
136
145
|
bytes: Optional[List[int]] = None
|
|
137
146
|
|
|
147
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
138
148
|
if TYPE_CHECKING:
|
|
139
149
|
# Stub to indicate that arbitrary properties are accepted.
|
|
140
150
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -147,6 +157,7 @@ class ChoiceLogprobs(BaseModel):
|
|
|
147
157
|
|
|
148
158
|
refusal: Optional[List[ChoiceLogprobsRefusal]] = None
|
|
149
159
|
|
|
160
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
150
161
|
if TYPE_CHECKING:
|
|
151
162
|
# Stub to indicate that arbitrary properties are accepted.
|
|
152
163
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -163,6 +174,7 @@ class Choice(BaseModel):
|
|
|
163
174
|
|
|
164
175
|
logprobs: Optional[ChoiceLogprobs] = None
|
|
165
176
|
|
|
177
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
166
178
|
if TYPE_CHECKING:
|
|
167
179
|
# Stub to indicate that arbitrary properties are accepted.
|
|
168
180
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -179,6 +191,7 @@ class UsageCompletionTokensDetails(BaseModel):
|
|
|
179
191
|
|
|
180
192
|
rejected_prediction_tokens: Optional[int] = None
|
|
181
193
|
|
|
194
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
182
195
|
if TYPE_CHECKING:
|
|
183
196
|
# Stub to indicate that arbitrary properties are accepted.
|
|
184
197
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -191,6 +204,7 @@ class UsagePromptTokensDetails(BaseModel):
|
|
|
191
204
|
|
|
192
205
|
cached_tokens: Optional[int] = None
|
|
193
206
|
|
|
207
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
194
208
|
if TYPE_CHECKING:
|
|
195
209
|
# Stub to indicate that arbitrary properties are accepted.
|
|
196
210
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -209,6 +223,7 @@ class Usage(BaseModel):
|
|
|
209
223
|
|
|
210
224
|
prompt_tokens_details: Optional[UsagePromptTokensDetails] = None
|
|
211
225
|
|
|
226
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
212
227
|
if TYPE_CHECKING:
|
|
213
228
|
# Stub to indicate that arbitrary properties are accepted.
|
|
214
229
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -233,6 +248,7 @@ class ChatCompletionChunk(BaseModel):
|
|
|
233
248
|
|
|
234
249
|
usage: Optional[Usage] = None
|
|
235
250
|
|
|
251
|
+
__pydantic_extra__: Dict[str, builtins.object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
236
252
|
if TYPE_CHECKING:
|
|
237
253
|
# Stub to indicate that arbitrary properties are accepted.
|
|
238
254
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from typing import Optional
|
|
3
4
|
from typing_extensions import Literal
|
|
4
5
|
|
|
5
6
|
from pydantic import Field as FieldInfo
|
|
@@ -31,3 +32,8 @@ class ModelDefinition(BaseModel):
|
|
|
31
32
|
"fireworks_ai",
|
|
32
33
|
] = FieldInfo(alias="model_vendor")
|
|
33
34
|
"""model vendor, for example `openai`"""
|
|
35
|
+
|
|
36
|
+
availability: Optional[Literal["unknown", "available", "unavailable"]] = FieldInfo(
|
|
37
|
+
alias="model_availability", default=None
|
|
38
|
+
)
|
|
39
|
+
"""model availability indicating availability status, for example `available`"""
|
|
@@ -4,6 +4,8 @@ import builtins
|
|
|
4
4
|
from typing import TYPE_CHECKING, Dict, List, Optional
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
7
9
|
from .._models import BaseModel
|
|
8
10
|
|
|
9
11
|
__all__ = [
|
|
@@ -25,6 +27,7 @@ class ChoiceLogprobs(BaseModel):
|
|
|
25
27
|
|
|
26
28
|
top_logprobs: Optional[List[Dict[str, float]]] = None
|
|
27
29
|
|
|
30
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
28
31
|
if TYPE_CHECKING:
|
|
29
32
|
# Stub to indicate that arbitrary properties are accepted.
|
|
30
33
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -41,6 +44,7 @@ class Choice(BaseModel):
|
|
|
41
44
|
|
|
42
45
|
logprobs: Optional[ChoiceLogprobs] = None
|
|
43
46
|
|
|
47
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
44
48
|
if TYPE_CHECKING:
|
|
45
49
|
# Stub to indicate that arbitrary properties are accepted.
|
|
46
50
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -57,6 +61,7 @@ class UsageCompletionTokensDetails(BaseModel):
|
|
|
57
61
|
|
|
58
62
|
rejected_prediction_tokens: Optional[int] = None
|
|
59
63
|
|
|
64
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
60
65
|
if TYPE_CHECKING:
|
|
61
66
|
# Stub to indicate that arbitrary properties are accepted.
|
|
62
67
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -69,6 +74,7 @@ class UsagePromptTokensDetails(BaseModel):
|
|
|
69
74
|
|
|
70
75
|
cached_tokens: Optional[int] = None
|
|
71
76
|
|
|
77
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
72
78
|
if TYPE_CHECKING:
|
|
73
79
|
# Stub to indicate that arbitrary properties are accepted.
|
|
74
80
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -87,6 +93,7 @@ class Usage(BaseModel):
|
|
|
87
93
|
|
|
88
94
|
prompt_tokens_details: Optional[UsagePromptTokensDetails] = None
|
|
89
95
|
|
|
96
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
90
97
|
if TYPE_CHECKING:
|
|
91
98
|
# Stub to indicate that arbitrary properties are accepted.
|
|
92
99
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -109,6 +116,7 @@ class Completion(BaseModel):
|
|
|
109
116
|
|
|
110
117
|
usage: Optional[Usage] = None
|
|
111
118
|
|
|
119
|
+
__pydantic_extra__: Dict[str, builtins.object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
112
120
|
if TYPE_CHECKING:
|
|
113
121
|
# Stub to indicate that arbitrary properties are accepted.
|
|
114
122
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
scale_gp_beta/types/container.py
CHANGED
scale_gp_beta/types/dataset.py
CHANGED
|
@@ -5,6 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
7
7
|
from .._models import BaseModel
|
|
8
|
+
from .shared.identity import Identity
|
|
8
9
|
|
|
9
10
|
__all__ = ["Dataset"]
|
|
10
11
|
|
|
@@ -14,7 +15,8 @@ class Dataset(BaseModel):
|
|
|
14
15
|
|
|
15
16
|
created_at: datetime
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
created_by: Identity
|
|
19
|
+
"""The identity that created the entity."""
|
|
18
20
|
|
|
19
21
|
current_version_num: int
|
|
20
22
|
|
|
@@ -5,6 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
7
7
|
from .._models import BaseModel
|
|
8
|
+
from .shared.identity import Identity
|
|
8
9
|
|
|
9
10
|
__all__ = ["DatasetItem"]
|
|
10
11
|
|
|
@@ -16,7 +17,8 @@ class DatasetItem(BaseModel):
|
|
|
16
17
|
|
|
17
18
|
created_at: datetime
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
created_by: Identity
|
|
21
|
+
"""The identity that created the entity."""
|
|
20
22
|
|
|
21
23
|
data: object
|
|
22
24
|
|
|
@@ -7,8 +7,8 @@ from datetime import datetime
|
|
|
7
7
|
from typing_extensions import Literal
|
|
8
8
|
|
|
9
9
|
from .dataset import Dataset
|
|
10
|
-
from .._compat import PYDANTIC_V2
|
|
11
10
|
from .._models import BaseModel
|
|
11
|
+
from .shared.identity import Identity
|
|
12
12
|
|
|
13
13
|
__all__ = ["Evaluation"]
|
|
14
14
|
|
|
@@ -18,7 +18,8 @@ class Evaluation(BaseModel):
|
|
|
18
18
|
|
|
19
19
|
created_at: datetime
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
created_by: Identity
|
|
22
|
+
"""The identity that created the entity."""
|
|
22
23
|
|
|
23
24
|
datasets: List[Dataset]
|
|
24
25
|
|
|
@@ -40,8 +41,3 @@ class Evaluation(BaseModel):
|
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
from .evaluation_task import EvaluationTask
|
|
43
|
-
|
|
44
|
-
if PYDANTIC_V2:
|
|
45
|
-
Evaluation.model_rebuild()
|
|
46
|
-
else:
|
|
47
|
-
Evaluation.update_forward_refs() # type: ignore
|
|
@@ -5,6 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
7
7
|
from .._models import BaseModel
|
|
8
|
+
from .shared.identity import Identity
|
|
8
9
|
|
|
9
10
|
__all__ = ["EvaluationItem"]
|
|
10
11
|
|
|
@@ -14,7 +15,8 @@ class EvaluationItem(BaseModel):
|
|
|
14
15
|
|
|
15
16
|
created_at: datetime
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
created_by: Identity
|
|
19
|
+
"""The identity that created the entity."""
|
|
18
20
|
|
|
19
21
|
data: Dict[str, object]
|
|
20
22
|
|
|
@@ -5,8 +5,9 @@ from __future__ import annotations
|
|
|
5
5
|
from typing import TYPE_CHECKING, Dict, List, Union, Optional
|
|
6
6
|
from typing_extensions import Literal, Annotated, TypeAlias
|
|
7
7
|
|
|
8
|
+
from pydantic import Field as FieldInfo
|
|
9
|
+
|
|
8
10
|
from .._utils import PropertyInfo
|
|
9
|
-
from .._compat import PYDANTIC_V2
|
|
10
11
|
from .._models import BaseModel
|
|
11
12
|
from .item_locator import ItemLocator
|
|
12
13
|
|
|
@@ -38,6 +39,8 @@ __all__ = [
|
|
|
38
39
|
"AutoEvaluationQuestionTaskConfiguration",
|
|
39
40
|
"AutoEvaluationGuidedDecodingEvaluationTask",
|
|
40
41
|
"AutoEvaluationGuidedDecodingEvaluationTaskConfiguration",
|
|
42
|
+
"AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationStructuredOutputTaskRequestWithItemLocator",
|
|
43
|
+
"AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationGuidedDecodingTaskRequestWithItemLocator",
|
|
41
44
|
"ContributorEvaluationQuestionTask",
|
|
42
45
|
"ContributorEvaluationQuestionTaskConfiguration",
|
|
43
46
|
]
|
|
@@ -98,6 +101,7 @@ class ChatCompletionEvaluationTaskConfiguration(BaseModel):
|
|
|
98
101
|
|
|
99
102
|
top_p: Union[float, ItemLocator, None] = None
|
|
100
103
|
|
|
104
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
101
105
|
if TYPE_CHECKING:
|
|
102
106
|
# Stub to indicate that arbitrary properties are accepted.
|
|
103
107
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -325,7 +329,26 @@ class AutoEvaluationQuestionTask(BaseModel):
|
|
|
325
329
|
task_type: Optional[Literal["auto_evaluation.question"]] = None
|
|
326
330
|
|
|
327
331
|
|
|
328
|
-
class
|
|
332
|
+
class AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationStructuredOutputTaskRequestWithItemLocator(
|
|
333
|
+
BaseModel
|
|
334
|
+
):
|
|
335
|
+
model: str
|
|
336
|
+
"""model specified as `model_vendor/model_name`"""
|
|
337
|
+
|
|
338
|
+
prompt: str
|
|
339
|
+
|
|
340
|
+
response_format: Dict[str, object]
|
|
341
|
+
"""JSON schema used for structuring the model response"""
|
|
342
|
+
|
|
343
|
+
inference_args: Optional[Dict[str, object]] = None
|
|
344
|
+
"""Additional arguments to pass to the inference request"""
|
|
345
|
+
|
|
346
|
+
system_prompt: Optional[str] = None
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
class AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationGuidedDecodingTaskRequestWithItemLocator(
|
|
350
|
+
BaseModel
|
|
351
|
+
):
|
|
329
352
|
choices: List[str]
|
|
330
353
|
"""Choices array cannot be empty"""
|
|
331
354
|
|
|
@@ -340,6 +363,12 @@ class AutoEvaluationGuidedDecodingEvaluationTaskConfiguration(BaseModel):
|
|
|
340
363
|
system_prompt: Optional[str] = None
|
|
341
364
|
|
|
342
365
|
|
|
366
|
+
AutoEvaluationGuidedDecodingEvaluationTaskConfiguration: TypeAlias = Union[
|
|
367
|
+
AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationStructuredOutputTaskRequestWithItemLocator,
|
|
368
|
+
AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationGuidedDecodingTaskRequestWithItemLocator,
|
|
369
|
+
]
|
|
370
|
+
|
|
371
|
+
|
|
343
372
|
class AutoEvaluationGuidedDecodingEvaluationTask(BaseModel):
|
|
344
373
|
configuration: AutoEvaluationGuidedDecodingEvaluationTaskConfiguration
|
|
345
374
|
|
|
@@ -387,56 +416,3 @@ EvaluationTask: TypeAlias = Annotated[
|
|
|
387
416
|
]
|
|
388
417
|
|
|
389
418
|
from .container import Container
|
|
390
|
-
|
|
391
|
-
if PYDANTIC_V2:
|
|
392
|
-
ChatCompletionEvaluationTask.model_rebuild()
|
|
393
|
-
ChatCompletionEvaluationTaskConfiguration.model_rebuild()
|
|
394
|
-
GenericInferenceEvaluationTask.model_rebuild()
|
|
395
|
-
GenericInferenceEvaluationTaskConfiguration.model_rebuild()
|
|
396
|
-
GenericInferenceEvaluationTaskConfigurationInferenceConfigurationLaunchInferenceConfiguration.model_rebuild()
|
|
397
|
-
ApplicationVariantV1EvaluationTask.model_rebuild()
|
|
398
|
-
ApplicationVariantV1EvaluationTaskConfiguration.model_rebuild()
|
|
399
|
-
ApplicationVariantV1EvaluationTaskConfigurationHistoryApplicationRequestResponsePairArray.model_rebuild()
|
|
400
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides.model_rebuild()
|
|
401
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState.model_rebuild()
|
|
402
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace.model_rebuild()
|
|
403
|
-
MetricEvaluationTask.model_rebuild()
|
|
404
|
-
MetricEvaluationTaskConfigurationBleuScorerConfigWithItemLocator.model_rebuild()
|
|
405
|
-
MetricEvaluationTaskConfigurationMeteorScorerConfigWithItemLocator.model_rebuild()
|
|
406
|
-
MetricEvaluationTaskConfigurationCosineSimilarityScorerConfigWithItemLocator.model_rebuild()
|
|
407
|
-
MetricEvaluationTaskConfigurationF1ScorerConfigWithItemLocator.model_rebuild()
|
|
408
|
-
MetricEvaluationTaskConfigurationRougeScorer1ConfigWithItemLocator.model_rebuild()
|
|
409
|
-
MetricEvaluationTaskConfigurationRougeScorer2ConfigWithItemLocator.model_rebuild()
|
|
410
|
-
MetricEvaluationTaskConfigurationRougeScorerLConfigWithItemLocator.model_rebuild()
|
|
411
|
-
AutoEvaluationQuestionTask.model_rebuild()
|
|
412
|
-
AutoEvaluationQuestionTaskConfiguration.model_rebuild()
|
|
413
|
-
AutoEvaluationGuidedDecodingEvaluationTask.model_rebuild()
|
|
414
|
-
AutoEvaluationGuidedDecodingEvaluationTaskConfiguration.model_rebuild()
|
|
415
|
-
ContributorEvaluationQuestionTask.model_rebuild()
|
|
416
|
-
ContributorEvaluationQuestionTaskConfiguration.model_rebuild()
|
|
417
|
-
else:
|
|
418
|
-
ChatCompletionEvaluationTask.update_forward_refs() # type: ignore
|
|
419
|
-
ChatCompletionEvaluationTaskConfiguration.update_forward_refs() # type: ignore
|
|
420
|
-
GenericInferenceEvaluationTask.update_forward_refs() # type: ignore
|
|
421
|
-
GenericInferenceEvaluationTaskConfiguration.update_forward_refs() # type: ignore
|
|
422
|
-
GenericInferenceEvaluationTaskConfigurationInferenceConfigurationLaunchInferenceConfiguration.update_forward_refs() # type: ignore
|
|
423
|
-
ApplicationVariantV1EvaluationTask.update_forward_refs() # type: ignore
|
|
424
|
-
ApplicationVariantV1EvaluationTaskConfiguration.update_forward_refs() # type: ignore
|
|
425
|
-
ApplicationVariantV1EvaluationTaskConfigurationHistoryApplicationRequestResponsePairArray.update_forward_refs() # type: ignore
|
|
426
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides.update_forward_refs() # type: ignore
|
|
427
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState.update_forward_refs() # type: ignore
|
|
428
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace.update_forward_refs() # type: ignore
|
|
429
|
-
MetricEvaluationTask.update_forward_refs() # type: ignore
|
|
430
|
-
MetricEvaluationTaskConfigurationBleuScorerConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
431
|
-
MetricEvaluationTaskConfigurationMeteorScorerConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
432
|
-
MetricEvaluationTaskConfigurationCosineSimilarityScorerConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
433
|
-
MetricEvaluationTaskConfigurationF1ScorerConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
434
|
-
MetricEvaluationTaskConfigurationRougeScorer1ConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
435
|
-
MetricEvaluationTaskConfigurationRougeScorer2ConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
436
|
-
MetricEvaluationTaskConfigurationRougeScorerLConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
437
|
-
AutoEvaluationQuestionTask.update_forward_refs() # type: ignore
|
|
438
|
-
AutoEvaluationQuestionTaskConfiguration.update_forward_refs() # type: ignore
|
|
439
|
-
AutoEvaluationGuidedDecodingEvaluationTask.update_forward_refs() # type: ignore
|
|
440
|
-
AutoEvaluationGuidedDecodingEvaluationTaskConfiguration.update_forward_refs() # type: ignore
|
|
441
|
-
ContributorEvaluationQuestionTask.update_forward_refs() # type: ignore
|
|
442
|
-
ContributorEvaluationQuestionTaskConfiguration.update_forward_refs() # type: ignore
|