mirror of
https://github.com/sune-org/sune.git
synced 2026-10-14 22:37:54 +00:00
Support model name placeholder in system prompts
This commit is contained in:
+2
-1
@@ -9,7 +9,8 @@ export const buildBody=()=>{
|
||||
msgs.push({role:'system', content: mPrompt});
|
||||
}
|
||||
|
||||
const sPrompt = (SUNE.system_prompt || '').trim();
|
||||
const modelName=SUNE.model.replace(/^(or:|oai:|g:|cla:|cf:)/,'').replace(/^[^/]*\//,'').replace(/(?::online|:free)+$/,'');
|
||||
const sPrompt = (SUNE.system_prompt || '').trim().replaceAll('{{model_name}}',()=>modelName);
|
||||
if(sPrompt) {
|
||||
msgs.push({role:'system', content: sPrompt});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user