LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithtypesthread_aggregate_stats_responseThreadAggregateStatsResponse
Class●Since v0.14

ThreadAggregateStatsResponse

Copy
ThreadAggregateStatsResponse()

Bases

BaseModel

Attributes

Inherited fromBaseModel

Attributes

Amodel_fields_set: set[str]Amodel_configAmodel_construct: construct

Methods

Mto_dict
—

Recursively generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

View source on GitHub
Mto_json
—

Return the report as a JSON-serializable dict (raw JSON shape).

Mconstruct
Mmodel_dump
—

Dump the feedback, including its address.

Mmodel_dump_json
—

Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json

Classes

CConfig
attribute
completion_cost: Optional[float]
attribute
completion_cost_details: Optional[Dict[str, float]]
attribute
completion_token_details: Optional[Dict[str, int]]
attribute
completion_tokens: Optional[int]
attribute
error_rate: Optional[float]
attribute
first_token_p50_seconds: Optional[float]
attribute
first_token_p99_seconds: Optional[float]
attribute
latency_p50_seconds: Optional[float]
attribute
latency_p99_seconds: Optional[float]
attribute
median_tokens: Optional[int]
attribute
prompt_cost: Optional[float]
attribute
prompt_cost_details: Optional[Dict[str, float]]
attribute
prompt_token_details: Optional[Dict[str, int]]
attribute
prompt_tokens: Optional[int]
attribute
streaming_rate: Optional[float]
attribute
thread_count: Optional[int]
attribute
thread_feedback_stats: Optional[Dict[str, ThreadFeedbackStats]]
attribute
total_cost: Optional[float]
attribute
total_tokens: Optional[int]
attribute
trace_count: Optional[int]

completion_cost is the completion cost across matching traces in USD.

completion_cost_details contains completion-cost totals by category.

completion_token_details contains completion-token totals by category.

completion_tokens is the sum of completion tokens across matching traces.

error_rate is the fraction of matching traces that contain an error.

first_token_p50_seconds is the approximate median time to first token in seconds. Populated when FIRST_TOKEN_P50 is selected.

first_token_p99_seconds is the approximate p99 time to first token in seconds.

Populated when FIRST_TOKEN_P99 is selected.

latency_p50_seconds is the approximate median trace latency in seconds.

Populated when LATENCY_P50 is selected.

latency_p99_seconds is the approximate p99 trace latency in seconds.

Populated when LATENCY_P99 is selected.

median_tokens is the approximate median of total tokens across matching traces.

Populated when MEDIAN_TOKENS is selected.

prompt_cost is the prompt cost across matching traces in USD.

prompt_cost_details contains prompt-cost totals by category.

prompt_token_details contains prompt-token totals by category.

prompt_tokens is the sum of prompt tokens across matching traces.

streaming_rate is the fraction of completed matching traces that streamed tokens.

thread_count is the number of distinct threads matching the query.

Populated when THREAD_COUNT is selected.

thread_feedback_stats contains aggregate thread-level feedback statistics keyed by feedback key. Populated when THREAD_FEEDBACK_STATS is selected.

total_cost is the total cost across matching traces in USD.

total_tokens is the sum of all tokens across matching traces.

trace_count is the number of traces in the matching threads.

Populated when TRACE_COUNT is selected.