Skip to content

Add comment and prevent IndexOutOfBounds exception in ImageResponse #706

@devholic22

Description

@devholic22

Expected Behavior

Previously, an IndexOutOfBounds exception might occur if the developer using the getResult function, I modified returns null. (if imageGenerations is empty)

Current Behavior

In this version, the getResult function returns index element number 0 of imageGenerations directly.

Context

  • I added comments to make it easier to understand. (I referred to ChatResponse.)
  • I modified to return null if imageGenerations is empty.
  • I modified toString like ChatResponse format.

please see #745

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions