ai_query
Invokes a Databricks Model Serving endpoint and returns the response.
For the corresponding Databricks SQL function, see ai_query function.
Syntax
Python
from pyspark.sql import functions as dbf
dbf.ai_query(endpoint=<endpoint>, request=<request>, return_type=<return_type>)
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The name of the Databricks Model Serving endpoint to invoke. |
|
| A column containing the input data to send to the endpoint. |
|
| The expected return type, either as a DDL string (for example, |
Returns
pyspark.sql.Column: A new column containing the endpoint response.