Class GPTChatMessage
- java.lang.Object
-
- com.composum.ai.backend.base.service.chat.GPTChatMessage
-
public class GPTChatMessage extends Object
A chat message in a dialog with ChatGPT. Currently limited to at most a text message and an image.- See Also:
- "https://platform.openai.com/docs/guides/chat"
-
-
Constructor Summary
Constructors Constructor Description GPTChatMessage(GPTMessageRole role, String content)
GPTChatMessage(GPTMessageRole role, String content, String imageUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getContent()
The content of the message, be that an answer of the assistant or a question of the user.String
getImageUrl()
The URL with the content of the image to be analyzed.GPTMessageRole
getRole()
Function of the message in the dialog.int
hashCode()
String
toString()
String representation only for debugging.
-
-
-
Constructor Detail
-
GPTChatMessage
public GPTChatMessage(@Nonnull GPTMessageRole role, @Nonnull String content)
-
-
Method Detail
-
getRole
public GPTMessageRole getRole()
Function of the message in the dialog.
-
getContent
public String getContent()
The content of the message, be that an answer of the assistant or a question of the user.
-
getImageUrl
public String getImageUrl()
The URL with the content of the image to be analyzed.
-
toString
public String toString()
String representation only for debugging.
-
-