With the execption of tools, blocks are stateless, executable, modular blocks of logic. They can be database queries, model inference or generic python glue code.

All blocks have inputs, settings, and a response_output.

Inputs

This is what you provide to the block, it can be prompts, queries, inputs and more.

Read more

Settings

Settings are how you define things like hyperparameters for models, embedding models for DB queries, and libraries for python code.

Read more

Response Output

Output you’d like the block to adhere to. This is critical to ensuring each block’s execution consistency.

Read more

Variables

Every block has access to parameters, and blocks.

Parameters

When calling your workbook, you send parameters via HTTP like:

curl --location 'https://api.nux.ai/v1/run/workbook/{WORKBOOK_ID}' \
--header 'Authorization: Bearer {API_KEY}' \
--data '{
    "parameters": {
        "key": "value"
    }
}'

You can then access the the key’s value in your blocks via standard handlebar tags: {{parameters.key}}

Blocks

This is the execution context of the workbook. Similar to how when you build a Jupyter notebook of cells, the variables are shared between eachother. You can pass these variables via {{blocks.cell_name.key}}