Skip to main content
With the option Allow code execution (for calculations and files), the assistant writes a Python program when needed and runs it in an isolated environment on the server of your VARIOS AI installation. This lets it calculate precisely, analyze data from uploaded files and provide results as files for download.
Home page > Menu icon > All Assistants > New Assistant > Functions and files
The option is already enabled for new assistants. If it is disabled, the assistant does not run any code: it can then neither calculate precisely nor create files. It still reads uploaded files as text or images, but it can only search the contents of ZIP and TAR archives, not unpack them. Binary files such as .pkl cannot be uploaded without the option.

What the assistant can do with it

Example requests

  • “Analyze the attached sales list by region and month and create a bar chart.”
  • “Merge the two Excel files on the customer number and highlight missing entries.”
  • “Turn this summary into a Word file with headings and a table.”
  • “Convert the attached presentation to PDF.”
  • “Calculate the monthly payment for €250,000 at 3.8% interest over 20 years and output the repayment schedule as an Excel file.”

Available libraries

The code runs in Python 3. The following libraries and tools are preinstalled: The Python standard library is available as well. For charts and documents, fonts are installed that are metric-compatible with Arial, Times New Roman, Courier New, Calibri and Cambria, plus Noto for special characters and other writing systems. This keeps the layout of Office files largely intact when they are converted to PDF. Additional libraries cannot be installed during execution.

Files in the chat

  • Input: Files uploaded to the chat or created there earlier are available to the program under their names, including subfolders. Supported formats include text, CSV, JSON, XML, HTML and Markdown files, PDFs, Word, Excel and PowerPoint files, images (PNG, JPEG, GIF), ZIP and TAR archives, and source code. The selected AI model additionally determines which file types may be uploaded.
  • Output: Files the program creates appear in the answer as a download link and in the chat’s Files panel. If the assistant creates a file with a name that already exists, it is saved as a new version of that file.

Security and limits

  • Isolated execution: Each execution runs in its own short-lived container on the server of your VARIOS AI installation. Your files are not sent to external services for this.
  • No internet access: The code cannot reach websites, APIs or external databases. To access external systems, use connectors.
  • No memory between executions: Variables and intermediate results are lost after each execution. Only the files in the chat are kept.
Resource limits also apply. The operator of your installation can adjust the following default values:

Troubleshooting

Check whether the option Allow code execution (for calculations and files) is enabled under Functions and files in the assistant’s settings. If the option is enabled and code is still never executed, code execution may not be set up on your installation. In this case, contact your administrator.
The task exceeds the run time or memory limit. Split the task into smaller steps or reduce the amount of data, for example by filtering to the relevant period.
Check whether the selected AI model allows the file type and whether the input files together exceed the size limit.
Code execution has no internet access. Connect external data sources via connectors or upload the data to the chat as a file.