fix: increase max_tokens and handle unclosed think blocks for style generation
This commit is contained in:
+2
-2
@@ -210,7 +210,7 @@ async function callProvider(messages, opts = {}, signal) {
|
||||
}
|
||||
|
||||
// Strip <think> blocks generated by reasoning models (like MiniMax-M3 or DeepSeek-R1)
|
||||
content = content.replace(/<think>[\s\S]*?<\/think>\s*/gi, '').trim();
|
||||
content = content.replace(/<think>[\s\S]*?(?:<\/think>\s*|$)/gi, '').trim();
|
||||
|
||||
return content;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ async function handleStyleRandom(req, res) {
|
||||
{ role: 'system', content: buildStylePrompt(mode, idea) },
|
||||
{ role: 'user', content: userMsg },
|
||||
],
|
||||
{ max_tokens: 120 },
|
||||
{ max_tokens: 800 },
|
||||
signal,
|
||||
);
|
||||
const style = cleanStyleString(content);
|
||||
|
||||
Reference in New Issue
Block a user