ragflow/api/utils
Wanderson Pinto dos Santos 3654ae61c1
feat: add allowed factories variable to allow admins to restrict llms users can add (#11003)
### What problem does this PR solve?

Currently, if we want to restrict the allowed factories users can use we
need to delete from the database table manually. The proposal of this PR
is to include a variable to that, if set, will restrict the LLM
factories the users can see and add. This allow us to not touch the
llm_factories.json or the database if the LLM factory is already
inserted.

Obs.: All the lint changes were from the pre-commit hook which I did not
change.

### Type of change

- [X] New Feature (non-breaking change which adds functionality)
2025-11-05 10:47:50 +08:00
..
__init__.py Remove 'get_lan_ip' and add common misc_utils.py (#10880) 2025-10-31 16:42:01 +08:00
api_utils.py feat: add allowed factories variable to allow admins to restrict llms users can add (#11003) 2025-11-05 10:47:50 +08:00
base64_image.py Move base64_image related functions to common directory (#10957) 2025-11-03 15:20:46 +08:00
commands.py Format file format from Windows/dos to Unix (#1949) 2024-08-15 09:17:36 +08:00
common.py Move some functions out of 'api/utils/common.py' (#10948) 2025-11-03 12:34:47 +08:00
configs.py Introduce common/config_utils.py (#10968) 2025-11-03 17:25:06 +08:00
crypt.py Move 'get_project_base_directory' to common directory (#10940) 2025-11-02 21:05:28 +08:00
email_templates.py Feat: add forgot password reset, solve #8547 (#10586) 2025-10-16 15:07:49 +08:00
file_utils.py Move some funcs from api to rag module (#10972) 2025-11-03 19:26:09 +08:00
health_utils.py Refactor admin client for message prompts (#10583) 2025-10-15 16:22:07 +08:00
json_encode.py Feat: rename file to avoid package name conflict (#10863) 2025-10-29 12:19:57 +08:00
log_utils.py Refactor log utils (#10973) 2025-11-03 20:25:02 +08:00
validation_utils.py Refa: validation utils to use Pydantic v2 style models (#9037) 2025-07-25 12:16:45 +08:00
web_utils.py Feat: add forgot password reset, solve #8547 (#10586) 2025-10-16 15:07:49 +08:00