ragflow/api/apps
Billy Bao a82e9b3d91
Fix: can't upload image in ollama model #10447 (#10717)
### What problem does this PR solve?

Fix: can't upload image in ollama model #10447

### Type of change

- [X] Bug Fix (non-breaking change which fixes an issue)


### Change all `image=[]` to `image = None`

Changing `image=[]` to `images=None` avoids Python’s mutable default
parameter issue.
If you keep `images=[]`, all calls share the same list, so modifying it
(e.g., images.append()) will affect later calls.
Using images=None and creating a new list inside the function ensures
each call is independent.
This change does not affect current behavior — it simply makes the code
safer and more predictable.


把 `images=[]` 改成 `images=None` 是为了避免 Python 默认参数的可变对象问题。
如果保留 `images=[]`,所有调用都会共用同一个列表,一旦修改就会影响后续调用。
改成 None 并在函数内部重新创建列表,可以确保每次调用都是独立的。
这个修改不会影响现有运行结果,只是让代码更安全、更可控。
2025-10-22 12:24:12 +08:00
..
auth Fix: use jwks_uri from OIDC metadata for JWKS client (#8136) 2025-06-10 10:16:58 +08:00
sdk Feat: Support attribute filtering #8703 (#10670) 2025-10-21 10:38:40 +08:00
__init__.py Refactor: move some functions out of api/utils/__init__.py (#10216) 2025-09-25 18:04:49 +08:00
api_app.py Fix typos: retrievaler -> retriever (#10372) 2025-10-10 09:17:36 +08:00
canvas_app.py Fix: agent templates... (#10564) 2025-10-15 10:31:30 +08:00
chunk_app.py Fix: retrieval test (#10662) 2025-10-20 11:37:18 +08:00
conversation_app.py fix: replace traceback.print_exc() with logging.exception(e) in conve… (#10275) 2025-09-25 11:45:44 +08:00
dialog_app.py Fix typo (#9766) 2025-08-27 18:56:40 +08:00
document_app.py Feat: Make knowledge base renaming automatically reflected in agent discussions, solved #10597 (#10680) 2025-10-21 10:42:05 +08:00
file2document_app.py Feat: add advanced document filter (#8723) 2025-07-09 09:33:11 +08:00
file_app.py Improve file management (#10577) 2025-10-16 09:38:25 +08:00
kb_app.py Refa: improve flow of GraphRAG and RAPTOR (#10709) 2025-10-22 09:29:20 +08:00
langfuse_app.py Feat: add project_id and project_name to Langfuse API (#6481) 2025-03-25 10:36:34 +08:00
llm_app.py Feat: Support Specifying OpenRouter Model Provider (#10550) 2025-10-16 09:39:59 +08:00
mcp_server_app.py Fix typo (#9766) 2025-08-27 18:56:40 +08:00
plugin_app.py Fix typos: retrievaler -> retriever (#10372) 2025-10-10 09:17:36 +08:00
search_app.py Fix typo (#9766) 2025-08-27 18:56:40 +08:00
system_app.py Fix typos: retrievaler -> retriever (#10372) 2025-10-10 09:17:36 +08:00
tenant_app.py Fix typos: retrievaler -> retriever (#10372) 2025-10-10 09:17:36 +08:00
user_app.py Fix: can't upload image in ollama model #10447 (#10717) 2025-10-22 12:24:12 +08:00