Skip to content

Commit 79d583e

Browse files
Algorithm5838github-actions[bot]
authored andcommitted
fix: skip search_web citations if tool result is not a list
1 parent be11a3f commit 79d583e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

backend/open_webui/utils/middleware.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ def get_citation_source_from_tool_result(
194194
if tool_name == "search_web":
195195
# Parse JSON array: [{"title": "...", "link": "...", "snippet": "..."}]
196196
results = tool_result
197+
if not isinstance(results, list):
198+
return []
197199
documents = []
198200
metadata = []
199201

0 commit comments

Comments
 (0)