From 5b6b1f9e1d52da830bf6c5a8e59b563fe293e4f5 Mon Sep 17 00:00:00 2001 From: Bob Lin Date: Tue, 26 Mar 2024 07:59:52 +0800 Subject: [PATCH] docs: Fix several sample code errors (#19382) --- docs/docs/expression_language/why.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/expression_language/why.ipynb b/docs/docs/expression_language/why.ipynb index 8a504da5611..7601ce1d5ff 100644 --- a/docs/docs/expression_language/why.ipynb +++ b/docs/docs/expression_language/why.ipynb @@ -319,7 +319,7 @@ "#### LCEL\n", "\n", "```python\n", - "chain.ainvoke(\"ice cream\")\n", + "await chain.ainvoke(\"ice cream\")\n", "```" ] }, @@ -739,7 +739,7 @@ " return await ainvoke_chain(topic)\n", " except Exception:\n", " # Note: we haven't actually implemented this.\n", - " return ainvoke_anthropic_chain(topic)\n", + " return await ainvoke_anthropic_chain(topic)\n", "\n", "async def batch_chain_with_fallback(topics: List[str]) -> str:\n", " try:\n", @@ -965,7 +965,7 @@ " try:\n", " return await ainvoke_chain(topic)\n", " except Exception:\n", - " return ainvoke_anthropic_chain(topic)\n", + " return await ainvoke_anthropic_chain(topic)\n", "\n", "async def batch_chain_with_fallback(topics: List[str]) -> str:\n", " try:\n", @@ -1070,7 +1070,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.1" + "version": "3.11.6" } }, "nbformat": 4,