fix: update file name handling in InternalAgentSubStage to correctly associate file names with extracted content

This commit is contained in:
Soulter
2025-12-01 17:40:30 +08:00
parent 380c4faf17
commit d3001d8148
@@ -156,11 +156,11 @@ class InternalAgentSubStage(Stage):
return
# add file extract results to contexts
for file_content in file_contents:
for file_content, file_name in zip(file_contents, file_names):
req.contexts.append(
{
"role": "system",
"content": f"File Extract Results of user uploaded files:\n{file_content}\nFile Name: {file_names or 'Unknown'}",
"content": f"File Extract Results of user uploaded files:\n{file_content}\nFile Name: {file_name or 'Unknown'}",
},
)