Show tool call parameters along tool ouput

This commit is contained in:
Diwakar Singh Maurya 2025-05-20 18:58:13 +00:00
parent 30d15c1b4b
commit 549237fb05
2 changed files with 7 additions and 1 deletions

View File

@ -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:

View File

@ -117,6 +117,12 @@
{/if}
</div>
</Tooltip>
{#if document.metadata?.parameters}
<div class="text-sm font-medium dark:text-gray-300 mt-2">
{$i18n.t('Parameters')}
</div>
<pre class="text-sm dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded-md overflow-auto max-h-40">{JSON.stringify(document.metadata.parameters, null, 2)}</pre>
{/if}
{#if showRelevance}
<div class="text-sm font-medium dark:text-gray-300 mt-2">
{$i18n.t('Relevance')}