上传丢失的文件
parent
68d1647d5d
commit
7a2948fbca
@ -0,0 +1,17 @@
|
||||
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
|
Loading…
Reference in New Issue