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

InputCostDetails

Copy
InputCostDetails()

Bases

TypedDict

Constructors

Attributes

View source on GitHub
constructor
__init__
NameType
audiofloat
cache_creationfloat
cache_readfloat
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.

Breakdown of input token costs.

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