After experimenting with the various blocks, inputs and settings in your workbook builder, you can deploy it.

This converts the workbook’s JSON (which you can think of as a YAML file, containing infrastructure as code instructions) into a DAG of containers.

See this example:

{
    "version_id": "latest",
    "scope": {
        "id": "global",
        "public": false,
        "deployed": false
    },
    "metadata": {},
    "parameters": [
        {
            "key": "url",
            "description": "URL location of file to parse",
            "default": ""
        }
    ],
    "last_run": "2024-01-12T17:25:24.414000",
    "created_at": "2023-12-25T17:09:05.038000",
    "blocks": [
        {
            "version_id": "latest",
            "block_id": "1a5e71",
            "name": "New code: python",
            "description": "This is my new code.",
            "classifications": [
                {
                    "key": "type",
                    "icon": null,
                    "value": "code"
                },
                {
                    "key": "subtype",
                    "icon": null,
                    "value": "python"
                }
            ],
            "metadata": {
                "cell_name": "extract_content"
            },
            "inputs": [
                {
                    "property": "code",
                    "type": "code",
                    "constraints": [
                        {
                            "validator_type": "max_length",
                            "value": 5000,
                            "enabled_when": null
                        }
                    ],
                    "value": "import PyPDF2\nimport requests\nfrom io import BytesIO\n\ndef function(parameters, blocks):\n    response = requests.get({{parameters.url}}, timeout=10)\n    with BytesIO(response.content) as pdf_file:\n        reader = PyPDF2.PdfReader(pdf_file)\n\n        text = \"\"\n        for page in reader.pages:\n            text += page.extract_text()\n\n    return text \n",
                    "description": null
                }
            ],
            "settings": [
                {
                    "property": "packages",
                    "description": "Enter each package and version, standard syntax for pip (requests==2.31.0) or npm (express==4.17.1) applies.",
                    "type": "tags_input",
                    "constraints": [
                        {
                            "validator_type": "max_items",
                            "value": 10,
                            "enabled_when": null
                        }
                    ],
                    "value": [
                        "requests",
                        "PyPDF2"
                    ],
                    "disabled": false
                },
                {
                    "property": "version",
                    "description": "Python version to use.",
                    "type": "dropdown",
                    "constraints": [
                        {
                            "validator_type": "option",
                            "value": "python3.10",
                            "enabled_when": null
                        },
                        {
                            "validator_type": "option",
                            "value": "python3.8",
                            "enabled_when": null
                        }
                    ],
                    "value": "python3.10",
                    "disabled": false
                }
            ],
            "response_format": [],
            "created_at": "2024-01-11T02:58:06.209000",
            "scope": {
                "id": "local",
                "published": false
            }
        },
        {
            "version_id": "latest",
            "name": "New model: gpt",
            "description": "This is my new model.",
            "classifications": [
                {
                    "key": "type",
                    "icon": null,
                    "value": "model"
                },
                {
                    "key": "subtype",
                    "icon": null,
                    "value": "gpt"
                }
            ],
            "metadata": {
                "cell_name": "structured_output"
            },
            "inputs": [
                {
                    "property": "prompt",
                    "type": "text",
                    "constraints": [
                        {
                            "validator_type": "max_length",
                            "value": 500,
                            "enabled_when": null
                        }
                    ],
                    "value": "Extract the provided investment document content into the provided JSON function: {{blocks.extract_content}}",
                    "description": null
                }
            ],
            "settings": [
                {
                    "property": "model",
                    "description": "Select the model to use.",
                    "type": "dropdown",
                    "constraints": [
                        {
                            "validator_type": "option",
                            "value": "gpt-4",
                            "enabled_when": null
                        },
                        {
                            "validator_type": "option",
                            "value": "gpt-3.5-turbo",
                            "enabled_when": null
                        },
                        {
                            "validator_type": "option",
                            "value": "gpt-4-1106-preview",
                            "enabled_when": null
                        }
                    ],
                    "value": "gpt-4-1106-preview",
                    "disabled": false
                },
                {
                    "property": "system_prompt",
                    "description": "System message to use as a prompt.",
                    "type": "text",
                    "constraints": [
                        {
                            "validator_type": "max_length",
                            "value": 500,
                            "enabled_when": null
                        }
                    ],
                    "value": "",
                    "disabled": false
                }
            ],
            "response_format": [
                {
                    "key": "company_name",
                    "type": "string",
                    "description": "Company Name",
                    "value": null,
                    "enum": null
                }
            ],
            "created_at": "2024-01-11T02:58:10.293000",
            "scope": {
                "id": "local",
                "published": false
            }
        }
    ]
}

You can even store this JSON in your company’s version control to keep track of changes.

Each block is mapped to a container and the outputs of each are transmitted via RPC within the same network. This allows us to maintain low-latency, low-costs and high security.

This of course changes if you’re using a managed model like OpenAI, and we provide options so you can supply your 3rd party managed model’s API keys.

When your workbook is deployed, it cannot be edited.

We also have a self-hosted option just contact us: ethan@nux.ai