diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index f0ff460c9..16ce553e6 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -252,7 +252,7 @@ async def chat_completion_tools_handler( "name": (f"TOOL:{tool_name}"), }, "document": [tool_result], - "metadata": [{"source": (f"TOOL:{tool_name}")}], + "metadata": [{"source": (f"TOOL:{tool_name}"), "parameters": tool_function_params}], } ) else: diff --git a/src/lib/components/chat/Messages/CitationsModal.svelte b/src/lib/components/chat/Messages/CitationsModal.svelte index 35a5594f1..ed1fb95cd 100644 --- a/src/lib/components/chat/Messages/CitationsModal.svelte +++ b/src/lib/components/chat/Messages/CitationsModal.svelte @@ -117,6 +117,12 @@ {/if} + {#if document.metadata?.parameters} +
+ {$i18n.t('Parameters')} +
+
{JSON.stringify(document.metadata.parameters, null, 2)}
+ {/if} {#if showRelevance}
{$i18n.t('Relevance')}