mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-30 00:45:12 -05:00
refac
This commit is contained in:
1 parent
f8a5186480
commit
43d7281f4e
5 files changed
+32
No files matched your search
@@ -947,6 +947,10 @@ async def process_tool_result(
|
||||
else:
|
||||
tool_result = str(tool_result)
|
||||
|
||||
max_chars = await Config.get('tools.output_max_chars')
|
||||
if max_chars and tool_result and len(tool_result) > max_chars:
|
||||
tool_result = f'{tool_result[:max_chars]}\n\n[Truncated: {len(tool_result)} characters, limit {max_chars}]'
|
||||
|
||||
return tool_result, tool_result_files, tool_result_embeds
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user