Structure model output using tool calling.
with_structured_output(
self,
schema: Union[Dict[str, Any], Type[Any]],
*,
include_raw: bool = False,
**kwargs: Any = {}
) -> Runnable| Name | Type | Description |
|---|---|---|
schema* | Union[Dict[str, Any], Type[Any]] | Output schema as Pydantic model or JSON schema dict. If dict, must have 'title' and 'properties' keys. |
include_raw | bool | Default: FalseIf True, return dict with 'raw' and 'parsed' keys. If False (default), return only the parsed output. |
**kwargs | Any | Default: {}Additional arguments passed to bind_tools. |