Class TruncationWarningEvent

java.lang.Object
ai.vectros.types.TruncationWarningEvent

public final class TruncationWarningEvent extends Object
  • Method Details

    • getEvent

      public TruncationWarningEventEvent getEvent()
      Returns:
      Backward-compatible alias of type. Always truncation_warning.
    • getResultsRequested

      public int getResultsRequested()
      Returns:
      The number of results retrieved before any were dropped.
    • getResultsUsed

      public int getResultsUsed()
      Returns:
      The number of results actually included in the prompt — resultsRequested minus truncatedCount minus noContentCount.
    • getTruncatedCount

      public int getTruncatedCount()
      Returns:
      How many of the dropped results were cut for context-window budget reasons (lower-scoring overflow). 0 if none were.
    • getNoContentCount

      public int getNoContentCount()
      Returns:
      How many of the dropped results had no groundable text to include at all, independent of budget. 0 if none were.
    • getReason

      public TruncationWarningEventReason getReason()
      Returns:
      A single human-readable summary of why results were dropped: context_window_budget (only the budget reason applied), no_groundable_content (only the no-content reason applied), or context_window_budget_and_no_content (both applied). A caller wanting exact attribution should read truncatedCount/noContentCount directly rather than parse this field.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static TruncationWarningEvent.EventStage builder()