@@ -194,7 +194,7 @@ async def test_require_response_tool(allow_model_requests: None):
194194
195195async def test_json_def_replaced (allow_model_requests : None ):
196196 class Axis (BaseModel ):
197- label : str
197+ label : str = Field ( default = '<unlabeled axis>' , description = 'The label of the axis' )
198198
199199 class Chart (BaseModel ):
200200 x_axis : Axis
@@ -213,8 +213,14 @@ class Locations(BaseModel):
213213 {
214214 '$defs' : {
215215 '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+ },
218224 'title' : 'Axis' ,
219225 'type' : 'object' ,
220226 },
@@ -268,17 +274,27 @@ class Locations(BaseModel):
268274 'items' : {
269275 'properties' : {
270276 'lat' : {'type' : 'number' },
271- 'lng' : {'type' : 'number' },
277+ 'lng' : {'default' : 1.1 , ' type' : 'number' },
272278 'chart' : {
273279 'properties' : {
274280 '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+ },
277288 'type' : 'object' ,
278289 },
279290 '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+ },
282298 'type' : 'object' ,
283299 },
284300 },
0 commit comments