import config def get_prompt(name: str, type: str, params: dict = {}): sys_params = { "bot_name": config.CHATCOMPLETE_BOT_NAME } if name in config.PROMPTS and type in config.PROMPTS[name]: prompt = config.PROMPTS[name][type] for key in sys_params: prompt = prompt.replace("{" + key + "}", sys_params[key]) for key in params: prompt = prompt.replace("{" + key + "}", params[key]) return prompt else: return None