module pixeltable.functions.mistralai
Pixeltable UDFs
that wrap various endpoints from the Mistral AI API. In order to use them, you must
first pip install mistralai and configure your Mistral AI credentials, as described in
the Working with Mistral AI tutorial.
udf chat_completions()
Chat Completion API.
Equivalent to the Mistral AI chat/completions API endpoint.
For additional details, see: https://docs.mistral.ai/api/#tag/chat
Request throttling:
Applies the rate limit set in the config (section mistral, key rate_limit). If no rate
limit is configured, uses a default of 600 RPM.
Requirements:
Parameters:
Returns:
Json: A dictionary containing the response and other metadata.
Examples:
Add a computed column that applies the model mistral-latest-small to an existing Pixeltable column tbl.prompt of the table tbl:
udf embeddings()
Embeddings API.
Equivalent to the Mistral AI embeddings API endpoint.
For additional details, see: https://docs.mistral.ai/api/#tag/embeddings
Request throttling:
Applies the rate limit set in the config (section mistral, key rate_limit). If no rate
limit is configured, uses a default of 600 RPM.
Requirements:
Parameters:
Returns:
Array[(None,), Float]: An array representing the application of the given embedding to input.
udf fim_completions()
Fill-in-the-middle Completion API.
Equivalent to the Mistral AI fim/completions API endpoint.
For additional details, see: https://docs.mistral.ai/api/#tag/fim
Request throttling:
Applies the rate limit set in the config (section mistral, key rate_limit). If no rate
limit is configured, uses a default of 600 RPM.
Requirements:
Parameters:
Returns:
Json: A dictionary containing the response and other metadata.
Examples:
Add a computed column that applies the model codestral-latest to an existing Pixeltable column tbl.prompt of the table tbl:
Last modified on January 15, 2026