[GH-ISSUE #6012] Got errors when no tools match the query #133933

Closed
opened 2026-05-24 23:31:21 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @liuy on GitHub (Oct 8, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6012

Bug Report

Important: Before submitting a bug report, please check whether a similar issue or feature request has already been posted in the Issues or Discussions section. It's likely we're already tracking it. In case of uncertainty, initiate a discussion post first. This helps us all to efficiently focus on improving the project.

Let's collaborate respectfully. If you bring negativity, please understand our capacity to engage may be limited. If you're open to learning and communicating constructively, we're more than happy to assist you. Remember, Open WebUI is a volunteer-driven project maintained by a single maintainer, supported by our amazing contributors who also manage full-time jobs. We respect your time; please respect ours. If you have an issue, We highly encourage you to submit a pull request or to fork the project. We actively work to prevent contributor burnout to preserve the quality and continuity of Open WebUI.

Installation Method

[Describe the method you used to install the project, e.g., git clone, Docker, pip, etc.]

Environment

v0.3.2 with Llama3.1:70b and Qwen2.5:32b as LLM.

  • Open WebUI Version: [e.g., v0.3.11]

  • Ollama (if applicable): [e.g., v0.2.0, v0.1.32-rc1]

  • Operating System: [e.g., Windows 10, macOS Big Sur, Ubuntu 20.04]

  • Browser (if applicable): [e.g., Chrome 100.0, Firefox 98.0]

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

[Describe what you expected to happen.]
No error message in the log.

Actual Behavior:

[Describe what actually happened.]

Description

Bug Summary:
[Provide a brief but clear summary of the bug]

got error logs when no tools match the query when running with Qwen2.5:32b and Llama3.1:70b, which support function calling (that is, "tools“ in webui termology).

I have proprosed a fix #5943

Reproduction Details

Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]

Enable any tools then send a query. which should not be relevent to the tool enabled.
When no tools match the query, error happens.

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:
[Include relevant Docker container logs, if applicable]
following errors in the log when no tools match the query:

Qwen2.5:32b:
...
DEBUG [open_webui.main] content='""'
ERROR [open_webui.main] Error: 'str' object has no attribute 'get' Traceback (most recent call last):
File "/app/backend/open_webui/main.py", line 445, in chat_completion_tools_handler
tool_function_name = result.get("name", None)
^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get' ...

Llama3.1:70b:
...
DEBUG [open_webui.main] content='None'
ERROR [open_webui.main] Error: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last):
File "/app/backend/open_webui/main.py", line 443, in chat_completion_tools_handler
result = json.loads(content)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) ...
Screenshots/Screen Recordings (if applicable):
[Attach any relevant screenshots to help illustrate the issue]

Additional Information

[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @liuy on GitHub (Oct 8, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/6012 # Bug Report **Important: Before submitting a bug report, please check whether a similar issue or feature request has already been posted in the Issues or Discussions section. It's likely we're already tracking it. In case of uncertainty, initiate a discussion post first. This helps us all to efficiently focus on improving the project.** **Let's collaborate respectfully. If you bring negativity, please understand our capacity to engage may be limited. If you're open to learning and communicating constructively, we're more than happy to assist you. Remember, Open WebUI is a volunteer-driven project maintained by a single maintainer, supported by our amazing contributors who also manage full-time jobs. We respect your time; please respect ours. If you have an issue, We highly encourage you to submit a pull request or to fork the project. We actively work to prevent contributor burnout to preserve the quality and continuity of Open WebUI.** ## Installation Method [Describe the method you used to install the project, e.g., git clone, Docker, pip, etc.] ## Environment v0.3.2 with Llama3.1:70b and Qwen2.5:32b as LLM. - **Open WebUI Version:** [e.g., v0.3.11] - **Ollama (if applicable):** [e.g., v0.2.0, v0.1.32-rc1] - **Operating System:** [e.g., Windows 10, macOS Big Sur, Ubuntu 20.04] - **Browser (if applicable):** [e.g., Chrome 100.0, Firefox 98.0] **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: [Describe what you expected to happen.] No error message in the log. ## Actual Behavior: [Describe what actually happened.] ## Description **Bug Summary:** [Provide a brief but clear summary of the bug] got error logs when no tools match the query when running with Qwen2.5:32b and Llama3.1:70b, which support function calling (that is, "tools“ in webui termology). I have proprosed a fix #5943 ## Reproduction Details **Steps to Reproduce:** [Outline the steps to reproduce the bug. Be as detailed as possible.] Enable any tools then send a query. which should not be relevent to the tool enabled. When no tools match the query, error happens. ## Logs and Screenshots **Browser Console Logs:** [Include relevant browser console logs, if applicable] **Docker Container Logs:** [Include relevant Docker container logs, if applicable] following errors in the log when no tools match the query: Qwen2.5:32b: ... DEBUG [open_webui.main] content='""' ERROR [open_webui.main] Error: 'str' object has no attribute 'get' Traceback (most recent call last): File "/app/backend/open_webui/main.py", line 445, in chat_completion_tools_handler tool_function_name = result.get("name", None) ^^^^^^^^^^ AttributeError: 'str' object has no attribute 'get' ... Llama3.1:70b: ... DEBUG [open_webui.main] content='None' ERROR [open_webui.main] Error: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "/app/backend/open_webui/main.py", line 443, in chat_completion_tools_handler result = json.loads(content) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) ... **Screenshots/Screen Recordings (if applicable):** [Attach any relevant screenshots to help illustrate the issue] ## Additional Information [Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.] ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#133933