Don't add sys instruction if empty

This commit is contained in:
Cohee
2025-04-23 20:04:00 +03:00
parent 5509b088e2
commit cf44ac8c1f

View File

@@ -433,7 +433,7 @@ async function sendMakerSuiteRequest(request, response) {
generationConfig: generationConfig,
};
if (useSystemPrompt) {
if (useSystemPrompt && Array.isArray(prompt.system_instruction) && prompt.system_instruction.length) {
body.systemInstruction = prompt.system_instruction;
}