Record Class TextResult

java.lang.Object
java.lang.Record
ai.octoryn.sdk.TextResult

public record TextResult(String text, List<ToolCall> toolCalls, String finishReason, Usage usage, GovernanceMetadata octoryn, com.fasterxml.jackson.databind.JsonNode response) extends Record
  • Constructor Details

    • TextResult

      public TextResult(String text, List<ToolCall> toolCalls, String finishReason, Usage usage, GovernanceMetadata octoryn, com.fasterxml.jackson.databind.JsonNode response)
      Creates an instance of a TextResult record class.
      Parameters:
      text - the value for the text record component
      toolCalls - the value for the toolCalls record component
      finishReason - the value for the finishReason record component
      usage - the value for the usage record component
      octoryn - the value for the octoryn record component
      response - the value for the response record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • toolCalls

      public List<ToolCall> toolCalls()
      Returns the value of the toolCalls record component.
      Returns:
      the value of the toolCalls record component
    • finishReason

      public String finishReason()
      Returns the value of the finishReason record component.
      Returns:
      the value of the finishReason record component
    • usage

      public Usage usage()
      Returns the value of the usage record component.
      Returns:
      the value of the usage record component
    • octoryn

      public GovernanceMetadata octoryn()
      Returns the value of the octoryn record component.
      Returns:
      the value of the octoryn record component
    • response

      public com.fasterxml.jackson.databind.JsonNode response()
      Returns the value of the response record component.
      Returns:
      the value of the response record component