Interface BetaUsage.Iteration.Visitor
-
- All Implemented Interfaces:
public interface BetaUsage.Iteration.Visitor<T extends Object>
-
-
Method Summary
Modifier and Type Method Description abstract TvisitMessage(BetaMessageIterationUsage message)Token usage for a sampling iteration. abstract TvisitCompaction(BetaCompactionIterationUsage compaction)Token usage for a compaction iteration. abstract TvisitAdvisorMessage(BetaAdvisorMessageIterationUsage advisorMessage)Token usage for an advisor sub-inference iteration. abstract TvisitFallbackMessage(BetaFallbackMessageIterationUsage fallbackMessage)Token usage for the fallback-model attempt of a server-side fallback request. Tunknown(JsonValue json)Maps an unknown variant of Iteration to a value of type T. -
-
Method Detail
-
visitMessage
abstract T visitMessage(BetaMessageIterationUsage message)
Token usage for a sampling iteration.
-
visitCompaction
abstract T visitCompaction(BetaCompactionIterationUsage compaction)
Token usage for a compaction iteration.
-
visitAdvisorMessage
abstract T visitAdvisorMessage(BetaAdvisorMessageIterationUsage advisorMessage)
Token usage for an advisor sub-inference iteration.
-
visitFallbackMessage
abstract T visitFallbackMessage(BetaFallbackMessageIterationUsage fallbackMessage)
Token usage for the fallback-model attempt of a server-side fallback request.
The terminal entry of a fallback-served turn: when a fallback hop's output is the returned message, the entry for the iteration that completed it carries this type in place of
message. A declined hop and the serving hop's earlier tool-loop iterations producemessageentries. Whether a fallback model served the response is signalled by the presence of this entry inusage.iterations.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of Iteration to a value of type T.
An instance of Iteration can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-