airflow.providers.common.ai.utils.tool_definition¶
Version-tolerant helpers for building pydantic-ai ToolDefinition objects.
Functions¶
|
Return |
Module Contents¶
- airflow.providers.common.ai.utils.tool_definition.return_schema_kwargs(schema)[source]¶
Return
{"return_schema": schema}when pydantic-ai supports the field, else{}.return_schemalets CodeMode (the Monty sandbox) render a typed function signature for a tool (-> str) instead of-> Any, which helps the model write correct code. It has no effect outside code mode.