Ensure LIGHTEN work (#3542)

### What problem does this PR solve?
#3531

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2024-11-21 09:56:28 +08:00 committed by GitHub
parent 8930bfcff8
commit d9c882399d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,7 +61,10 @@ kg_retrievaler = None
def init_settings():
global LLM, LLM_FACTORY, LLM_BASE_URL
global LLM, LLM_FACTORY, LLM_BASE_URL, LIGHTEN, DATABASE_TYPE, DATABASE
LIGHTEN = int(os.environ.get('LIGHTEN', "0"))
DATABASE_TYPE = os.getenv("DB_TYPE", 'mysql')
DATABASE = decrypt_database_config(name=DATABASE_TYPE)
LLM = get_base_config("user_default_llm", {})
LLM_FACTORY = LLM.get("factory", "Tongyi-Qianwen")
LLM_BASE_URL = LLM.get("base_url")