mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
Tools broken if a helper function takes a dict #1948
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @robert-mcdermott on GitHub (Aug 30, 2024).
Bug Report
Installation Method
Git clone, docker build
Environment
Open WebUI Version:: v0.3.16
Ollama Version: v0.3.8
Operating System:: Docker/Ubuntu 22.04]
Browser: Latest Chrome
Confirmation:
Expected Behavior:
The tool classes should allow helper functions (only called by tool functions, not the LLM) that take a dict as a parameter.
Actual Behavior:
Tool classes that have helper functions that take a dict as a parameter raise and error resulting in the tools in that class not working.
Description
I have a tool class that was working in v0.3.12 of Open WebUI that has been broken since v0.3.15 I believe. In addition to functions that the LLM can call, I have some helper functions that are only used inside of the tool functions. Some of those helper functions take a dict as a parameter, which in the current version of Open WebUI results in the error shown below.
Bug Summary:
Tool class functions that take dict parameters break tool usage if if they aren't used.
Reproduction Details
Steps to Reproduce:
Create a tool class with a helper function (not to be called by the LLM) that takes a dict paramer:
Logs and Screenshots
Docker Container Logs: