module pixeltable.functions.fabric
Pixeltable UDFs that wrap Azure OpenAI endpoints via Microsoft Fabric. These functions provide seamless access to Azure OpenAI models within Microsoft Fabric notebook environments. Authentication and endpoint discovery are handled automatically using Fabric’s built-in service discovery and token utilities. Note: These functions only work within Microsoft Fabric notebook environments. For more information on Fabric AI services, see: https://learn.microsoft.com/en-us/fabric/data-science/ai-services/ai-services-overviewudf chat_completions()
Signature
chat/completions API endpoint.
For additional details, see: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference
Automatic authentication: Authentication is handled automatically in Fabric notebooks using
token-based authentication. No API keys are required.
Supported models in Fabric:
gpt-5(reasoning model)gpt-4.1gpt-4.1-mini
fabric.rate_limits, key chat). If no rate
limit is configured, uses a default of 600 RPM.
Requirements:
- Microsoft Fabric notebook environment
synapse-ml-fabricpackage (pre-installed in Fabric)
-
messages(pxt.Json): A list of message dicts with ‘role’ and ‘content’ keys, as described in the Azure OpenAI API documentation. -
model(pxt.String): The deployment name to use (e.g., ‘gpt-5’, ‘gpt-4.1’, ‘gpt-4.1-mini’). -
api_version(pxt.String | None): Optional API version override. If not specified, defaults to ‘2025-04-01-preview’ for reasoning models (gpt-5) and ‘2024-02-15-preview’ for standard models. -
model_kwargs(pxt.Json | None): Additional keyword args for the Azure OpenAIchat/completionsAPI. For details on available parameters, see: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference Note: Reasoning models (gpt-5) usemax_completion_tokensinstead ofmax_tokensand do not support thetemperatureparameter.
pxt.Json: A dictionary containing the response and other metadata.
gpt-4.1 to an existing Pixeltable column tbl.prompt of the table tbl:
udf embeddings()
Signature
embeddings API endpoint.
For additional details, see: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference
Automatic authentication: Authentication is handled automatically in Fabric notebooks using
token-based authentication. No API keys are required.
Supported models in Fabric:
text-embedding-ada-002text-embedding-3-smalltext-embedding-3-large
fabric.rate_limits, key embeddings). If no rate
limit is configured, uses a default of 600 RPM. Batches up to 32 inputs per request for efficiency.
Requirements:
- Microsoft Fabric notebook environment
synapse-ml-fabricpackage (pre-installed in Fabric)
input(pxt.String): The text to embed (automatically batched).model(pxt.String): The embedding model deployment name (default: ‘text-embedding-ada-002’).api_version(pxt.String): The API version to use (default: ‘2024-02-15-preview’).model_kwargs(pxt.Json | None): Additional keyword args for the Azure OpenAIembeddingsAPI. For details on available parameters, see: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference
pxt.Array[(None,), float32]: An array representing the embedding vector for the input text.
text-embedding-ada-002 to an existing Pixeltable column tbl.text of the table tbl:
text: