Merge pull request #4192 from SivasankarMathiyazhagan/deepseek-contentFilteringIssue

Added FIX for azure content filtering problem
This commit is contained in:
Tomasz Stefaniak 2025-02-17 09:16:39 -08:00 • committed by GitHub
commit e6c4f8bc84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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}}}"