Added FIX for azure content filtering problem

This commit is contained in:
Sivasankar Mathiyazhagan 2025-02-17 00:19:36 +05:30
parent af175c6fd9
commit 90a081009d
3 changed files with 3 additions and 3 deletions

View file

@ -175,7 +175,7 @@ describe.skip("Chat Templates", () => {
];
const prompt = deepseekTemplateMessages(messages);
const expectedPrompt =
"You are an AI programming assistant, utilizing the DeepSeek Coder model, developed by DeepSeek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer.\n### Instruction:\nWhat is polymorphism in OOP?\n### Response:\nExplanation of polymorphism.<|EOT|>\n";
"You are an AI programming assistant, utilizing the DeepSeek Coder model, developed by DeepSeek Company, and your role is to assist with questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will not answer.\n### Instruction:\nWhat is polymorphism in OOP?\n### Response:\nExplanation of polymorphism.<|EOT|>\n";
expect(prompt).toBe(expectedPrompt);
});
});

View file

@ -156,7 +156,7 @@ function deepseekTemplateMessages(msgs: ChatMessage[]): string {
let prompt = "";
let system: string | null = null;
prompt +=
"You are an AI programming assistant, utilizing the DeepSeek Coder model, developed by DeepSeek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer.\n";
"You are an AI programming assistant, utilizing the DeepSeek Coder model, developed by DeepSeek Company, and your role is to assist with questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will not answer.\n";
if (msgs[0].role === "system") {
system = renderChatMessage(msgs.shift()!);
}

View file

@ -129,7 +129,7 @@ Sure! Here's the code you requested:
`;
const deepseekEditPrompt = `### System Prompt
You are an AI programming assistant, utilizing the DeepSeek Coder model, developed by DeepSeek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer.
You are an AI programming assistant, utilizing the DeepSeek Coder model, developed by DeepSeek Company, and your role is to assist with questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will not answer.
### Instruction:
Rewrite the code to satisfy this request: "{{{userInput}}}"