Skip to content

Tool fails to run Python code after package installation and creates excessive files #15

@smuotoe

Description

@smuotoe

Description

When attempting to plot stock prices using the code execution tool, it only runs the bash script for package installation but fails to execute the subsequent Python code. Additionally, it creates an excessive number of files (over 1000) during this process.

General information

  • Open WebUI version: v0.3.23
  • Tool/function version: 0.6.0
  • Open WebUI setup:
    • Kernel information: Linux 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
    • Runtime: Docker
    • If running in Docker:

Steps to Reproduce

  1. Use the Open WebUI with the code execution function enabled.
  2. Submit the following prompt to the LLM: "plot the stock price of Apple, Tesla, Nvidia and Microsoft YTD"
  3. The LLM typically responds with two code blocks:
    a. A bash script to install required packages
    b. Python code to create the stock price plot
  4. Attempt to run the provided code using the "Run code" button at the end of the response.

Expected Behavior

The tool should:

  1. Execute the bash script to install required packages
  2. Run the Python code to create and display the stock price plot
  3. Create only necessary files related to the plot or temporary data

Actual Behavior

The tool:

  1. Executes the bash script for package installation
  2. Creates over 1000 files in the process. Full disclosure, I increased the max file limit to 2048, else, it results in an error.
  3. Stops execution after the bash script, failing to run the Python code
  4. Does not produce the expected stock price plot.

image
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions