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
  • RemoteGraph
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDKRemoteGraph
Language
Theme
PythonlangsmithschemasInputTokenDetails
Class●Since v0.1

InputTokenDetails

Breakdown of input token counts.

Does not need to sum to full input token count. Does not need to have all keys.

Copy
InputTokenDetails()

Bases

TypedDict

Constructors

constructor
__init__
NameType
audioint
cache_creationint
cache_readint
cache_read_over_200kint

Attributes

attribute
audio: int

Audio input tokens.

attribute
cache_creation: int

Input tokens that were cached and there was a cache miss.

Since there was a cache miss, the cache was created from these tokens.

attribute
cache_read: int

Input tokens that were cached and there was a cache hit. Since there was a cache hit, the tokens were read from the cache. More precisely, the model state given these tokens was read from the cache.

attribute
cache_read_over_200k: int

Input tokens that were cached and there was a cache hit over 200k. Part of Gemini pricing.

View source on GitHub