jd-opensource / jd-opensource/OxyGent
json内容重复和文件找不到
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 278
- PR merge metrics
- No merged PRs in 30d
Description
**bug描述**
> 运行samples中的attachment_demo.py,会出现智能体传递的json内容中,出现重复内容,log如:
`
user >>> file_master_agent >>> file_react_agent : [{'part': {'content_type': 'path', 'data': './cache_dir\\uploads\\./cache_dir\\uploads\\20250923112403_demo.txt'}}, {'part': {'content_type': 'path', 'data': './cache_dir\\uploads\\20250923112403_demo.txt'}}, {'part': {'content_type': 'text/plain', 'data': '根据文档内容拟一个合适的标题'}}]
`
可以看到前端上传了一个文件,但是智能体传递过程中json有两个一样的文件。
**bug描述**
> 运行samples中的attachment_demo.py,会出现上传的文件找不到的问题,log如:
`
WARNING Attachment file not found: ./cache_dir\uploads\./cache_dir\uploads\20250923112403_demo.txt
`
导致后续问答失败。
Contributor guide
Research direction
Start by running samples/attachment_demo.py and compare the logged attachment JSON with the uploaded path. Trace where the path is assembled and passed between agents, using the warning as the failure point. Done means the uploaded file appears once in the JSON, its path is not duplicated, and the follow-up question succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100