Set Log level by env (#3798)

### What problem does this PR solve?

Set Log level by env

### Type of change

- [x] Refactoring
This commit is contained in:
Zhichang Yu
2024-12-02 17:24:39 +08:00
committed by GitHub
parent c4b6df350a
commit c5f13629af
7 changed files with 82 additions and 62 deletions

View File

@ -179,7 +179,7 @@ class TenantLLMService(CommonService):
.where(cls.model.tenant_id == tenant_id, cls.model.llm_factory == tenant_llm.llm_factory, cls.model.llm_name == llm_name)\
.execute()
else:
llm_factory = llm_name.split("/")[0] if "/" in llm_name else llm_name
llm_factory = mdlnm.split("@")[1] if "@" in mdlnm else mdlnm
num = cls.model.create(tenant_id=tenant_id, llm_factory=llm_factory, llm_name=llm_name, used_tokens=used_tokens)
except Exception:
logging.exception("TenantLLMService.increase_usage got exception")