EtiennePerot / safe-code-execution

Code execution utilities for Open WebUI & Ollama
Apache License 2.0
194 stars 12 forks source link

Add ability to view code executed by tool #8

Closed lu4p closed 2 weeks ago

lu4p commented 2 months ago

In order to trust/ verify the output it's often useful to see what code has been executed.

How this works in ChatGPT:

Screenshot from 2024-09-10 23-08-47 Screenshot from 2024-09-10 23-09-06

EtiennePerot commented 2 months ago

This is a good idea. Need Open WebUI support for this though. Currently tools cannot emit messages that would show up in this manner. I'm not very familiar with the way Open WebUI's UI framework works, but I think the right thing to place to start is to modify this file and expand the MessageType interface therein in order to be able to attach this information, then change the rendering code below to display it.

lu4p commented 2 months ago

As a MVP this could also just be a link to a text file, but yes optimally this would have upstream support.

EntropyYue commented 1 month ago

This is a good idea. Need Open WebUI support for this though. Currently tools cannot emit messages that would show up in this manner. I'm not very familiar with the way Open WebUI's UI framework works, but I think the right thing to place to start is to modify this file and expand the MessageType interface therein in order to be able to attach this information, then change the rendering code below to display it.

I think that it's a good idea to display the code in the citation

EntropyYue commented 1 month ago

I proposed a PR that displays the executed code in a citation #23

EtiennePerot commented 1 month ago

I have sent https://github.com/open-webui/open-webui/pull/5955 as an upstream PR to Open WebUI to add UI elements specifically for displaying code execution status.

EtiennePerot commented 2 weeks ago

This is implemented as of 0f297978a1855b827d96ba8fe295d7b006b44877.