ragflow/api/db/services
utopia2077 2d4a60cae6
Fix: Reduce excessive IO operations by loading LLM factory configurations (#6047)
…ions

### What problem does this PR solve?

This PR fixes an issue where the application was repeatedly reading the
llm_factories.json file from disk in multiple places, which could lead
to "Too many open files" errors under high load conditions. The fix
centralizes the file reading operation in the settings.py module and
stores the data in a global variable that can be accessed by other
modules.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [ ] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [x] Performance Improvement
- [ ] Other (please describe):
2025-03-14 09:54:38 +08:00
..
__init__.py Fix errors detected by Ruff (#3918) 2024-12-08 14:21:12 +08:00
api_service.py Feat(api): Add dsl parameters to control whether dsl fields are included (#5769) 2025-03-07 16:58:00 +08:00
canvas_service.py For an Agent with an Input Begin value, on the first call the return … (#5957) 2025-03-12 17:01:44 +08:00
common_service.py Improve API Documentation, Standardize Error Handling, and Enhance Comments (#5990) 2025-03-13 19:06:50 +08:00
conversation_service.py Fix issue of ask API. (#5400) 2025-02-26 19:45:22 +08:00
dialog_service.py Feat: apply LLM to optimize citations. (#5935) 2025-03-11 19:56:21 +08:00
document_service.py Fix: too long context during KG issue. (#5723) 2025-03-06 19:21:07 +08:00
file2document_service.py Tagging (#4426) 2025-01-09 17:07:21 +08:00
file_service.py Improve API Documentation, Standardize Error Handling, and Enhance Comments (#5990) 2025-03-13 19:06:50 +08:00
knowledgebase_service.py Improve API Documentation, Standardize Error Handling, and Enhance Comments (#5990) 2025-03-13 19:06:50 +08:00
llm_service.py Fix: Reduce excessive IO operations by loading LLM factory configurations (#6047) 2025-03-14 09:54:38 +08:00
task_service.py Improve API Documentation, Standardize Error Handling, and Enhance Comments (#5990) 2025-03-13 19:06:50 +08:00
user_service.py Improve API Documentation, Standardize Error Handling, and Enhance Comments (#5990) 2025-03-13 19:06:50 +08:00