Class ToolMessage

java.lang.Object
com.sap.ai.sdk.orchestration.ToolMessage
All Implemented Interfaces:
Message

public final class ToolMessage extends Object implements Message
Represents a chat message as 'tool' to the orchestration service.
Since:
1.4.0
  • Constructor Details

    • ToolMessage

      public ToolMessage(@Nonnull String id, @Nonnull String content)
  • Method Details

    • content

      @Nonnull public MessageContent content()
      Description copied from interface: Message
      Returns the content of the message.
      Specified by:
      content in interface Message
      Returns:
      the content.
    • createChatMessage

      @Nonnull public ChatMessage createChatMessage()
      Description copied from interface: Message
      Converts the message to a serializable ChatMessage object.
      Specified by:
      createChatMessage in interface Message
      Returns:
      the corresponding ChatMessage object.
    • role

      @Nonnull public String role()
      The role of the assistant.
      Specified by:
      role in interface Message
      Returns:
      the role.
    • id

      @Nonnull public String id()
    • 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