feat: Multi-model support with proxyllm and add more command-cli

This commit is contained in:
FangYin Cheng
2023-09-05 11:26:24 +08:00
parent b8f09df45e
commit b6a4fd8a62
27 changed files with 668 additions and 130 deletions

View File

@@ -161,3 +161,15 @@ def get_or_create_event_loop() -> asyncio.BaseEventLoop:
raise e
logging.warning("Cant not get running event loop, create new event loop now")
return asyncio.get_event_loop_policy().get_event_loop()
def logging_str_to_uvicorn_level(log_level_str):
level_str_mapping = {
"CRITICAL": "critical",
"ERROR": "error",
"WARNING": "warning",
"INFO": "info",
"DEBUG": "debug",
"NOTSET": "info",
}
return level_str_mapping.get(log_level_str.upper(), "info")