diff --git a/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py b/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py index c4baeaa6..b70c35b5 100644 --- a/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py +++ b/astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py @@ -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'}", }, )