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

# Class OpenAiToolMessage

java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.OpenAiToolMessage

All Implemented Interfaces:
  `OpenAiMessage`

public final class OpenAiToolMessage extends Object implements OpenAiMessage
Represents a tool message in the OpenAI service.

Since:
  1.4.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `OpenAiMessageContent`
  `content()`
  Response of the executed tool call.
  `boolean`
  `equals(Object o)`
  `int`
  `hashCode()`
  `String`
  `role()`
  The role associated with this message.
  `String`
  `toolCallId()`
  The tool call id associated with this message.
  `String`
  `toString()`

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

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

- ## Method Details

  - ### role

    @Nonnull public String role()
    The role associated with this message.
    Specified by:
      `role` in interface `OpenAiMessage`
    Returns:
      the role.

  - ### content

    @Nonnull public OpenAiMessageContent content()
    Response of the executed tool call.
    Specified by:
      `content` in interface `OpenAiMessage`
    Returns:
      the content.

  - ### toolCallId

    @Nonnull public String toolCallId()
    The tool call id associated with this message.

  - ### equals

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

  - ### hashCode

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

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`