fix: csv injection in annotations export
[!IMPORTANT]
- Make sure you have read our contribution guidelines
- Ensure there is an associated issue and you have been assigned to it
- Use the correct syntax to link this PR:
Fixes #<issue number>.
Summary
Screenshots
| Before | After |
|---|---|
| ... | ... |
Checklist
- [ ] This change requires a documentation update, included: Dify Document
- [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
- [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
- [x] I've updated the documentation accordingly.
- [x] I ran
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods
This is a known bug in RAGFlow v0.22.1: the code calls the OpenAI client's completions.create() method with an unsupported argument unused=None, which causes the error when adding Qwen or other vision models via vLLM. The fix is to remove the unused argument from the call in rag/llm/cv_model.py—this has already been corrected in the latest code, but for v0.22.1 you'll need to do it manually.
If you're running RAGFlow in Docker, you can fix it without rebuilding the container:
- Enter the running container:
docker exec -it docker-ragflow-cpu-1 /bin/bash - Edit
rag/llm/cv_model.py(line 204), removeunused=Nonefrom the relevant function call. - Save the file and exit.
- Restart the container:
docker restart docker-ragflow-cpu-1
This will resolve the error. For more details and confirmation from maintainers, see this issue and fix instructions. Make sure only supported parameters are passed to the LLM client to avoid similar issues in the future.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
pull the latest code.
The problem I encountered when parsing the file is also like this.
@ouyong-1 pull the latest code.