Package com.sap.ai.sdk.foundationmodels.openai.model

# 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 Classes
  Modifier and Type
  Class
  Description
  `static class`
  `OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage.ImageUrl`
  Image URL.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContentPartImage()`
  `ContentPartImage(OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage.ImageUrl url)`
  Creates a new `ContentPartImage` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `canEqual(Object other)`
  `boolean`
  `equals(Object o)`
  `String`
  `getType()`
  Get the type of the content part.
  `int`
  `hashCode()`
  `OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage`
  `setUrl(String url)`
  Set the URL of the image.
  `OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage`
  `setUrl(String url, OpenAiChatMessage.OpenAiChatUserMessage.ImageDetailLevel detailLevel)`
  Set the URL of the image.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ContentPartImage

    public ContentPartImage(@Nonnull OpenAiChatMessage.OpenAiChatUserMessage.ContentPartImage.ImageUrl url)
    Creates a new `ContentPartImage` instance.
    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

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### canEqual

    protected boolean canEqual(Object other)

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### getType

    public String getType()
    Description copied from interface: `OpenAiChatMessage.OpenAiChatUserMessage.ContentPart`
    Get the type of the content part.
    Specified by:
      `getType` in interface `OpenAiChatMessage.OpenAiChatUserMessage.ContentPart`
    Returns:
      The type of the content part as string.