Don't add sys instruction if empty

cf44ac8c1f2537df3cfb40a214b307c58455c6ab

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -1Showing whitespace changes
src/endpoints/backends/chat-completions.js+1 -1
@@ -433,7 +433,7 @@ async function sendMakerSuiteRequest(request, response) {
433 generationConfig: generationConfig,433 generationConfig: generationConfig,
434 };434 };
435435
436 if (useSystemPrompt) {436 if (useSystemPrompt && Array.isArray(prompt.system_instruction) && prompt.system_instruction.length) {
437 body.systemInstruction = prompt.system_instruction;437 body.systemInstruction = prompt.system_instruction;
438 }438 }
439439