Record Class HarnessEvent.ResponseTruncated
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.common.ai.HarnessEvent.ResponseTruncated
- Record Components:
outputTokens- output tokens produced before the cap was reached, or0when the provider reported no usage.
- All Implemented Interfaces:
HarnessEvent
- Enclosing interface:
HarnessEvent
public static record HarnessEvent.ResponseTruncated(int outputTokens)
extends Record
implements HarnessEvent
Emitted when a chat response stopped because it hit the model's output-token limit (finish
reason
LENGTH); its final text, or a tool call's arguments, may be cut off. The harness
still returns the partial content and logs a warning; this event exposes the same signal to
consumers so a UI can flag the truncation, though no built-in consumer surfaces it yet.-
Nested Class Summary
Nested classes/interfaces inherited from interface HarnessEvent
HarnessEvent.ModelMessage, HarnessEvent.ModelThinking, HarnessEvent.ReplyRejected, HarnessEvent.ResponseTruncated, HarnessEvent.SubagentFinished, HarnessEvent.SubagentStarted, HarnessEvent.TokenSpend, HarnessEvent.ToolCallCompleted, HarnessEvent.ToolCallFailed, HarnessEvent.ToolCallRequested, HarnessEvent.TurnFinished, HarnessEvent.TurnStarted, HarnessEvent.WindowUsage -
Constructor Summary
ConstructorsConstructorDescriptionResponseTruncated(int outputTokens) Creates an instance of aResponseTruncatedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theoutputTokensrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResponseTruncated
public ResponseTruncated(int outputTokens) Creates an instance of aResponseTruncatedrecord class.- Parameters:
outputTokens- the value for theoutputTokensrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
outputTokens
public int outputTokens()Returns the value of theoutputTokensrecord component.- Returns:
- the value of the
outputTokensrecord component
-