@@ -194,7 +194,7 @@ async def test_require_response_tool(allow_model_requests: None):
194
194
195
195
async def test_json_def_replaced (allow_model_requests : None ):
196
196
class Axis (BaseModel ):
197
- label : str
197
+ label : str = Field ( default = '<unlabeled axis>' , description = 'The label of the axis' )
198
198
199
199
class Chart (BaseModel ):
200
200
x_axis : Axis
@@ -213,8 +213,14 @@ class Locations(BaseModel):
213
213
{
214
214
'$defs' : {
215
215
'Axis' : {
216
- 'properties' : {'label' : {'title' : 'Label' , 'type' : 'string' }},
217
- 'required' : ['label' ],
216
+ 'properties' : {
217
+ 'label' : {
218
+ 'default' : '<unlabeled axis>' ,
219
+ 'description' : 'The label of the axis' ,
220
+ 'title' : 'Label' ,
221
+ 'type' : 'string' ,
222
+ }
223
+ },
218
224
'title' : 'Axis' ,
219
225
'type' : 'object' ,
220
226
},
@@ -268,17 +274,27 @@ class Locations(BaseModel):
268
274
'items' : {
269
275
'properties' : {
270
276
'lat' : {'type' : 'number' },
271
- 'lng' : {'type' : 'number' },
277
+ 'lng' : {'default' : 1.1 , ' type' : 'number' },
272
278
'chart' : {
273
279
'properties' : {
274
280
'x_axis' : {
275
- 'properties' : {'label' : {'type' : 'string' }},
276
- 'required' : ['label' ],
281
+ 'properties' : {
282
+ 'label' : {
283
+ 'default' : '<unlabeled axis>' ,
284
+ 'description' : 'The label of the axis' ,
285
+ 'type' : 'string' ,
286
+ }
287
+ },
277
288
'type' : 'object' ,
278
289
},
279
290
'y_axis' : {
280
- 'properties' : {'label' : {'type' : 'string' }},
281
- 'required' : ['label' ],
291
+ 'properties' : {
292
+ 'label' : {
293
+ 'default' : '<unlabeled axis>' ,
294
+ 'description' : 'The label of the axis' ,
295
+ 'type' : 'string' ,
296
+ }
297
+ },
282
298
'type' : 'object' ,
283
299
},
284
300
},
0 commit comments