Skip to content

Commit ad34a00

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

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
@@ -247,6 +247,8 @@ def get_citation_source_from_tool_result(
247247
if tool_name == 'search_web':
248248
# Parse JSON array: [{"title": "...", "link": "...", "snippet": "..."}]
249249
results = tool_result
250+
if not isinstance(results, list):
251+
return []
250252
documents = []
251253
metadata = []
252254

0 commit comments

Comments
 (0)