From 23b868da008c3b06afbb249f81c31ec09b9d9aaa Mon Sep 17 00:00:00 2001 From: Yazan Jian Date: Tue, 20 May 2025 19:45:47 +0400 Subject: [PATCH] =?UTF-8?q?docs:=20fix=20async=20usage=20example=20from=20?= =?UTF-8?q?`await=20.invoke()`=20to=20`await=20.ainvo=E2=80=A6=20(#4758)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs: fix async usage example from `await .invoke()` to `await .ainvoke()` --- docs/docs/agents/run_agents.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/agents/run_agents.md b/docs/docs/agents/run_agents.md index 0d32708de..61dcac308 100644 --- a/docs/docs/agents/run_agents.md +++ b/docs/docs/agents/run_agents.md @@ -10,7 +10,7 @@ hide: # Running agents -Agents support both synchronous and asynchronous execution using either `.invoke()` / `await .invoke()` for full responses, or `.stream()` / `.astream()` for **incremental** [streaming](streaming.md) output. This section explains how to provide input, interpret output, enable streaming, and control execution limits. +Agents support both synchronous and asynchronous execution using either `.invoke()` / `await .ainvoke()` for full responses, or `.stream()` / `.astream()` for **incremental** [streaming](streaming.md) output. This section explains how to provide input, interpret output, enable streaming, and control execution limits. ## Basic usage @@ -18,7 +18,7 @@ Agents support both synchronous and asynchronous execution using either `.invoke Agents can be executed in two primary modes: - **Synchronous** using `.invoke()` or `.stream()` -- **Asynchronous** using `await .invoke()` or `async for` with `.astream()` +- **Asynchronous** using `await .ainvoke()` or `async for` with `.astream()` === "Sync invocation" ```python