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
PythonlangsmithschemasInputCostDetails
Class●Since v0.3

InputCostDetails

Breakdown of input token costs.

Does not need to sum to full input cost. Does not need to have all keys.

Copy
InputCostDetails()

Bases

TypedDict

Constructors

constructor
__init__
NameType
audiofloat
cache_creationfloat
cache_readfloat

Attributes

attribute
audio: float

Cost of audio input tokens.

attribute
cache_creation: float

Cost of 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: float

Cost of 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.

View source on GitHub