Check if a type is a Pydantic BaseModel subclass.
(t: Any)
| 272 | |
| 273 | |
| 274 | def _is_pydantic_model(t: Any) -> bool: |
| 275 | """Check if a type is a Pydantic BaseModel subclass.""" |
| 276 | try: |
| 277 | return isinstance(t, type) and issubclass(t, BaseModel) |
| 278 | except TypeError: |
| 279 | return False |
| 280 | |
| 281 | |
| 282 | def _normalize_result(result: Any) -> ToolResult: |
no outgoing calls
no test coverage detected
searching dependent graphs…