Skip to content

Commit 7fe324a

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

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
@@ -252,6 +252,8 @@ def get_citation_source_from_tool_result(
252252
if tool_name == 'search_web':
253253
# Parse JSON array: [{"title": "...", "link": "...", "snippet": "..."}]
254254
results = tool_result
255+
if not isinstance(results, list):
256+
return []
255257
documents = []
256258
metadata = []
257259

0 commit comments

Comments
 (0)