mirror of https://github.com/alibaba/MNN.git
Merge remote-tracking branch 'remotes/origin/master'
This commit is contained in:
commit
0b79a26ddb
|
@ -55,6 +55,7 @@ void Prompt::setParams(std::shared_ptr<LlmConfig> config) {
|
||||||
#ifdef LLM_USE_MINJA
|
#ifdef LLM_USE_MINJA
|
||||||
if (config->config_.document.HasMember("jinja")) {
|
if (config->config_.document.HasMember("jinja")) {
|
||||||
auto& document = config->config_.document["jinja"];
|
auto& document = config->config_.document["jinja"];
|
||||||
|
if (document.HasMember("chat_template")) {
|
||||||
if (nullptr == mCommonTemplate.get()) {
|
if (nullptr == mCommonTemplate.get()) {
|
||||||
// Only create jinja once
|
// Only create jinja once
|
||||||
std::string bosToken, eosToken;
|
std::string bosToken, eosToken;
|
||||||
|
@ -72,6 +73,7 @@ void Prompt::setParams(std::shared_ptr<LlmConfig> config) {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
mCommonTemplate.reset();
|
mCommonTemplate.reset();
|
||||||
mSystemPrompt = config->system_prompt();
|
mSystemPrompt = config->system_prompt();
|
||||||
|
|
Loading…
Reference in New Issue