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 SummaryNested Classes
- 
Constructor SummaryConstructorsConstructorDescriptionChatGPTMessage default constructor.ChatGPTMessage(String content, ChatGPTMessage.Role role) Initiate ChatGPTMessage with the mandatory parameters.
- 
Method SummaryModifier and TypeMethodDescriptiongetRole()get the input role.booleanValidate the current message role is system.voidSets the role for the model message.voidsetRole(ChatGPTMessage.Role role) set the input role.voidSets the role for chatGPT instructions.voidSets the role for the user message.Methods inherited from class com.intellijava.core.model.input.ChatMessagegetContent, setContent
- 
Constructor Details- 
ChatGPTMessagepublic ChatGPTMessage()ChatGPTMessage default constructor.
- 
ChatGPTMessageInitiate ChatGPTMessage with the mandatory parameters.- Parameters:
- content- text input
- role- system or user or assistant to define who sent the message.
 
 
- 
- 
Method Details- 
getRoleget the input role. system : represents the instruction message. user : represents the end user message. assistant : represents the model message.- Returns:
- system | user | assistant
 
- 
setRoleset the input role. system : represents the instruction message. user : represents the end user message. assistant : represents the model message.- Parameters:
- role- system | user | assistant
 
- 
setSystemRolpublic void setSystemRol()Sets the role for chatGPT instructions.
- 
isSystemRolpublic boolean isSystemRol()Validate the current message role is system.- Returns:
- true if system role.
 
- 
setUserRolpublic void setUserRol()Sets the role for the user message.
- 
setAssistantRolpublic void setAssistantRol()Sets the role for the model message.
 
-