Skip to content

Commit 4ff2f1f

Browse files
devholic22tzolov
authored andcommitted
Add comment in MessageType for readability
- Add comment in MessageType for readability
1 parent a749b1b commit 4ff2f1f

File tree

1 file changed

+22
-1
lines changed
  • spring-ai-core/src/main/java/org/springframework/ai/chat/messages

1 file changed

+22
-1
lines changed

spring-ai-core/src/main/java/org/springframework/ai/chat/messages/MessageType.java

+22-1
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,38 @@
1616
package org.springframework.ai.chat.messages;
1717

1818
/**
19-
* The MessageType enum represents the type of a message in a chat application. It can be
19+
* The MessageType enum represents the type of message in a chat application. It can be
2020
* one of the following: USER, ASSISTANT, SYSTEM, FUNCTION.
2121
*/
2222
public enum MessageType {
2323

24+
/**
25+
* A message of the type 'user' passed as input Messages with the user role are from
26+
* the end-user or developer.
27+
* @see UserMessage
28+
*/
2429
USER("user"),
2530

31+
/**
32+
* A message of the type 'assistant' passed as input Messages with the message is
33+
* generated as a response to the user.
34+
* @see AssistantMessage
35+
*/
2636
ASSISTANT("assistant"),
2737

38+
/**
39+
* A message of the type 'system' passed as input Messages with high level
40+
* instructions for the conversation, such as behave like a certain character or
41+
* provide answers in a specific format.
42+
* @see SystemMessage
43+
*/
2844
SYSTEM("system"),
2945

46+
/**
47+
* A message of the type 'function' passed as input Messages with a function content
48+
* in a chat application.
49+
* @see FunctionMessage
50+
*/
3051
FUNCTION("function");
3152

3253
private final String value;

0 commit comments

Comments
 (0)