mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-27 08:58:48 +00:00
docs: Fix several sample code errors (#19382)
This commit is contained in:
parent
03ba1d4731
commit
5b6b1f9e1d
@ -319,7 +319,7 @@
|
|||||||
"#### LCEL\n",
|
"#### LCEL\n",
|
||||||
"\n",
|
"\n",
|
||||||
"```python\n",
|
"```python\n",
|
||||||
"chain.ainvoke(\"ice cream\")\n",
|
"await chain.ainvoke(\"ice cream\")\n",
|
||||||
"```"
|
"```"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -739,7 +739,7 @@
|
|||||||
" return await ainvoke_chain(topic)\n",
|
" return await ainvoke_chain(topic)\n",
|
||||||
" except Exception:\n",
|
" except Exception:\n",
|
||||||
" # Note: we haven't actually implemented this.\n",
|
" # Note: we haven't actually implemented this.\n",
|
||||||
" return ainvoke_anthropic_chain(topic)\n",
|
" return await ainvoke_anthropic_chain(topic)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"async def batch_chain_with_fallback(topics: List[str]) -> str:\n",
|
"async def batch_chain_with_fallback(topics: List[str]) -> str:\n",
|
||||||
" try:\n",
|
" try:\n",
|
||||||
@ -965,7 +965,7 @@
|
|||||||
" try:\n",
|
" try:\n",
|
||||||
" return await ainvoke_chain(topic)\n",
|
" return await ainvoke_chain(topic)\n",
|
||||||
" except Exception:\n",
|
" except Exception:\n",
|
||||||
" return ainvoke_anthropic_chain(topic)\n",
|
" return await ainvoke_anthropic_chain(topic)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"async def batch_chain_with_fallback(topics: List[str]) -> str:\n",
|
"async def batch_chain_with_fallback(topics: List[str]) -> str:\n",
|
||||||
" try:\n",
|
" try:\n",
|
||||||
@ -1070,7 +1070,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.9.1"
|
"version": "3.11.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
Loading…
Reference in New Issue
Block a user