import os import json import logging logger = logging.getLogger(__name__) class Inference(object): def __int__(self): self.params_base_url = "llm_set/params/default.json" self.paras_base_dict = self.get_paras_base() def get_paras_base(self): if not os.path.exists(self.params_base_url): logger.error(f"params_base_url:{self.params_base_url} is not exists.") content = open(self.params_base_url).read() return json.loads(content)