From 4ff2f1fc06b1ef4ca61a84b4d53580d1fac342dc Mon Sep 17 00:00:00 2001 From: devholic22 Date: Wed, 3 Jul 2024 10:26:52 +0900 Subject: [PATCH] Add comment in MessageType for readability - Add comment in MessageType for readability --- .../ai/chat/messages/MessageType.java | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/spring-ai-core/src/main/java/org/springframework/ai/chat/messages/MessageType.java b/spring-ai-core/src/main/java/org/springframework/ai/chat/messages/MessageType.java index 632b66dc8..c1c88dd43 100644 --- a/spring-ai-core/src/main/java/org/springframework/ai/chat/messages/MessageType.java +++ b/spring-ai-core/src/main/java/org/springframework/ai/chat/messages/MessageType.java @@ -16,17 +16,38 @@ package org.springframework.ai.chat.messages; /** - * The MessageType enum represents the type of a message in a chat application. It can be + * The MessageType enum represents the type of message in a chat application. It can be * one of the following: USER, ASSISTANT, SYSTEM, FUNCTION. */ public enum MessageType { + /** + * A message of the type 'user' passed as input Messages with the user role are from + * the end-user or developer. + * @see UserMessage + */ USER("user"), + /** + * A message of the type 'assistant' passed as input Messages with the message is + * generated as a response to the user. + * @see AssistantMessage + */ ASSISTANT("assistant"), + /** + * A message of the type 'system' passed as input Messages with high level + * instructions for the conversation, such as behave like a certain character or + * provide answers in a specific format. + * @see SystemMessage + */ SYSTEM("system"), + /** + * A message of the type 'function' passed as input Messages with a function content + * in a chat application. + * @see FunctionMessage + */ FUNCTION("function"); private final String value;