forked from github/copilot-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSectionOverrideAction.java
More file actions
55 lines (44 loc) · 1.51 KB
/
SectionOverrideAction.java
File metadata and controls
55 lines (44 loc) · 1.51 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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.json;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Specifies the operation to perform on a system prompt section in
* {@link SystemMessageMode#CUSTOMIZE} mode.
*
* @see SectionOverride
* @see SystemMessageConfig
* @since 1.2.0
*/
public enum SectionOverrideAction {
/** Replace the section content entirely. */
REPLACE("replace"),
/** Remove the section from the prompt. */
REMOVE("remove"),
/** Append content after the existing section. */
APPEND("append"),
/** Prepend content before the existing section. */
PREPEND("prepend"),
/**
* Transform the section content via a callback.
* <p>
* When this action is used, the {@link SectionOverride#getTransform()} callback
* must be set. The SDK will not serialize this action over the wire directly;
* instead it registers a {@code systemMessage.transform} RPC handler.
*/
TRANSFORM("transform");
private final String value;
SectionOverrideAction(String value) {
this.value = value;
}
/**
* Returns the JSON value for this action.
*
* @return the string value used in JSON serialization
*/
@JsonValue
public String getValue() {
return value;
}
}