_pick() — langchain Function Reference
Architecture documentation for the _pick() function in passthrough.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 3a36dbf6_6c2b_7362_1ddb_d7fe56086df3["_pick()"] 8b44d2a6_6c89_4ea1_b8c7_64e60123bbbe["RunnablePick"] 3a36dbf6_6c2b_7362_1ddb_d7fe56086df3 -->|defined in| 8b44d2a6_6c89_4ea1_b8c7_64e60123bbbe 355d2fce_215e_3c1a_df77_1bc43c1f6aae["_ainvoke()"] 355d2fce_215e_3c1a_df77_1bc43c1f6aae -->|calls| 3a36dbf6_6c2b_7362_1ddb_d7fe56086df3 ce4d1e34_3bb5_37f8_6976_fc0c99c23892["_transform()"] ce4d1e34_3bb5_37f8_6976_fc0c99c23892 -->|calls| 3a36dbf6_6c2b_7362_1ddb_d7fe56086df3 07dae0e0_e299_4a3b_4925_f46bdb69bdaf["_atransform()"] 07dae0e0_e299_4a3b_4925_f46bdb69bdaf -->|calls| 3a36dbf6_6c2b_7362_1ddb_d7fe56086df3 933ccc14_844d_c42a_d3ca_33f04cdfba48["assign()"] 3a36dbf6_6c2b_7362_1ddb_d7fe56086df3 -->|calls| 933ccc14_844d_c42a_d3ca_33f04cdfba48 style 3a36dbf6_6c2b_7362_1ddb_d7fe56086df3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/passthrough.py lines 744–754
def _pick(self, value: dict[str, Any]) -> Any:
if not isinstance(value, dict):
msg = "The input to RunnablePassthrough.assign() must be a dict."
raise ValueError(msg) # noqa: TRY004
if isinstance(self.keys, str):
return value.get(self.keys)
picked = {k: value.get(k) for k in self.keys if k in value}
if picked:
return AddableDict(picked)
return None
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does _pick() do?
_pick() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/passthrough.py.
Where is _pick() defined?
_pick() is defined in libs/core/langchain_core/runnables/passthrough.py at line 744.
What does _pick() call?
_pick() calls 1 function(s): assign.
What calls _pick()?
_pick() is called by 3 function(s): _ainvoke, _atransform, _transform.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free