TASK_MODELS is a custom function that creates a dropdown menu of all available language models in your specified cell. It streamlines model selection and minimizes typographical errors by allowing users to pick from a curated list of models provided by various API providers. This dropdown also displays your recently used models for quick access.
LM
=TASK_MODELS(cell_address)
Parameter | Data Type | Required | Description |
---|---|---|---|
cell_address |
|
Optional | The cell where you want the dropdown to appear. For example,
|
"B5"
"C"
The dropdown created by TASK_MODELS can be referenced in other Sheet Workflows functions such as
LM
=LM("Write a short poem about clouds", B2)
This allows you to change the model without modifying your formula.
Enter the following in cell A1:
=TASK_MODELS()
After clicking the "Run" button in the Sheet Workflows sidebar, a dropdown list will appear in the cell to the right (B1) with all available models.
Enter the following in cell A1:
=TASK_MODELS("D5")
After clicking the "Run" button, a dropdown list will appear in cell D5. You can then reference D5 in your other workflow functions to use the selected model.
In cell A1, add a label: "Selected Model:".
In cell A2, enter the formula:
=TASK_MODELS("B1")
In cell A3, add a label: "Prompt:".
In cell B3, enter your prompt text.
In cell A4, add a label: "Result:".
In cell B4, enter the formula:
=LM(B3, B1)
Run the TASK_MODELS function to create the dropdown.
Users can now select different models without editing the formulas.
Ensure you have configured at least one API provider with a valid API key in the Sheet Workflows settings.
Select the cell containing the TASK_MODELS formula before clicking the "Run" button in the sidebar.
Verify that the appropriate provider is configured in your Sheet Workflows settings.
After entering the formula, click the "Run" button in the Sheet Workflows sidebar to activate the dropdown.
Make sure the cell address is formatted correctly with quotation marks (e.g.,
"B2"
Check the cell_address parameter to ensure it is correctly formatted.
Use a model with the
LM
The dropdown displays models based on the API providers configured in the Sheet Workflows settings. To add more models, open the sidebar, navigate to "Settings" or "Configuration," and add additional providers such as OpenAI, Anthropic, or Gemini. Run TASK_MODELS again to update the dropdown.
The function automatically includes all models from your configured providers. To change which models appear, adjust the API providers in your Sheet Workflows settings.
When you use a model with the
LM
Yes, but you need to create the dropdown on each sheet where you want to use it. Dropdowns cannot be directly referenced across different sheets.
Different providers offer models with unique capabilities, costs, and specializations. The provider name (e.g., "OpenAI/gpt-4") is shown before the model name to distinguish between them.
Custom functions that modify the spreadsheet need to be executed via the sidebar to comply with the Google Sheets security model. Clicking "Run" activates these functions.
Yes, if a default model is configured in the Sheet Workflows settings, it will be automatically set as the initially selected value in the dropdown.
5 months ago