Class ChatCompletionMessagePart
- java.lang.Object
 - 
- com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
 
- 
public class ChatCompletionMessagePart extends Object
Represents a part of a chat completion message, which may be a text or an image URL. This allows messages to include multiple types of content.{ "type": "text", "text": "What’s in this image?" } or { "type": "image_url", "image_url": { "url": "https://www.example.net/somepicture.jpg" } } 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChatCompletionMessagePart.ChatCompletionMessagePartListDeSerializerstatic classChatCompletionMessagePart.ChatCompletionMessageUrlPartEncodes URL part: { "url": "https://example.com/somepicture.jpg" }static classChatCompletionMessagePart.ImageDetailstatic classChatCompletionMessagePart.Type 
- 
Constructor Summary
Constructors Constructor Description ChatCompletionMessagePart() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ChatCompletionMessagePart.ChatCompletionMessageUrlPartgetImageUrl()StringgetText()ChatCompletionMessagePart.TypegetType()static ChatCompletionMessagePartimageUrl(String imageUrl)booleanisEmpty(Void ignoreJustPreventSerialization)voidsetImageUrl(ChatCompletionMessagePart.ChatCompletionMessageUrlPart image_url)voidsetText(String text)voidsetType(ChatCompletionMessagePart.Type type)static ChatCompletionMessageParttext(String text) 
 - 
 
- 
- 
Method Detail
- 
text
public static ChatCompletionMessagePart text(String text)
 
- 
imageUrl
public static ChatCompletionMessagePart imageUrl(String imageUrl)
 
- 
getType
public ChatCompletionMessagePart.Type getType()
 
- 
setType
public void setType(ChatCompletionMessagePart.Type type)
 
- 
getText
public String getText()
 
- 
setText
public void setText(String text)
 
- 
getImageUrl
public ChatCompletionMessagePart.ChatCompletionMessageUrlPart getImageUrl()
 
- 
setImageUrl
public void setImageUrl(ChatCompletionMessagePart.ChatCompletionMessageUrlPart image_url)
 
- 
isEmpty
public boolean isEmpty(Void ignoreJustPreventSerialization)
 
 - 
 
 -