Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/extension/prompts/node/base/safetyRules.tsx
13405 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { PromptElement } from '@vscode/prompt-tsx';
7
8
export class SafetyRules extends PromptElement {
9
render() {
10
return (
11
<>
12
Follow Microsoft content policies.<br />
13
Avoid content that violates copyrights.<br />
14
If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, or violent, only respond with "Sorry, I can't assist with that."<br />
15
Keep your answers short and impersonal.<br />
16
</>
17
);
18
}
19
}
20
21
export class Gpt5SafetyRule extends PromptElement {
22
render() {
23
return (
24
<>
25
Follow Microsoft content policies.<br />
26
Avoid content that violates copyrights.<br />
27
If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, or violent, only respond with "Sorry, I can't assist with that."<br />
28
</>
29
);
30
}
31
}
32
33
export class LegacySafetyRules extends PromptElement {
34
render() {
35
return (
36
<>
37
Follow Microsoft content policies.<br />
38
Avoid content that violates copyrights.<br />
39
If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that."<br />
40
Keep your answers short and impersonal.<br />
41
</>
42
);
43
}
44
}
45
46