给ollama增加system message

This commit is contained in:
mcz
2024-09-30 16:41:58 +08:00
parent 37facdc3c1
commit 71f90b36ca
3 changed files with 34 additions and 4 deletions

View File

@@ -320,7 +320,7 @@ const genClaude = ({
return [url, init];
};
const genOllama = ({ text, from, to, url, key, prompt, model }) => {
const genOllama = ({ text, from, to, url, key, system,prompt, model }) => {
prompt = prompt
.replaceAll(INPUT_PLACE_FROM, from)
.replaceAll(INPUT_PLACE_TO, to)
@@ -328,6 +328,7 @@ const genOllama = ({ text, from, to, url, key, prompt, model }) => {
const data = {
model,
system,
prompt,
stream: false,
};