File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -120,19 +120,20 @@ def _extract_parameters(self) -> Dict[str, Any]:
120120 @classmethod
121121 def from_model (cls , model : type [BaseModel ]) -> "LitTool" :
122122 """Create a LitTool that exposes a Pydantic model as a structured schema."""
123+
123124 class ModelTool (LitTool ):
124125 def setup (self ) -> None :
125126 super ().setup ()
126127 self .name = model .__name__
127128 self .description = model .__doc__ or ""
128-
129+
129130 def run (self , * args , ** kwargs ) -> Any : # type: ignore
130131 # Default implementation: validate & return an instance
131132 return model (* args , ** kwargs )
132-
133+
133134 def _extract_parameters (self ) -> Dict [str , Any ]:
134135 return model .model_json_schema ()
135-
136+
136137 return ModelTool ()
137138
138139 @classmethod
You can’t perform that action at this time.
0 commit comments