Package com.intellijava.core.model.input
Class ChatGPTMessage
java.lang.Object
com.intellijava.core.model.input.ChatMessage
com.intellijava.core.model.input.ChatGPTMessage
ChatGPTMessage represent a message element for the chat.
- Author:
- github.com/Barqawiz
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionChatGPTMessage default constructor.ChatGPTMessage
(String content, ChatGPTMessage.Role role) Initiate ChatGPTMessage with the mandatory parameters. -
Method Summary
Modifier and TypeMethodDescriptiongetRole()
get the input role.boolean
Validate the current message role is system.void
Sets the role for the model message.void
setRole
(ChatGPTMessage.Role role) set the input role.void
Sets the role for chatGPT instructions.void
Sets the role for the user message.Methods inherited from class com.intellijava.core.model.input.ChatMessage
getContent, setContent
-
Constructor Details
-
ChatGPTMessage
public ChatGPTMessage()ChatGPTMessage default constructor. -
ChatGPTMessage
Initiate ChatGPTMessage with the mandatory parameters.- Parameters:
content
- text inputrole
- system or user or assistant to define who sent the message.
-
-
Method Details
-
getRole
get the input role. system : represents the instruction message. user : represents the end user message. assistant : represents the model message.- Returns:
- system | user | assistant
-
setRole
set the input role. system : represents the instruction message. user : represents the end user message. assistant : represents the model message.- Parameters:
role
- system | user | assistant
-
setSystemRol
public void setSystemRol()Sets the role for chatGPT instructions. -
isSystemRol
public boolean isSystemRol()Validate the current message role is system.- Returns:
- true if system role.
-
setUserRol
public void setUserRol()Sets the role for the user message. -
setAssistantRol
public void setAssistantRol()Sets the role for the model message.
-