MCPcopy
hub / github.com/langchain-ai/langchain / ainvoke

Method ainvoke

libs/core/langchain_core/tools.py:271–287  ·  view source on GitHub ↗
(
        self,
        input: Union[str, Dict],
        config: Optional[RunnableConfig] = None,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

269 )
270
271 async def ainvoke(
272 self,
273 input: Union[str, Dict],
274 config: Optional[RunnableConfig] = None,
275 **kwargs: Any,
276 ) -> Any:
277 config = ensure_config(config)
278 return await self.arun(
279 input,
280 callbacks=config.get("callbacks"),
281 tags=config.get("tags"),
282 metadata=config.get("metadata"),
283 run_name=config.get("run_name"),
284 run_id=config.pop("run_id", None),
285 config=config,
286 **kwargs,
287 )
288
289 # --- Tool ---
290

Callers

nothing calls this directly

Calls 4

arunMethod · 0.95
ensure_configFunction · 0.90
popMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected