Class TruncationWarningEvent.Builder
- All Implemented Interfaces:
TruncationWarningEvent._FinalStage,TruncationWarningEvent.EventStage,TruncationWarningEvent.NoContentCountStage,TruncationWarningEvent.ReasonStage,TruncationWarningEvent.ResultsRequestedStage,TruncationWarningEvent.ResultsUsedStage,TruncationWarningEvent.TruncatedCountStage
- Enclosing class:
TruncationWarningEvent
-
Method Summary
Modifier and TypeMethodDescriptionadditionalProperties(Map<String, Object> additionalProperties) additionalProperty(String key, Object value) build()event(@NotNull TruncationWarningEventEvent event) Backward-compatible alias oftype.from(TruncationWarningEvent other) noContentCount(int noContentCount) How many of the dropped results had no groundable text to include at all, independent of budget. 0 if none were.reason(@NotNull TruncationWarningEventReason reason) 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), orcontext_window_budget_and_no_content(both applied).resultsRequested(int resultsRequested) The number of results retrieved before any were dropped.resultsUsed(int resultsUsed) The number of results actually included in the prompt —resultsRequestedminustruncatedCountminusnoContentCount.truncatedCount(int truncatedCount) How many of the dropped results were cut for context-window budget reasons (lower-scoring overflow). 0 if none were.
-
Method Details
-
from
- Specified by:
fromin interfaceTruncationWarningEvent.EventStage
-
event
public TruncationWarningEvent.ResultsRequestedStage event(@NotNull @NotNull TruncationWarningEventEvent event) Backward-compatible alias of
type. Alwaystruncation_warning.Backward-compatible alias of
type. Alwaystruncation_warning.- Specified by:
eventin interfaceTruncationWarningEvent.EventStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
resultsRequested
The number of results retrieved before any were dropped.
The number of results retrieved before any were dropped.
- Specified by:
resultsRequestedin interfaceTruncationWarningEvent.ResultsRequestedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
resultsUsed
The number of results actually included in the prompt —
resultsRequestedminustruncatedCountminusnoContentCount.The number of results actually included in the prompt —
resultsRequestedminustruncatedCountminusnoContentCount.- Specified by:
resultsUsedin interfaceTruncationWarningEvent.ResultsUsedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
truncatedCount
How many of the dropped results were cut for context-window budget reasons (lower-scoring overflow). 0 if none were.
How many of the dropped results were cut for context-window budget reasons (lower-scoring overflow). 0 if none were.
- Specified by:
truncatedCountin interfaceTruncationWarningEvent.TruncatedCountStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
noContentCount
How many of the dropped results had no groundable text to include at all, independent of budget. 0 if none were.
How many of the dropped results had no groundable text to include at all, independent of budget. 0 if none were.
- Specified by:
noContentCountin interfaceTruncationWarningEvent.NoContentCountStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
reason
public TruncationWarningEvent._FinalStage reason(@NotNull @NotNull TruncationWarningEventReason reason) 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), orcontext_window_budget_and_no_content(both applied). A caller wanting exact attribution should readtruncatedCount/noContentCountdirectly rather than parse this field.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), orcontext_window_budget_and_no_content(both applied). A caller wanting exact attribution should readtruncatedCount/noContentCountdirectly rather than parse this field.- Specified by:
reasonin interfaceTruncationWarningEvent.ReasonStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
build
- Specified by:
buildin interfaceTruncationWarningEvent._FinalStage
-
additionalProperty
- Specified by:
additionalPropertyin interfaceTruncationWarningEvent._FinalStage
-
additionalProperties
- Specified by:
additionalPropertiesin interfaceTruncationWarningEvent._FinalStage
-