From 88320625b6108bd4cb7d86517c224b825b4180e4 Mon Sep 17 00:00:00 2001 From: Gonzalo Tixilima Date: Mon, 22 Jun 2026 15:58:38 -0500 Subject: [PATCH 1/8] docs: update INFERENCE data event for LiteRT/LiteRT-LM and deprecate ONNX --- .../data-events-inference.md | 168 ++++++++++++++---- 1 file changed, 133 insertions(+), 35 deletions(-) diff --git a/docs/DATA EVENTS/data-events-reference/data-events-inference.md b/docs/DATA EVENTS/data-events-reference/data-events-inference.md index f11e0da..4220348 100644 --- a/docs/DATA EVENTS/data-events-reference/data-events-inference.md +++ b/docs/DATA EVENTS/data-events-reference/data-events-inference.md @@ -13,68 +13,166 @@ next: ## Description -The `INFERENCE` function performs inference on a given input, typically an image, using a specified machine learning model. It processes the input data and returns the results in a format suitable for further analysis or display within your application. This is useful for integrating AI-driven features, such as object detection, classification, or image recognition, into your application components. - -> ⚠️ **Upcoming Change: INFERENCE Data Event Library Update** -> We'll be updating the underlying library powering the INFERENCE data event in a future release. If your workflows depend on this event, we'd like to hear from you before the change goes out. Please reach out to [product@fulcrumapp.com](mailto:product@fulcrumapp.com) with any questions or concerns. +The `INFERENCE` function performs on-device machine learning or generative AI inference using a specified model. It supports computer vision tasks (such as image classification, object detection, or image recognition) via **LiteRT** and generative text tasks (such as summarization, assistant chats, or text classification) via **LiteRT-LM**. **THIS FUNCTION WORKS ON MOBILE DEVICES, BUT NOT IN THE WEB RECORD EDITOR** +> ⚠️ **Device Resource & Battery Usage Warning** +> On-device model inference is highly resource-intensive and will consume substantial battery and memory. When writing Data Events using the `INFERENCE` expression, please be mindful of these hardware requirements, which scale directly with the size of the loaded model. +> +> Due to the significant computational overhead of **Generative LLMs (LiteRT-LM)**, we strongly suggest recommending or restricting these features to modern, high-end mobile devices (such as the iPhone 17 Pro and equivalent high-end Android devices) to ensure a smooth and responsive user experience. + +## Execution Modes + +The execution mode is determined automatically by the structure of the `options` and `options.config` arguments: + +1. **Modern Vision ML (LiteRT)**: Used for on-device computer vision tasks. Triggered when `options.config` is provided and contains a `size` parameter. +2. **Modern Generative LLM (LiteRT-LM)**: Used for on-device generative text tasks. Triggered when `options.config` is provided and contains `prompt` or `systemPrompt` (and `options.photo_id` is omitted). +3. **Legacy Vision ML (ONNX - Deprecated)**: Used when `options.config` is omitted. **Support for ONNX is deprecated. Please upgrade to the modern LiteRT configurations.** + +--- + +## Model Resolution & Reference Types + +The `options.model` parameter accepts a string representing the model name, file, or catalog ID. The system resolves this value by searching four sources in the following strict priority order: + +1. **Form Reference File (Highest Priority)**: If you bundle custom models as form reference files (e.g. `mobilenet.tflite` or `gemma.gguf`), pass the exact filename (including extension) as the model string. + + + +**Auto-Detection of Model Type**: +* Files ending in `.tflite` default to **Vision ML** (LiteRT). +* Files ending in `.gguf`, `.litertlm`, or `.task` default to **Generative LLM**. + +--- + ## Parameters +### Common Parameters * `options` object (required) - An object containing the parameters for the function. + * `model` string (required) - The exact model filename, catalog ID, or display name to be loaded. + * `form_id` string (optional) - The identifier of the form (defaults to current form). + * `form_name` string (optional) - The name of the form. + +--- + +### Mode 1: Vision ML (LiteRT) +*Used for running image classification, object detection, and other computer vision models.* + +* `options` object: * `photo_id` string (required) - The identifier of the photo to be processed. - * `model` object (required) - The machine learning model to be used for inference. - * `size` number (optional) - The size to which the input should be resized before inference. Default is 640. - * `format` string (optional) - The format of the input data. Can be either 'chw' (channels, height, width) or 'hwc' (height, width, channels). Choose the format based on how the model was exported. Default is 'chw'. - * `type` string (optional) - The data type of the input. Default is 'float'. - * `mean` array (optional) - The mean values for normalizing the input data. Default is `[0.485, 0.456, 0.406]`. - * `std` array (optional) - The standard deviation values for normalizing the input data. Default is `[0.229, 0.224, 0.225]`. + * `config` object (required) - Configuration for the LiteRT runtime: + * `size` number (required) - The input image will be resized to a square before passing it to the model. `size` is the size of a side. It must be greater than 0 and it should match what the model expects. + * `format` string (optional) - The format of the input image data. Either `'chw'` (channels, height, width) or `'hwc'` (height, width, channels). + * `inputType` string (optional) - The data type of the input model. Either `'int8'` or `'float'`. + * `mean` array (optional) - An array of exactly 3 numbers for normalizing the input data (e.g. `[0.485, 0.456, 0.406]`). + * `std` array (optional) - An array of exactly 3 numbers for normalization standard deviations (e.g. `[0.229, 0.224, 0.225]`). -* `callback` function (required) - A function to be executed after the inference is completed. It receives two parameters: - * `error` object - Contains information if an error occurs during inference. - * `result` object - Contains the outputs of the inference. +--- + +### Mode 2: Modern Generative LLM +*Used for running on-device generative AI large language models.* + +* `options` object: + * `photo_id` (must be `null` or `undefined`) - Must not be supplied for text-only LLM tasks. + * `config` object (required) - Configuration for the LiteRT-LM runtime: + * `prompt` string (optional*) - The input instruction prompt. + * `systemPrompt` string (optional*) - System instructions to guide the model's behavior, tone, or role. + * `temperature` number (optional) - Controls randomness in generation. Must be non-negative. + * `topK` number (optional) - Restricts sampling to the top K most likely tokens. Must be a positive integer. + * `topP` number (optional) - Restricts sampling to cumulative probability P. Must be non-negative. + * `maxTokens` number (optional) - Maximum number of tokens to generate. Must be a positive integer. + * `contextSize` number (optional) - Context window size. Must be a positive integer. + * `stopTokens` array (optional) - Array of non-empty strings representing tokens that halt generation. + + *\*Note: At least one of `prompt` or `systemPrompt` must be provided.* + +--- + +### Mode 3: Legacy Vision ML (ONNX - Deprecated) +*Deprecated. Use Modern Vision ML (LiteRT) config-based schemas instead.* + +* `options` object: + * `photo_id` string (required) + * `size` number (required) + * `format` string (optional) - Either `'hwc'` or `'chw'`. + * `type` string (optional) - Either `'uint8'` or `'float'`. + * `mean` array (optional) + * `std` array (optional) + +--- + +### Callback Signature +* `callback` function (required) - Executed after the inference is completed. Receives two arguments: + * `error` object - Contains error information if inference fails, otherwise `null`. + * `result` object - Contains the outputs: + * **For Vision ML / Legacy ML**: A `result.outputs` object where output arrays are automatically flattened. + * **For Generative LLM**: A `result.outputs` object containing `result.outputs.text` (the generated text response) and a `result.modelType` of `'LLM'`. + +--- ## Examples +### Example 1: Vision ML ```javascript -// Example of performing inference on a photo using a pre-trained model and handling the results +// Perform on-device image classification when a photo is added ON('add-photo', 'photos', (event) => { INFERENCE({ + model: 'fulcrum-pylon.tflite', // Model reference file uploaded to the form photo_id: event.value.id, - model: preTrainedModel, - size: 640, - format: 'chw', - type: 'float', - mean: [0.485, 0.456, 0.406], - std: [0.229, 0.224, 0.225] - }, (error, { outputs }) => { + config: { + size: 224, + format: 'chw', + inputType: 'float', + mean: [0.485, 0.456, 0.406], + std: [0.229, 0.224, 0.225] + } + }, (error, result) => { if (error) { - ALERT(error.message); + ALERT('Inference failed: ' + error.message); return; } - const results = Object.values(outputs)[0].value.map((score, index) => { - return { - index, - score, - label: LABELS[index] - }; - }); + const outputs = result.outputs; + const scores = Object.values(outputs)[0].value; + + // Process output scores... + SETVALUE('class_result', 'Successfully analyzed image!'); + }); +}); +``` - const sorted = results.sort((a, b) => b.score - a.score); +### Example 2: Modern Generative LLM +```javascript +// Use an on-device LLM to summarize notes when a record is saved +ON('save-record', () => { + const notes = VALUE('notes'); + if (!notes) return; - const topK = top != null ? sorted.slice(0, top) : sorted; + INFERENCE({ + model: 'gemma-4-e2b.literlm', + config: { + systemPrompt: 'You are an assistant. Summarize the user text in one short sentence.', + prompt: notes, + temperature: 0.7, + maxTokens: 100 + } + }, (error, result) => { + if (error) { + ALERT('Summarization failed: ' + error.message); + return; + } - SETVALUE('my_detections', JSON.stringify(topK)); + // Access the generated response text + SETVALUE('summary', result.outputs.text); }); }); ``` ## Usage -The `INFERENCE` function is typically used when you need to perform AI-driven tasks such as image classification, object detection, or any other form of model inference. By providing a photo ID and the relevant model, you can process images directly within your application and obtain results for further action, like displaying detected objects or classifying images. - -This function is particularly useful in applications that require dynamic analysis or AI-based decision-making, enabling seamless integration of advanced machine learning models into your workflows. +The `INFERENCE` function is typically used in applications requiring offline, local, or low-latency intelligence on-device: +* **Image Recognition / Classification**: Verify image contents, detect equipment, or perform safety audits offline without any internet connection. +* **On-Device LLMs**: Perform smart form calculations, generate field summaries, suggest translations, or parse unstructured user text instantly in the field. **Note:** This feature is only available with Elite and Enterprise plans. Check out [our plans page](https://www.fulcrumapp.com/pricing/) for more information. \ No newline at end of file From 8fda815714e960316c3a797aad9c740a3ce022d3 Mon Sep 17 00:00:00 2001 From: Gonzalo Tixilima Date: Mon, 22 Jun 2026 16:12:23 -0500 Subject: [PATCH 2/8] chore: address copilot feedback --- .../data-events-reference/data-events-inference.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/DATA EVENTS/data-events-reference/data-events-inference.md b/docs/DATA EVENTS/data-events-reference/data-events-inference.md index 4220348..2d0891b 100644 --- a/docs/DATA EVENTS/data-events-reference/data-events-inference.md +++ b/docs/DATA EVENTS/data-events-reference/data-events-inference.md @@ -20,7 +20,7 @@ The `INFERENCE` function performs on-device machine learning or generative AI in > ⚠️ **Device Resource & Battery Usage Warning** > On-device model inference is highly resource-intensive and will consume substantial battery and memory. When writing Data Events using the `INFERENCE` expression, please be mindful of these hardware requirements, which scale directly with the size of the loaded model. > -> Due to the significant computational overhead of **Generative LLMs (LiteRT-LM)**, we strongly suggest recommending or restricting these features to modern, high-end mobile devices (such as the iPhone 17 Pro and equivalent high-end Android devices) to ensure a smooth and responsive user experience. +> Due to the significant computational overhead of **Generative LLMs (LiteRT-LM)**, we strongly suggest recommending or restricting these features to modern, high-end mobile devices (such as the iPhone 17 Pro and equivalent high-end Android devices to run gemma-4-e2b) to ensure a smooth and responsive user experience. ## Execution Modes @@ -34,7 +34,7 @@ The execution mode is determined automatically by the structure of the `options` ## Model Resolution & Reference Types -The `options.model` parameter accepts a string representing the model name, file, or catalog ID. The system resolves this value by searching four sources in the following strict priority order: +The `options.model` parameter accepts a string representing the model filename uploaded to the reference files: 1. **Form Reference File (Highest Priority)**: If you bundle custom models as form reference files (e.g. `mobilenet.tflite` or `gemma.gguf`), pass the exact filename (including extension) as the model string. @@ -74,7 +74,7 @@ The `options.model` parameter accepts a string representing the model name, file *Used for running on-device generative AI large language models.* * `options` object: - * `photo_id` (must be `null` or `undefined`) - Must not be supplied for text-only LLM tasks. + * `photo_id` (must be a string or it should be omitted) - Must not be supplied for text-only LLM tasks and should be the identifier of the photo for multimodal LLMs. * `config` object (required) - Configuration for the LiteRT-LM runtime: * `prompt` string (optional*) - The input instruction prompt. * `systemPrompt` string (optional*) - System instructions to guide the model's behavior, tone, or role. @@ -150,7 +150,7 @@ ON('save-record', () => { if (!notes) return; INFERENCE({ - model: 'gemma-4-e2b.literlm', + model: 'gemma-4-e2b.litertlm', config: { systemPrompt: 'You are an assistant. Summarize the user text in one short sentence.', prompt: notes, From 8b86e0a9e9e3b3243a2692ad3a0e8f61f388456c Mon Sep 17 00:00:00 2001 From: Gonzalo Tixilima Date: Mon, 22 Jun 2026 16:17:44 -0500 Subject: [PATCH 3/8] Remove inconsistency with photo_id in LLMs Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- docs/DATA EVENTS/data-events-reference/data-events-inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DATA EVENTS/data-events-reference/data-events-inference.md b/docs/DATA EVENTS/data-events-reference/data-events-inference.md index 2d0891b..2e30b6c 100644 --- a/docs/DATA EVENTS/data-events-reference/data-events-inference.md +++ b/docs/DATA EVENTS/data-events-reference/data-events-inference.md @@ -27,7 +27,7 @@ The `INFERENCE` function performs on-device machine learning or generative AI in The execution mode is determined automatically by the structure of the `options` and `options.config` arguments: 1. **Modern Vision ML (LiteRT)**: Used for on-device computer vision tasks. Triggered when `options.config` is provided and contains a `size` parameter. -2. **Modern Generative LLM (LiteRT-LM)**: Used for on-device generative text tasks. Triggered when `options.config` is provided and contains `prompt` or `systemPrompt` (and `options.photo_id` is omitted). +2. **Modern Generative LLM (LiteRT-LM)**: Used for on-device generative text tasks. Triggered when `options.config` is provided and contains `prompt` or `systemPrompt`. 3. **Legacy Vision ML (ONNX - Deprecated)**: Used when `options.config` is omitted. **Support for ONNX is deprecated. Please upgrade to the modern LiteRT configurations.** --- From 76b46a4da0b6bf5003d6ffa768e409a45ca3c374 Mon Sep 17 00:00:00 2001 From: Gonzalo Tixilima Date: Mon, 22 Jun 2026 16:18:45 -0500 Subject: [PATCH 4/8] Fix ambiguous parameter Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- docs/DATA EVENTS/data-events-reference/data-events-inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DATA EVENTS/data-events-reference/data-events-inference.md b/docs/DATA EVENTS/data-events-reference/data-events-inference.md index 2e30b6c..291a587 100644 --- a/docs/DATA EVENTS/data-events-reference/data-events-inference.md +++ b/docs/DATA EVENTS/data-events-reference/data-events-inference.md @@ -74,7 +74,7 @@ The `options.model` parameter accepts a string representing the model filename u *Used for running on-device generative AI large language models.* * `options` object: - * `photo_id` (must be a string or it should be omitted) - Must not be supplied for text-only LLM tasks and should be the identifier of the photo for multimodal LLMs. + * `photo_id` string (optional) - Omit for text-only LLM tasks. Provide the identifier of the photo to include for multimodal LLMs. * `config` object (required) - Configuration for the LiteRT-LM runtime: * `prompt` string (optional*) - The input instruction prompt. * `systemPrompt` string (optional*) - System instructions to guide the model's behavior, tone, or role. From a8f9197ae4e46a5267c4cf56a6bb3c732d9f30e9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Jun 2026 21:21:49 +0000 Subject: [PATCH 5/8] docs: align model parameter description to reference files only --- docs/DATA EVENTS/data-events-reference/data-events-inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DATA EVENTS/data-events-reference/data-events-inference.md b/docs/DATA EVENTS/data-events-reference/data-events-inference.md index 291a587..f07861f 100644 --- a/docs/DATA EVENTS/data-events-reference/data-events-inference.md +++ b/docs/DATA EVENTS/data-events-reference/data-events-inference.md @@ -50,7 +50,7 @@ The `options.model` parameter accepts a string representing the model filename u ### Common Parameters * `options` object (required) - An object containing the parameters for the function. - * `model` string (required) - The exact model filename, catalog ID, or display name to be loaded. + * `model` string (required) - The exact model filename uploaded to the form's reference files to be loaded. * `form_id` string (optional) - The identifier of the form (defaults to current form). * `form_name` string (optional) - The name of the form. From a0feac9b6ad9d6da28109bfca351db671d5203bc Mon Sep 17 00:00:00 2001 From: Gonzalo Tixilima Date: Mon, 22 Jun 2026 16:26:04 -0500 Subject: [PATCH 6/8] use evergreen language Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../data-events-reference/data-events-inference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/DATA EVENTS/data-events-reference/data-events-inference.md b/docs/DATA EVENTS/data-events-reference/data-events-inference.md index f07861f..fc0904b 100644 --- a/docs/DATA EVENTS/data-events-reference/data-events-inference.md +++ b/docs/DATA EVENTS/data-events-reference/data-events-inference.md @@ -18,9 +18,9 @@ The `INFERENCE` function performs on-device machine learning or generative AI in **THIS FUNCTION WORKS ON MOBILE DEVICES, BUT NOT IN THE WEB RECORD EDITOR** > ⚠️ **Device Resource & Battery Usage Warning** -> On-device model inference is highly resource-intensive and will consume substantial battery and memory. When writing Data Events using the `INFERENCE` expression, please be mindful of these hardware requirements, which scale directly with the size of the loaded model. +> On-device model inference is highly resource-intensive and will consume substantial battery and memory. Requirements scale directly with the size of the loaded model. > -> Due to the significant computational overhead of **Generative LLMs (LiteRT-LM)**, we strongly suggest recommending or restricting these features to modern, high-end mobile devices (such as the iPhone 17 Pro and equivalent high-end Android devices to run gemma-4-e2b) to ensure a smooth and responsive user experience. +> **Generative LLMs (LiteRT-LM)** are especially demanding; consider limiting them to modern flagship devices and/or documenting minimum device requirements (RAM/SoC) for your users. ## Execution Modes From 859a0c0d56b3da335fb63d4e938eb7a235eb64b7 Mon Sep 17 00:00:00 2001 From: Gonzalo Tixilima Date: Mon, 22 Jun 2026 16:49:21 -0500 Subject: [PATCH 7/8] docs: abstract LiteRT engines and remove Model Catalog references --- .../data-events-inference.md | 50 ++++++++++++------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/docs/DATA EVENTS/data-events-reference/data-events-inference.md b/docs/DATA EVENTS/data-events-reference/data-events-inference.md index fc0904b..071e829 100644 --- a/docs/DATA EVENTS/data-events-reference/data-events-inference.md +++ b/docs/DATA EVENTS/data-events-reference/data-events-inference.md @@ -13,36 +13,48 @@ next: ## Description -The `INFERENCE` function performs on-device machine learning or generative AI inference using a specified model. It supports computer vision tasks (such as image classification, object detection, or image recognition) via **LiteRT** and generative text tasks (such as summarization, assistant chats, or text classification) via **LiteRT-LM**. +The `INFERENCE` function performs on-device machine learning or generative AI inference using a specified model. It supports computer vision tasks (such as image classification, object detection, or image recognition) and generative text tasks (such as summarization, assistant chats, or text classification) directly on the mobile device. **THIS FUNCTION WORKS ON MOBILE DEVICES, BUT NOT IN THE WEB RECORD EDITOR** > ⚠️ **Device Resource & Battery Usage Warning** > On-device model inference is highly resource-intensive and will consume substantial battery and memory. Requirements scale directly with the size of the loaded model. > -> **Generative LLMs (LiteRT-LM)** are especially demanding; consider limiting them to modern flagship devices and/or documenting minimum device requirements (RAM/SoC) for your users. +> **Generative LLMs** are especially demanding; consider limiting them to modern flagship devices and/or documenting minimum device requirements (RAM/SoC) for your users. ## Execution Modes -The execution mode is determined automatically by the structure of the `options` and `options.config` arguments: +The execution mode determines how the system runs the model. It supports three modes: + +1. **Vision ML**: Used for on-device computer vision tasks (such as image classification, object detection, or image recognition). +2. **Generative LLM**: Used for on-device generative text tasks (such as summarization, assistant chats, or text classification). +3. **Legacy Vision ML (ONNX - Deprecated)**: Fallback execution when `options.config` is omitted. **Support for ONNX is deprecated. Please upgrade to modern configurations.** + +> ⚠️ **Model Type Auto-Detection** +> +> The model type is determined **strictly by the file extension** of the model file passed to `options.model`. +> +> Auto-detection is **not** determined or overridden by the parameters passed inside `options.config`. However, **the parameters in `options.config` must match the auto-detected model type** (e.g., providing a `size` parameter for a Vision ML model, or a `prompt` parameter for a Generative LLM). -1. **Modern Vision ML (LiteRT)**: Used for on-device computer vision tasks. Triggered when `options.config` is provided and contains a `size` parameter. -2. **Modern Generative LLM (LiteRT-LM)**: Used for on-device generative text tasks. Triggered when `options.config` is provided and contains `prompt` or `systemPrompt`. -3. **Legacy Vision ML (ONNX - Deprecated)**: Used when `options.config` is omitted. **Support for ONNX is deprecated. Please upgrade to the modern LiteRT configurations.** --- -## Model Resolution & Reference Types +## Model Resolution & Supported File Extensions + +The `options.model` parameter accepts a string representing the model filename uploaded to the reference files. + +### Supported File Extensions & Model Types + +The system detects the correct machine learning engine to use based on the file extension of the model: -The `options.model` parameter accepts a string representing the model filename uploaded to the reference files: +| File Extension | Detected Model Type | Typical Use Cases | +| :--- | :--- | :--- | +| **`.tflite`** | **Vision ML** | Image classification, object detection, image recognition | +| **`.gguf`**, **`.litertlm`**, **`.task`** | **Generative LLM** | Text generation, text summarization, assistant chats, text classification | -1. **Form Reference File (Highest Priority)**: If you bundle custom models as form reference files (e.g. `mobilenet.tflite` or `gemma.gguf`), pass the exact filename (including extension) as the model string. - - +### Model Loading -**Auto-Detection of Model Type**: -* Files ending in `.tflite` default to **Vision ML** (LiteRT). -* Files ending in `.gguf`, `.litertlm`, or `.task` default to **Generative LLM**. +If you bundle custom models as form reference files (e.g., `mobilenet.tflite` or `gemma.gguf`), pass the exact filename (including extension) as the `options.model` string. --- @@ -56,12 +68,12 @@ The `options.model` parameter accepts a string representing the model filename u --- -### Mode 1: Vision ML (LiteRT) +### Mode 1: Vision ML (for `.tflite` models) *Used for running image classification, object detection, and other computer vision models.* * `options` object: * `photo_id` string (required) - The identifier of the photo to be processed. - * `config` object (required) - Configuration for the LiteRT runtime: + * `config` object (required) - Configuration for the computer vision engine: * `size` number (required) - The input image will be resized to a square before passing it to the model. `size` is the size of a side. It must be greater than 0 and it should match what the model expects. * `format` string (optional) - The format of the input image data. Either `'chw'` (channels, height, width) or `'hwc'` (height, width, channels). * `inputType` string (optional) - The data type of the input model. Either `'int8'` or `'float'`. @@ -70,12 +82,12 @@ The `options.model` parameter accepts a string representing the model filename u --- -### Mode 2: Modern Generative LLM +### Mode 2: Generative LLM (for `.gguf`, `.litertlm`, and `.task` models) *Used for running on-device generative AI large language models.* * `options` object: * `photo_id` string (optional) - Omit for text-only LLM tasks. Provide the identifier of the photo to include for multimodal LLMs. - * `config` object (required) - Configuration for the LiteRT-LM runtime: + * `config` object (required) - Configuration for the generative text engine: * `prompt` string (optional*) - The input instruction prompt. * `systemPrompt` string (optional*) - System instructions to guide the model's behavior, tone, or role. * `temperature` number (optional) - Controls randomness in generation. Must be non-negative. @@ -90,7 +102,7 @@ The `options.model` parameter accepts a string representing the model filename u --- ### Mode 3: Legacy Vision ML (ONNX - Deprecated) -*Deprecated. Use Modern Vision ML (LiteRT) config-based schemas instead.* +*Deprecated. Use Modern Vision ML config-based schemas instead.* * `options` object: * `photo_id` string (required) From 2355ef744551e17fcb6e7191ce68ff82767220e8 Mon Sep 17 00:00:00 2001 From: Gonzalo Tixilima Date: Mon, 22 Jun 2026 16:55:17 -0500 Subject: [PATCH 8/8] fix: spacing breaking markdown Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- docs/DATA EVENTS/data-events-reference/data-events-inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DATA EVENTS/data-events-reference/data-events-inference.md b/docs/DATA EVENTS/data-events-reference/data-events-inference.md index 071e829..6ea86f0 100644 --- a/docs/DATA EVENTS/data-events-reference/data-events-inference.md +++ b/docs/DATA EVENTS/data-events-reference/data-events-inference.md @@ -97,7 +97,7 @@ If you bundle custom models as form reference files (e.g., `mobilenet.tflite` or * `contextSize` number (optional) - Context window size. Must be a positive integer. * `stopTokens` array (optional) - Array of non-empty strings representing tokens that halt generation. - *\*Note: At least one of `prompt` or `systemPrompt` must be provided.* + * **Note:** At least one of `prompt` or `systemPrompt` must be provided. ---