scale-gp-beta 0.1.0a31__py3-none-any.whl → 0.1.0a32__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.
Files changed (34) hide show
  1. scale_gp_beta/__init__.py +3 -1
  2. scale_gp_beta/_base_client.py +9 -9
  3. scale_gp_beta/_client.py +12 -12
  4. scale_gp_beta/_models.py +10 -4
  5. scale_gp_beta/_qs.py +7 -7
  6. scale_gp_beta/_types.py +18 -11
  7. scale_gp_beta/_utils/_transform.py +2 -2
  8. scale_gp_beta/_utils/_utils.py +4 -4
  9. scale_gp_beta/_version.py +1 -1
  10. scale_gp_beta/resources/chat/completions.py +235 -235
  11. scale_gp_beta/resources/completions.py +133 -133
  12. scale_gp_beta/resources/dataset_items.py +27 -27
  13. scale_gp_beta/resources/datasets.py +37 -37
  14. scale_gp_beta/resources/evaluation_items.py +19 -19
  15. scale_gp_beta/resources/evaluations.py +83 -83
  16. scale_gp_beta/resources/files/content.py +3 -3
  17. scale_gp_beta/resources/files/files.py +21 -21
  18. scale_gp_beta/resources/inference.py +7 -7
  19. scale_gp_beta/resources/models.py +71 -73
  20. scale_gp_beta/resources/questions.py +43 -43
  21. scale_gp_beta/resources/responses.py +33 -33
  22. scale_gp_beta/resources/spans.py +81 -81
  23. scale_gp_beta/types/chat/chat_completion.py +114 -19
  24. scale_gp_beta/types/chat/chat_completion_chunk.py +84 -14
  25. scale_gp_beta/types/completion.py +36 -6
  26. scale_gp_beta/types/evaluation.py +3 -0
  27. scale_gp_beta/types/evaluation_task.py +6 -1
  28. scale_gp_beta/types/inference_model.py +6 -1
  29. scale_gp_beta/types/response.py +852 -142
  30. scale_gp_beta/types/response_create_response.py +6072 -1012
  31. {scale_gp_beta-0.1.0a31.dist-info → scale_gp_beta-0.1.0a32.dist-info}/METADATA +1 -1
  32. {scale_gp_beta-0.1.0a31.dist-info → scale_gp_beta-0.1.0a32.dist-info}/RECORD +34 -34
  33. {scale_gp_beta-0.1.0a31.dist-info → scale_gp_beta-0.1.0a32.dist-info}/WHEEL +0 -0
  34. {scale_gp_beta-0.1.0a31.dist-info → scale_gp_beta-0.1.0a32.dist-info}/licenses/LICENSE +0 -0
@@ -31,12 +31,17 @@ class ChoiceDeltaFunctionCall(BaseModel):
31
31
 
32
32
  name: Optional[str] = None
33
33
 
34
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
35
34
  if TYPE_CHECKING:
35
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
36
+ # value to this field, so for compatibility we avoid doing it at runtime.
37
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
38
+
36
39
  # Stub to indicate that arbitrary properties are accepted.
37
40
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
38
41
  # `getattr(obj, '$type')`
39
42
  def __getattr__(self, attr: str) -> object: ...
43
+ else:
44
+ __pydantic_extra__: Dict[str, object]
40
45
 
41
46
 
42
47
  class ChoiceDeltaToolCallFunction(BaseModel):
@@ -44,12 +49,17 @@ class ChoiceDeltaToolCallFunction(BaseModel):
44
49
 
45
50
  name: Optional[str] = None
46
51
 
47
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
48
52
  if TYPE_CHECKING:
53
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
54
+ # value to this field, so for compatibility we avoid doing it at runtime.
55
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
56
+
49
57
  # Stub to indicate that arbitrary properties are accepted.
50
58
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
51
59
  # `getattr(obj, '$type')`
52
60
  def __getattr__(self, attr: str) -> object: ...
61
+ else:
62
+ __pydantic_extra__: Dict[str, object]
53
63
 
54
64
 
55
65
  class ChoiceDeltaToolCall(BaseModel):
@@ -61,12 +71,17 @@ class ChoiceDeltaToolCall(BaseModel):
61
71
 
62
72
  type: Optional[Literal["function"]] = None
63
73
 
64
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
65
74
  if TYPE_CHECKING:
75
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
76
+ # value to this field, so for compatibility we avoid doing it at runtime.
77
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
78
+
66
79
  # Stub to indicate that arbitrary properties are accepted.
67
80
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
68
81
  # `getattr(obj, '$type')`
69
82
  def __getattr__(self, attr: str) -> object: ...
83
+ else:
84
+ __pydantic_extra__: Dict[str, object]
70
85
 
71
86
 
72
87
  class ChoiceDelta(BaseModel):
@@ -80,12 +95,17 @@ class ChoiceDelta(BaseModel):
80
95
 
81
96
  tool_calls: Optional[List[ChoiceDeltaToolCall]] = None
82
97
 
83
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
84
98
  if TYPE_CHECKING:
99
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
100
+ # value to this field, so for compatibility we avoid doing it at runtime.
101
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
102
+
85
103
  # Stub to indicate that arbitrary properties are accepted.
86
104
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
87
105
  # `getattr(obj, '$type')`
88
106
  def __getattr__(self, attr: str) -> object: ...
107
+ else:
108
+ __pydantic_extra__: Dict[str, object]
89
109
 
90
110
 
91
111
  class ChoiceLogprobsContentTopLogprob(BaseModel):
@@ -95,12 +115,17 @@ class ChoiceLogprobsContentTopLogprob(BaseModel):
95
115
 
96
116
  bytes: Optional[List[int]] = None
97
117
 
98
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
99
118
  if TYPE_CHECKING:
119
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
120
+ # value to this field, so for compatibility we avoid doing it at runtime.
121
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
122
+
100
123
  # Stub to indicate that arbitrary properties are accepted.
101
124
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
102
125
  # `getattr(obj, '$type')`
103
126
  def __getattr__(self, attr: str) -> object: ...
127
+ else:
128
+ __pydantic_extra__: Dict[str, object]
104
129
 
105
130
 
106
131
  class ChoiceLogprobsContent(BaseModel):
@@ -112,12 +137,17 @@ class ChoiceLogprobsContent(BaseModel):
112
137
 
113
138
  bytes: Optional[List[int]] = None
114
139
 
115
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
116
140
  if TYPE_CHECKING:
141
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
142
+ # value to this field, so for compatibility we avoid doing it at runtime.
143
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
144
+
117
145
  # Stub to indicate that arbitrary properties are accepted.
118
146
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
119
147
  # `getattr(obj, '$type')`
120
148
  def __getattr__(self, attr: str) -> object: ...
149
+ else:
150
+ __pydantic_extra__: Dict[str, object]
121
151
 
122
152
 
123
153
  class ChoiceLogprobsRefusalTopLogprob(BaseModel):
@@ -127,12 +157,17 @@ class ChoiceLogprobsRefusalTopLogprob(BaseModel):
127
157
 
128
158
  bytes: Optional[List[int]] = None
129
159
 
130
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
131
160
  if TYPE_CHECKING:
161
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
162
+ # value to this field, so for compatibility we avoid doing it at runtime.
163
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
164
+
132
165
  # Stub to indicate that arbitrary properties are accepted.
133
166
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
134
167
  # `getattr(obj, '$type')`
135
168
  def __getattr__(self, attr: str) -> object: ...
169
+ else:
170
+ __pydantic_extra__: Dict[str, object]
136
171
 
137
172
 
138
173
  class ChoiceLogprobsRefusal(BaseModel):
@@ -144,12 +179,17 @@ class ChoiceLogprobsRefusal(BaseModel):
144
179
 
145
180
  bytes: Optional[List[int]] = None
146
181
 
147
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
148
182
  if TYPE_CHECKING:
183
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
184
+ # value to this field, so for compatibility we avoid doing it at runtime.
185
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
186
+
149
187
  # Stub to indicate that arbitrary properties are accepted.
150
188
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
151
189
  # `getattr(obj, '$type')`
152
190
  def __getattr__(self, attr: str) -> object: ...
191
+ else:
192
+ __pydantic_extra__: Dict[str, object]
153
193
 
154
194
 
155
195
  class ChoiceLogprobs(BaseModel):
@@ -157,12 +197,17 @@ class ChoiceLogprobs(BaseModel):
157
197
 
158
198
  refusal: Optional[List[ChoiceLogprobsRefusal]] = None
159
199
 
160
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
161
200
  if TYPE_CHECKING:
201
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
202
+ # value to this field, so for compatibility we avoid doing it at runtime.
203
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
204
+
162
205
  # Stub to indicate that arbitrary properties are accepted.
163
206
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
164
207
  # `getattr(obj, '$type')`
165
208
  def __getattr__(self, attr: str) -> object: ...
209
+ else:
210
+ __pydantic_extra__: Dict[str, object]
166
211
 
167
212
 
168
213
  class Choice(BaseModel):
@@ -174,12 +219,17 @@ class Choice(BaseModel):
174
219
 
175
220
  logprobs: Optional[ChoiceLogprobs] = None
176
221
 
177
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
178
222
  if TYPE_CHECKING:
223
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
224
+ # value to this field, so for compatibility we avoid doing it at runtime.
225
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
226
+
179
227
  # Stub to indicate that arbitrary properties are accepted.
180
228
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
181
229
  # `getattr(obj, '$type')`
182
230
  def __getattr__(self, attr: str) -> object: ...
231
+ else:
232
+ __pydantic_extra__: Dict[str, object]
183
233
 
184
234
 
185
235
  class UsageCompletionTokensDetails(BaseModel):
@@ -191,12 +241,17 @@ class UsageCompletionTokensDetails(BaseModel):
191
241
 
192
242
  rejected_prediction_tokens: Optional[int] = None
193
243
 
194
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
195
244
  if TYPE_CHECKING:
245
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
246
+ # value to this field, so for compatibility we avoid doing it at runtime.
247
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
248
+
196
249
  # Stub to indicate that arbitrary properties are accepted.
197
250
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
198
251
  # `getattr(obj, '$type')`
199
252
  def __getattr__(self, attr: str) -> object: ...
253
+ else:
254
+ __pydantic_extra__: Dict[str, object]
200
255
 
201
256
 
202
257
  class UsagePromptTokensDetails(BaseModel):
@@ -204,12 +259,17 @@ class UsagePromptTokensDetails(BaseModel):
204
259
 
205
260
  cached_tokens: Optional[int] = None
206
261
 
207
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
208
262
  if TYPE_CHECKING:
263
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
264
+ # value to this field, so for compatibility we avoid doing it at runtime.
265
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
266
+
209
267
  # Stub to indicate that arbitrary properties are accepted.
210
268
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
211
269
  # `getattr(obj, '$type')`
212
270
  def __getattr__(self, attr: str) -> object: ...
271
+ else:
272
+ __pydantic_extra__: Dict[str, object]
213
273
 
214
274
 
215
275
  class Usage(BaseModel):
@@ -223,12 +283,17 @@ class Usage(BaseModel):
223
283
 
224
284
  prompt_tokens_details: Optional[UsagePromptTokensDetails] = None
225
285
 
226
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
227
286
  if TYPE_CHECKING:
287
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
288
+ # value to this field, so for compatibility we avoid doing it at runtime.
289
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
290
+
228
291
  # Stub to indicate that arbitrary properties are accepted.
229
292
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
230
293
  # `getattr(obj, '$type')`
231
294
  def __getattr__(self, attr: str) -> object: ...
295
+ else:
296
+ __pydantic_extra__: Dict[str, object]
232
297
 
233
298
 
234
299
  class ChatCompletionChunk(BaseModel):
@@ -248,9 +313,14 @@ class ChatCompletionChunk(BaseModel):
248
313
 
249
314
  usage: Optional[Usage] = None
250
315
 
251
- __pydantic_extra__: Dict[str, builtins.object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
252
316
  if TYPE_CHECKING:
317
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
318
+ # value to this field, so for compatibility we avoid doing it at runtime.
319
+ __pydantic_extra__: Dict[str, builtins.object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
320
+
253
321
  # Stub to indicate that arbitrary properties are accepted.
254
322
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
255
323
  # `getattr(obj, '$type')`
256
324
  def __getattr__(self, attr: str) -> builtins.object: ...
325
+ else:
326
+ __pydantic_extra__: Dict[str, builtins.object]
@@ -27,12 +27,17 @@ class ChoiceLogprobs(BaseModel):
27
27
 
28
28
  top_logprobs: Optional[List[Dict[str, float]]] = None
29
29
 
30
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
31
30
  if TYPE_CHECKING:
31
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
32
+ # value to this field, so for compatibility we avoid doing it at runtime.
33
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
34
+
32
35
  # Stub to indicate that arbitrary properties are accepted.
33
36
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
34
37
  # `getattr(obj, '$type')`
35
38
  def __getattr__(self, attr: str) -> object: ...
39
+ else:
40
+ __pydantic_extra__: Dict[str, object]
36
41
 
37
42
 
38
43
  class Choice(BaseModel):
@@ -44,12 +49,17 @@ class Choice(BaseModel):
44
49
 
45
50
  logprobs: Optional[ChoiceLogprobs] = None
46
51
 
47
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
48
52
  if TYPE_CHECKING:
53
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
54
+ # value to this field, so for compatibility we avoid doing it at runtime.
55
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
56
+
49
57
  # Stub to indicate that arbitrary properties are accepted.
50
58
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
51
59
  # `getattr(obj, '$type')`
52
60
  def __getattr__(self, attr: str) -> object: ...
61
+ else:
62
+ __pydantic_extra__: Dict[str, object]
53
63
 
54
64
 
55
65
  class UsageCompletionTokensDetails(BaseModel):
@@ -61,12 +71,17 @@ class UsageCompletionTokensDetails(BaseModel):
61
71
 
62
72
  rejected_prediction_tokens: Optional[int] = None
63
73
 
64
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
65
74
  if TYPE_CHECKING:
75
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
76
+ # value to this field, so for compatibility we avoid doing it at runtime.
77
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
78
+
66
79
  # Stub to indicate that arbitrary properties are accepted.
67
80
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
68
81
  # `getattr(obj, '$type')`
69
82
  def __getattr__(self, attr: str) -> object: ...
83
+ else:
84
+ __pydantic_extra__: Dict[str, object]
70
85
 
71
86
 
72
87
  class UsagePromptTokensDetails(BaseModel):
@@ -74,12 +89,17 @@ class UsagePromptTokensDetails(BaseModel):
74
89
 
75
90
  cached_tokens: Optional[int] = None
76
91
 
77
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
78
92
  if TYPE_CHECKING:
93
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
94
+ # value to this field, so for compatibility we avoid doing it at runtime.
95
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
96
+
79
97
  # Stub to indicate that arbitrary properties are accepted.
80
98
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
81
99
  # `getattr(obj, '$type')`
82
100
  def __getattr__(self, attr: str) -> object: ...
101
+ else:
102
+ __pydantic_extra__: Dict[str, object]
83
103
 
84
104
 
85
105
  class Usage(BaseModel):
@@ -93,12 +113,17 @@ class Usage(BaseModel):
93
113
 
94
114
  prompt_tokens_details: Optional[UsagePromptTokensDetails] = None
95
115
 
96
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
97
116
  if TYPE_CHECKING:
117
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
118
+ # value to this field, so for compatibility we avoid doing it at runtime.
119
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
120
+
98
121
  # Stub to indicate that arbitrary properties are accepted.
99
122
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
100
123
  # `getattr(obj, '$type')`
101
124
  def __getattr__(self, attr: str) -> object: ...
125
+ else:
126
+ __pydantic_extra__: Dict[str, object]
102
127
 
103
128
 
104
129
  class Completion(BaseModel):
@@ -116,9 +141,14 @@ class Completion(BaseModel):
116
141
 
117
142
  usage: Optional[Usage] = None
118
143
 
119
- __pydantic_extra__: Dict[str, builtins.object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
120
144
  if TYPE_CHECKING:
145
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
146
+ # value to this field, so for compatibility we avoid doing it at runtime.
147
+ __pydantic_extra__: Dict[str, builtins.object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
148
+
121
149
  # Stub to indicate that arbitrary properties are accepted.
122
150
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
123
151
  # `getattr(obj, '$type')`
124
152
  def __getattr__(self, attr: str) -> builtins.object: ...
153
+ else:
154
+ __pydantic_extra__: Dict[str, builtins.object]
@@ -39,6 +39,9 @@ class Evaluation(BaseModel):
39
39
 
40
40
  object: Optional[Literal["evaluation"]] = None
41
41
 
42
+ status_reason: Optional[str] = None
43
+ """Reason for evaluation status"""
44
+
42
45
  tasks: Optional[List["EvaluationTask"]] = None
43
46
  """Tasks executed during evaluation. Populated with optional `task` view."""
44
47
 
@@ -101,12 +101,17 @@ class ChatCompletionEvaluationTaskConfiguration(BaseModel):
101
101
 
102
102
  top_p: Union[float, ItemLocator, None] = None
103
103
 
104
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
105
104
  if TYPE_CHECKING:
105
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
106
+ # value to this field, so for compatibility we avoid doing it at runtime.
107
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
108
+
106
109
  # Stub to indicate that arbitrary properties are accepted.
107
110
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
108
111
  # `getattr(obj, '$type')`
109
112
  def __getattr__(self, attr: str) -> object: ...
113
+ else:
114
+ __pydantic_extra__: Dict[str, object]
110
115
 
111
116
 
112
117
  class ChatCompletionEvaluationTask(BaseModel):
@@ -131,12 +131,17 @@ class VendorConfigurationLlmEngineVendorConfiguration(BaseModel):
131
131
 
132
132
  storage: Optional[str] = None
133
133
 
134
- __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
135
134
  if TYPE_CHECKING:
135
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
136
+ # value to this field, so for compatibility we avoid doing it at runtime.
137
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
138
+
136
139
  # Stub to indicate that arbitrary properties are accepted.
137
140
  # To access properties that are not valid identifiers you can use `getattr`, e.g.
138
141
  # `getattr(obj, '$type')`
139
142
  def __getattr__(self, attr: str) -> object: ...
143
+ else:
144
+ __pydantic_extra__: Dict[str, object]
140
145
 
141
146
 
142
147
  VendorConfiguration: TypeAlias = Union[