forked from github/copilot-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystemPromptSections.java
More file actions
66 lines (53 loc) · 2.46 KB
/
SystemPromptSections.java
File metadata and controls
66 lines (53 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.json;
/**
* Well-known system prompt section identifiers for use with
* {@link SystemMessageMode#CUSTOMIZE} mode.
* <p>
* Each constant names a section of the default Copilot system prompt. Pass
* these as keys in the {@code sections} map of {@link SystemMessageConfig} to
* override individual sections.
*
* <h2>Example</h2>
*
* <pre>{@code
* var config = new SystemMessageConfig().setMode(SystemMessageMode.CUSTOMIZE).setSections(Map.of(
* SystemPromptSections.TONE,
* new SectionOverride().setAction(SectionOverrideAction.REPLACE).setContent("Always be concise."),
* SystemPromptSections.CODE_CHANGE_RULES, new SectionOverride().setAction(SectionOverrideAction.REMOVE)));
* }</pre>
*
* @see SystemMessageConfig
* @see SectionOverride
* @since 1.2.0
*/
public final class SystemPromptSections {
/** Agent identity preamble and mode statement. */
public static final String IDENTITY = "identity";
/** Response style, conciseness rules, output formatting preferences. */
public static final String TONE = "tone";
/** Tool usage patterns, parallel calling, batching guidelines. */
public static final String TOOL_EFFICIENCY = "tool_efficiency";
/** CWD, OS, git root, directory listing, available tools. */
public static final String ENVIRONMENT_CONTEXT = "environment_context";
/** Coding rules, linting/testing, ecosystem tools, style. */
public static final String CODE_CHANGE_RULES = "code_change_rules";
/** Tips, behavioral best practices, behavioral guidelines. */
public static final String GUIDELINES = "guidelines";
/** Environment limitations, prohibited actions, security policies. */
public static final String SAFETY = "safety";
/** Per-tool usage instructions. */
public static final String TOOL_INSTRUCTIONS = "tool_instructions";
/** Repository and organization custom instructions. */
public static final String CUSTOM_INSTRUCTIONS = "custom_instructions";
/**
* End-of-prompt instructions: parallel tool calling, persistence, task
* completion.
*/
public static final String LAST_INSTRUCTIONS = "last_instructions";
private SystemPromptSections() {
// utility class
}
}