forked from github/copilot-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSendMessageRequest.java
More file actions
78 lines (62 loc) · 2.31 KB
/
SendMessageRequest.java
File metadata and controls
78 lines (62 loc) · 2.31 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
67
68
69
70
71
72
73
74
75
76
77
78
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.json;
import java.util.Collections;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Internal request object for sending a message to a session.
* <p>
* This is a low-level class for JSON-RPC communication. For sending messages,
* use {@link com.github.copilot.sdk.CopilotSession#send(String)} or
* {@link com.github.copilot.sdk.CopilotSession#sendAndWait(String)}.
*
* @see com.github.copilot.sdk.CopilotSession
* @see MessageOptions
* @since 1.0.0
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public final class SendMessageRequest {
@JsonProperty("sessionId")
private String sessionId;
@JsonProperty("prompt")
private String prompt;
@JsonProperty("attachments")
private List<MessageAttachment> attachments;
@JsonProperty("mode")
private String mode;
/** Gets the session ID. @return the session ID */
public String getSessionId() {
return sessionId;
}
/** Sets the session ID. @param sessionId the session ID */
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
/** Gets the message prompt. @return the prompt text */
public String getPrompt() {
return prompt;
}
/** Sets the message prompt. @param prompt the prompt text */
public void setPrompt(String prompt) {
this.prompt = prompt;
}
/** Gets the attachments. @return the list of attachments */
public List<MessageAttachment> getAttachments() {
return attachments == null ? null : Collections.unmodifiableList(attachments);
}
/** Sets the attachments. @param attachments the list of attachments */
public void setAttachments(List<MessageAttachment> attachments) {
this.attachments = attachments;
}
/** Gets the mode. @return the message mode */
public String getMode() {
return mode;
}
/** Sets the mode. @param mode the message mode */
public void setMode(String mode) {
this.mode = mode;
}
}