Skip to content

_require_fabric_ai_dataframe

Internal helper
This page documents an internal implementation helper, not a primary public API.
Source code in src/fabricops_kit/ai.py
192
193
194
195
196
def _require_fabric_ai_dataframe(df, helper_name: str):
    ai = getattr(df, "ai", None)
    if ai is None or not hasattr(ai, "generate_response"):
        raise RuntimeError(f"{helper_name} requires Fabric DataFrame.ai.generate_response in AI Functions-enabled runtime.")
    return ai