Class ThreadStats
-
- All Implemented Interfaces:
public final class ThreadStats
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classThreadStats.BuilderA builder for ThreadStats.
public final classThreadStats.CompletionCostDetailscompletion_cost_detailsis the per-sub-category sum of completion cost details across the thread. Populated whenCOMPLETION_COST_DETAILSis selected.public final classThreadStats.CompletionTokenDetailscompletion_token_detailsis the per-sub-category sum of completion token details across the thread. Populated whenCOMPLETION_TOKEN_DETAILSis selected.public final classThreadStats.FeedbackStatsfeedback_statsaggregates run-level feedback across the thread's traces, keyed by feedback key. Populated whenFEEDBACK_STATSis selected.public final classThreadStats.PromptCostDetailsprompt_cost_detailsis the per-sub-category sum of prompt cost details across the thread. Populated whenPROMPT_COST_DETAILSis selected.public final classThreadStats.PromptTokenDetailsprompt_token_detailsis the per-sub-category sum of prompt token details across the thread. Populated whenPROMPT_TOKEN_DETAILSis selected.
-
Method Summary
Modifier and Type Method Description final Optional<Double>completionCost()completion_costis the sum of per-trace completion costs across the thread, in USD.final Optional<ThreadStats.CompletionCostDetails>completionCostDetails()completion_cost_detailsis the per-sub-category sum of completion cost details across the thread.final Optional<ThreadStats.CompletionTokenDetails>completionTokenDetails()completion_token_detailsis the per-sub-category sum of completion token details across the thread.final Optional<Long>completionTokens()completion_tokensis the sum of per-trace completion token counts across the thread.final Optional<ThreadStats.FeedbackStats>feedbackStats()feedback_statsaggregates run-level feedback across the thread's traces, keyed by feedback key.final Optional<OffsetDateTime>firstStartTime()first_start_timeis the earliest trace start time in the thread (RFC3339).final Optional<OffsetDateTime>lastEndTime()last_end_timeis the latest trace end time in the thread (RFC3339).final Optional<OffsetDateTime>lastStartTime()last_start_timeis the latest trace start time in the thread (RFC3339).final Optional<Double>latencyP50Seconds()latency_p50_secondsis the approximate p50 of trace latency across the thread, in seconds.final Optional<Double>latencyP99Seconds()latency_p99_secondsis the approximate p99 of trace latency across the thread, in seconds.final Optional<Double>promptCost()prompt_costis the sum of per-trace prompt costs across the thread, in USD.final Optional<ThreadStats.PromptCostDetails>promptCostDetails()prompt_cost_detailsis the per-sub-category sum of prompt cost details across the thread.final Optional<ThreadStats.PromptTokenDetails>promptTokenDetails()prompt_token_detailsis the per-sub-category sum of prompt token details across the thread.final Optional<Long>promptTokens()prompt_tokensis the sum of per-trace prompt token counts across the thread.final Optional<Double>totalCost()total_costis the sum of per-trace total costs across the thread, in USD.final Optional<Long>totalTokens()total_tokensis the sum of per-trace total token counts across the thread.final Optional<Long>turns()turnsis the number of distinct traces (turns) in the thread.final JsonField<Double>_completionCost()Returns the raw JSON value of completionCost. final JsonField<ThreadStats.CompletionCostDetails>_completionCostDetails()Returns the raw JSON value of completionCostDetails. final JsonField<ThreadStats.CompletionTokenDetails>_completionTokenDetails()Returns the raw JSON value of completionTokenDetails. final JsonField<Long>_completionTokens()Returns the raw JSON value of completionTokens. final JsonField<ThreadStats.FeedbackStats>_feedbackStats()Returns the raw JSON value of feedbackStats. final JsonField<OffsetDateTime>_firstStartTime()Returns the raw JSON value of firstStartTime. final JsonField<OffsetDateTime>_lastEndTime()Returns the raw JSON value of lastEndTime. final JsonField<OffsetDateTime>_lastStartTime()Returns the raw JSON value of lastStartTime. final JsonField<Double>_latencyP50Seconds()Returns the raw JSON value of latencyP50Seconds. final JsonField<Double>_latencyP99Seconds()Returns the raw JSON value of latencyP99Seconds. final JsonField<Double>_promptCost()Returns the raw JSON value of promptCost. final JsonField<ThreadStats.PromptCostDetails>_promptCostDetails()Returns the raw JSON value of promptCostDetails. final JsonField<ThreadStats.PromptTokenDetails>_promptTokenDetails()Returns the raw JSON value of promptTokenDetails. final JsonField<Long>_promptTokens()Returns the raw JSON value of promptTokens. final JsonField<Double>_totalCost()Returns the raw JSON value of totalCost. final JsonField<Long>_totalTokens()Returns the raw JSON value of totalTokens. final JsonField<Long>_turns()Returns the raw JSON value of turns. final Map<String, JsonValue>_additionalProperties()final ThreadStats.BuildertoBuilder()final ThreadStatsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ThreadStats.Builderbuilder()Returns a mutable builder for constructing an instance of ThreadStats. -
-
Method Detail
-
completionCost
final Optional<Double> completionCost()
completion_costis the sum of per-trace completion costs across the thread, in USD. Populated whenCOMPLETION_COSTis selected.
-
completionCostDetails
final Optional<ThreadStats.CompletionCostDetails> completionCostDetails()
completion_cost_detailsis the per-sub-category sum of completion cost details across the thread. Populated whenCOMPLETION_COST_DETAILSis selected.
-
completionTokenDetails
final Optional<ThreadStats.CompletionTokenDetails> completionTokenDetails()
completion_token_detailsis the per-sub-category sum of completion token details across the thread. Populated whenCOMPLETION_TOKEN_DETAILSis selected.
-
completionTokens
final Optional<Long> completionTokens()
completion_tokensis the sum of per-trace completion token counts across the thread. Populated whenCOMPLETION_TOKENSis selected.
-
feedbackStats
final Optional<ThreadStats.FeedbackStats> feedbackStats()
feedback_statsaggregates run-level feedback across the thread's traces, keyed by feedback key. Populated whenFEEDBACK_STATSis selected.
-
firstStartTime
final Optional<OffsetDateTime> firstStartTime()
first_start_timeis the earliest trace start time in the thread (RFC3339). Populated whenFIRST_START_TIMEis selected.
-
lastEndTime
final Optional<OffsetDateTime> lastEndTime()
last_end_timeis the latest trace end time in the thread (RFC3339). Populated whenLAST_END_TIMEis selected.
-
lastStartTime
final Optional<OffsetDateTime> lastStartTime()
last_start_timeis the latest trace start time in the thread (RFC3339). Populated whenLAST_START_TIMEis selected.
-
latencyP50Seconds
final Optional<Double> latencyP50Seconds()
latency_p50_secondsis the approximate p50 of trace latency across the thread, in seconds. Populated whenLATENCY_P50is selected.
-
latencyP99Seconds
final Optional<Double> latencyP99Seconds()
latency_p99_secondsis the approximate p99 of trace latency across the thread, in seconds. Populated whenLATENCY_P99is selected.
-
promptCost
final Optional<Double> promptCost()
prompt_costis the sum of per-trace prompt costs across the thread, in USD. Populated whenPROMPT_COSTis selected.
-
promptCostDetails
final Optional<ThreadStats.PromptCostDetails> promptCostDetails()
prompt_cost_detailsis the per-sub-category sum of prompt cost details across the thread. Populated whenPROMPT_COST_DETAILSis selected.
-
promptTokenDetails
final Optional<ThreadStats.PromptTokenDetails> promptTokenDetails()
prompt_token_detailsis the per-sub-category sum of prompt token details across the thread. Populated whenPROMPT_TOKEN_DETAILSis selected.
-
promptTokens
final Optional<Long> promptTokens()
prompt_tokensis the sum of per-trace prompt token counts across the thread. Populated whenPROMPT_TOKENSis selected.
-
totalCost
final Optional<Double> totalCost()
total_costis the sum of per-trace total costs across the thread, in USD. Populated whenTOTAL_COSTis selected.
-
totalTokens
final Optional<Long> totalTokens()
total_tokensis the sum of per-trace total token counts across the thread. Populated whenTOTAL_TOKENSis selected.
-
turns
final Optional<Long> turns()
turnsis the number of distinct traces (turns) in the thread. Populated whenTURNSis selected.
-
_completionCost
final JsonField<Double> _completionCost()
Returns the raw JSON value of completionCost.
Unlike completionCost, this method doesn't throw if the JSON field has an unexpected type.
-
_completionCostDetails
final JsonField<ThreadStats.CompletionCostDetails> _completionCostDetails()
Returns the raw JSON value of completionCostDetails.
Unlike completionCostDetails, this method doesn't throw if the JSON field has an unexpected type.
-
_completionTokenDetails
final JsonField<ThreadStats.CompletionTokenDetails> _completionTokenDetails()
Returns the raw JSON value of completionTokenDetails.
Unlike completionTokenDetails, this method doesn't throw if the JSON field has an unexpected type.
-
_completionTokens
final JsonField<Long> _completionTokens()
Returns the raw JSON value of completionTokens.
Unlike completionTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_feedbackStats
final JsonField<ThreadStats.FeedbackStats> _feedbackStats()
Returns the raw JSON value of feedbackStats.
Unlike feedbackStats, this method doesn't throw if the JSON field has an unexpected type.
-
_firstStartTime
final JsonField<OffsetDateTime> _firstStartTime()
Returns the raw JSON value of firstStartTime.
Unlike firstStartTime, this method doesn't throw if the JSON field has an unexpected type.
-
_lastEndTime
final JsonField<OffsetDateTime> _lastEndTime()
Returns the raw JSON value of lastEndTime.
Unlike lastEndTime, this method doesn't throw if the JSON field has an unexpected type.
-
_lastStartTime
final JsonField<OffsetDateTime> _lastStartTime()
Returns the raw JSON value of lastStartTime.
Unlike lastStartTime, this method doesn't throw if the JSON field has an unexpected type.
-
_latencyP50Seconds
final JsonField<Double> _latencyP50Seconds()
Returns the raw JSON value of latencyP50Seconds.
Unlike latencyP50Seconds, this method doesn't throw if the JSON field has an unexpected type.
-
_latencyP99Seconds
final JsonField<Double> _latencyP99Seconds()
Returns the raw JSON value of latencyP99Seconds.
Unlike latencyP99Seconds, this method doesn't throw if the JSON field has an unexpected type.
-
_promptCost
final JsonField<Double> _promptCost()
Returns the raw JSON value of promptCost.
Unlike promptCost, this method doesn't throw if the JSON field has an unexpected type.
-
_promptCostDetails
final JsonField<ThreadStats.PromptCostDetails> _promptCostDetails()
Returns the raw JSON value of promptCostDetails.
Unlike promptCostDetails, this method doesn't throw if the JSON field has an unexpected type.
-
_promptTokenDetails
final JsonField<ThreadStats.PromptTokenDetails> _promptTokenDetails()
Returns the raw JSON value of promptTokenDetails.
Unlike promptTokenDetails, this method doesn't throw if the JSON field has an unexpected type.
-
_promptTokens
final JsonField<Long> _promptTokens()
Returns the raw JSON value of promptTokens.
Unlike promptTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_totalCost
final JsonField<Double> _totalCost()
Returns the raw JSON value of totalCost.
Unlike totalCost, this method doesn't throw if the JSON field has an unexpected type.
-
_totalTokens
final JsonField<Long> _totalTokens()
Returns the raw JSON value of totalTokens.
Unlike totalTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_turns
final JsonField<Long> _turns()
Returns the raw JSON value of turns.
Unlike turns, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ThreadStats.Builder toBuilder()
-
validate
final ThreadStats validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static ThreadStats.Builder builder()
Returns a mutable builder for constructing an instance of ThreadStats.
-
-
-
-