@@ -171,8 +171,7 @@ def func_metadata(
171171 - TypedDict - converted to a Pydantic model with same fields
172172 - NamedTuple - converted to a Pydantic model with same fields
173173 - Dataclasses and other annotated classes - converted to Pydantic models
174- - Generic types (list, dict, Union, etc.) - wrapped in a model with a
175- 'result' field
174+ - Generic types (list, dict, Union, etc.) - wrapped in a model with a 'result' field
176175 Raises InvalidSignature if the return type has no annotations.
177176 Returns:
178177 A FuncMetadata object containing:
@@ -206,14 +205,18 @@ def func_metadata(
206205 WithJsonSchema ({"title" : param .name , "type" : "string" }),
207206 ]
208207
209- output_info = FieldInfo .from_annotated_attribute (
208+ field_info = FieldInfo .from_annotated_attribute (
210209 _get_typed_annotation (annotation , globalns ),
211210 param .default if param .default is not inspect .Parameter .empty else PydanticUndefined ,
212211 )
213- dynamic_pydantic_model_params [param .name ] = (output_info .annotation , output_info )
212+ dynamic_pydantic_model_params [param .name ] = (field_info .annotation , field_info )
214213 continue
215214
216- arguments_model = create_model (f"{ func .__name__ } Arguments" , ** dynamic_pydantic_model_params , __base__ = ArgModelBase )
215+ arguments_model = create_model (
216+ f"{ func .__name__ } Arguments" ,
217+ ** dynamic_pydantic_model_params ,
218+ __base__ = ArgModelBase ,
219+ )
217220
218221 output_model = None
219222 output_conversion = "none"
0 commit comments