docs: add a how-to for streaming from final node (#832)

This commit is contained in:
Vadym Barda
2024-06-27 10:07:20 -04:00
committed by GitHub
parent b0ed8fdd3b
commit a783abc684
8 changed files with 314 additions and 10 deletions
+1 -7
View File
@@ -64,13 +64,7 @@ jobs:
echo "Changed files: ${CHANGED_FILES}"
if [ -n "${CHANGED_FILES}" ]; then
echo "Running link check on changed notebook files..."
poetry run pytest -v --check-links-ignore "https://(api|web)\.smith\.langchain\.com/.*" --check-links-ignore "https://x.com/.*" --check-links ${CHANGED_FILES}
PYTEST_EXIT_CODE=$?
echo "pytest exit code: ${PYTEST_EXIT_CODE}"
if [ "${PYTEST_EXIT_CODE}" -ne 0 ] && [ "${PYTEST_EXIT_CODE}" -ne 5 ]; then
echo "pytest failed with exit code ${PYTEST_EXIT_CODE}"
exit ${PYTEST_EXIT_CODE}
fi
poetry run pytest -v --check-links-ignore "https://(api|web)\.smith\.langchain\.com/.*" --check-links-ignore "https://x.com/.*" --check-links ${CHANGED_FILES} || ([ $? = 5 ] && exit 0 || exit $?)
else
echo "No notebook files changed."
fi
+1
View File
@@ -22,6 +22,7 @@ _MANUAL = {
"streaming-tokens.ipynb",
"streaming-content.ipynb",
"streaming-events-from-within-tools.ipynb",
"streaming-from-final-node.ipynb",
"persistence.ipynb",
"persistence_postgres.ipynb",
"visualization.ipynb",
+1
View File
@@ -45,6 +45,7 @@ These guides show how to use different streaming modes.
- [How to stream arbitrarily nested content](streaming-content.ipynb)
- [How to configure multiple streaming modes at the same time](stream-multiple.ipynb)
- [How to stream events from within a tool](streaming-events-from-within-tools.ipynb)
- [How to stream events from the final node](streaming-from-final-node.ipynb)
## Other
- [How to run graph asynchronously](async.ipynb)
+1
View File
@@ -145,6 +145,7 @@ nav:
- Stream arbitrarily nested content: how-tos/streaming-content.ipynb
- Configure multiple streaming modes: how-tos/stream-multiple.ipynb
- Stream events from within tools: how-tos/streaming-events-from-within-tools.ipynb
- Stream events from the final node: how-tos/streaming-from-final-node.ipynb
- Other:
- Run graph asynchronously: how-tos/async.ipynb
- Visualize your graph: how-tos/visualization.ipynb
-1
View File
@@ -77,7 +77,6 @@
"metadata": {},
"outputs": [],
"source": [
"# this is all that's needed for the agent.py\n",
"from typing import Literal\n",
"from langchain_community.tools.tavily_search import TavilySearchResults\n",
"from langchain_core.runnables import ConfigurableField\n",
-1
View File
@@ -82,7 +82,6 @@
"metadata": {},
"outputs": [],
"source": [
"# this is all that's needed for the agent.py\n",
"from typing import Literal\n",
"from langchain_community.tools.tavily_search import TavilySearchResults\n",
"from langchain_core.runnables import ConfigurableField\n",
-1
View File
@@ -82,7 +82,6 @@
"metadata": {},
"outputs": [],
"source": [
"# this is all that's needed for the agent.py\n",
"from typing import Literal\n",
"from langchain_community.tools.tavily_search import TavilySearchResults\n",
"from langchain_core.runnables import ConfigurableField\n",
File diff suppressed because one or more lines are too long