be-deepseek / src /backend /utils.py
chinpeerapat's picture
Upload 126 files
9ace1a5 verified
Raw History Blame Contribute Delete
383 Bytes
from backend.constants import ChatModel
def is_local_model(model: ChatModel) -> bool:
return model in [
ChatModel.LOCAL_LLAMA_3,
ChatModel.LOCAL_GEMMA,
ChatModel.LOCAL_MISTRAL,
ChatModel.LOCAL_PHI3_14B,
]
def strtobool(val: str | bool) -> bool:
if isinstance(val, bool):
return val
return val.lower() in ("true", "1", "t")