MCPcopy Create free account
hub / github.com/google/adk-python / is_basemodel_schema

Function is_basemodel_schema

src/google/adk/utils/_schema_utils.py:46–55  ·  view source on GitHub ↗

Check if the schema is a BaseModel type (not a generic alias). Args: schema: The schema to check. Returns: True if schema is a BaseModel class, False otherwise.

(schema: SchemaType)

Source from the content-addressed store, hash-verified

44
45
46def is_basemodel_schema(schema: SchemaType) -> bool:
47 """Check if the schema is a BaseModel type (not a generic alias).
48
49 Args:
50 schema: The schema to check.
51
52 Returns:
53 True if schema is a BaseModel class, False otherwise.
54 """
55 return isinstance(schema, type) and issubclass(schema, BaseModel)
56
57
58def is_list_of_basemodel(schema: SchemaType) -> bool:

Calls

no outgoing calls