This commit is contained in:
dvickers79 2026-07-18 09:25:06 -05:00 committed by GitHub
commit c1528decb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -369,8 +369,8 @@ def _build_kb_mcp_server(
user_dict: Optional[Dict[str, Any]] = None,
event_emitter: Optional[Callable] = None,
):
"""Return (mcp_config, tool_names) for a knowledge-base search tool Claude
can invoke, or (None, []) if no KBs are attached.
"""Return (mcp_config, tool_names, tools_by_name) for a knowledge-base
search tool Claude can invoke, or (None, [], {}) if no KBs are attached.
Result formatting follows OpenWebUI's native RAG shape (<source id=N ...>
tags + citation event), so Claude's replies render with inline [N]
@ -379,7 +379,7 @@ def _build_kb_mcp_server(
that OpenWebUI's middleware already filtered by the user's grants.
"""
if not knowledge:
return None, []
return None, [], {}
collection_names = [k["id"] for k in knowledge]
display = ", ".join(k["name"] for k in knowledge)