Class OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.model.OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage
- All Implemented Interfaces:
OpenAiChatMessage.OpenAiChatUserMessage.ContentPart
- Enclosing class:
OpenAiChatMessage.OpenAiChatUserMessage
public static class OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage
extends Object
implements OpenAiChatMessage.OpenAiChatUserMessage.ContentPart
Content part image input, only supported when using the `gpt-4-visual-preview` model.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classImage URL. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newContentPartImageinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleangetType()Get the type of the content part.inthashCode()Set the URL of the image.setUrl(String url, OpenAiChatMessage.OpenAiChatUserMessage.ImageDetailLevel detailLevel) Set the URL of the image.
-
Constructor Details
-
ContentPartImage
public ContentPartImage(@Nonnull OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage.ImageUrl url) Creates a newContentPartImageinstance.- Parameters:
url- Either a URL of the image or the base64 encoded image data.
-
ContentPartImage
public ContentPartImage()
-
-
Method Details
-
setUrl
@Nonnull public OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage setUrl(@Nonnull String url) Set the URL of the image.- Parameters:
url- The URL of the image.- Returns:
- The image URL.
-
setUrl
@Nonnull public OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage setUrl(@Nonnull String url, @Nullable OpenAiChatMessage.OpenAiChatUserMessage.ImageDetailLevel detailLevel) Set the URL of the image.- Parameters:
url- The URL of the image.detailLevel- The detail level of the image.- Returns:
- The image URL.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getType
Description copied from interface:OpenAiChatMessage.OpenAiChatUserMessage.ContentPartGet the type of the content part.- Specified by:
getTypein interfaceOpenAiChatMessage.OpenAiChatUserMessage.ContentPart- Returns:
- The type of the content part as string.
-