docs: revamp streaming how-to guides (#3239)

This commit is contained in:
Vadym Barda
2025-01-31 15:14:26 -05:00
committed by GitHub
parent 8d8e514924
commit d5b0ad2cf6
39 changed files with 1629 additions and 2604 deletions
+2
View File
@@ -22,6 +22,8 @@ class EscapePreprocessor(Preprocessor):
)
elif cell.cell_type == "code":
# Remove noqa comments
cell.source = re.sub(r'#\s*noqa.*$', '', cell.source, flags=re.MULTILINE)
# escape ``` in code
cell.source = cell.source.replace("```", r"\`\`\`")
# escape ``` in output
@@ -1 +0,0 @@
eNrtVwtUFNcZRiRaX+cYj6UGja6r1ajMMrM7+0KpQRCWlwvsIqAiHWbu7g7MzgwzswsrQSMxRWtP7FofxzQ+geURBU1IUFFr9ZiKtiamitEoGo3RaNqqaIz1Qe8si4Fge5LWnpPTZs7ZnXvn/vd////9blm1GwgizbF9ttKsBASClOBEXFlWLYBCFxClJT4nkBwcVZlqtlgrXAJ9erJDkngxMiKC4GkVxwOWoFUk54xwYxGkg5Ai4JhngJ9NZR5Hec70WVSidAJRJOxAVEYq5pYoSQ7KYiU4URbBLRNFheQAiiJAwJegoFmFaFOGK5QCxwCZxiUCQVmaA784OQow8ic7LyE4JxOxcIrBtygJgHDCiY1gRAA/SMDJQ4MklyAzQVWo/I3jmIAOkof3M7e5WL/NMq/H40hFiZIlnH4CO5ByA6rJNBQQSYHmA2TKDBFA5WloAaeAlN2MsHGCk5DJVPI2nhAgP+hh0c+cF6DnBIkGnVOSljz+AWBdsg1zlayHlLdBR8h2dykLjaRZu7K0VPYODBAtAMpP7mfQnZLLywekBClLc0qrHYCgoOQVlQ5OlLz1PQPXQJAkgO4ELMlRkLt3m30BzYcrKGBjCAnUwWCxwO8Wb10BADxCMLQb+Dp3ebcTPM/QpN/QiHyRY7cGgovImvRerpODicBUYCXvrmjRw5JmqEl0QkSqB6YZq8BUuEGFbi9GRImgWQamDcIQUCkf719v7r7AE2QB5IQEUtjr69xc352GE71VKQRptvRgSQikw1tFCE4d/nb374KLlWgn8FbHpP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o4fkl9776bMBZuB5B1i217cnrnXXxBmmzCsH9XcnBtblnIkC8f39UybaVlRN2WKIXv3BoT5zF3EeW3QbeSNGdnBMVEb6hfwRfaKi7uTIetfuOzeyJmI9T7N+humBAlDrQdUPgSIzqYMCzL8aTGl5sFPISA6nu4K3i2KuX23KZTPzcismBGx52ZN+4fwKBI/fh2SSeSlqSrtGxVK0KFV0qVKqqFXIU2Jv+RVOVJfFRAwZkaLR3IK+UDNAtUHsqbmsSS+NHL9E7t+n+9+n+/+z6f7Sr9LX/6cnptsuHwZC/59dPob8m8uH6bd5+agj9YTmN3X70Bvu+O1DbXDpCTVw6oxGnYkyEFqDSUsCgnQBp0sHtPDXv33cganWoDZC5x2cavf/dKrNz+aOEbFoqo1LOpb22Wr/kskbovc8/c3Gew6D+2PTVvqaNz6WIXU075se//UfjWbD1KHDr19/9cQj3y2MfmxjWcwBqSQrvvRiS2fCpQvXLp9f1pm/c1f5jZGVW5e/Vdt+/lUm97t9f/vGqhWcx+8/N8sy4lq/w6ntM1d9uTG4SXn+QGdn2V3BLV+klwyrm1TR9mLDytJFrznz7vvgaug4+UBWWcxJTdTTL58dXhucay2Lmfu9/Sw58vjKo68sjbK7DIWLcv680KtKWG7eM6XV2jG2uvXhbfS+qQP/Onqc1TeqdcFWbPj4PR9eVF3CF0xdrm+B07JMfa7MKT1grhkwY17soEMHT6kGLR1xllwb/0pyx7eeYy8ciwssfeH69hMLGto/HuR3ji3J2m3O/mJMzHXyec+2iU3jPx+TgX//p2mDS9ffK5RNORD70vttj4M2tlk1dFTH4lJfnna7RDrg5rOtH7YHHgi2vDt0XOWgG68v3UXHz3yRuzlhWt9572Der+LaFm7PGb017SHumsN3ZoR1TsHubY/Mej1ub8WgIcNStu0ZufbKK306d4w46YwNDTzTPntHQlthsOYNdcIxz/SoriH186nJp0uR8/4JoeNGFw==
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
eNrtWktv29gV7nTXrLrorhuWKDBAIcqk+BDlIChky3bkp2TJ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3Jze7kY+2V7+ZvVZNnvotshiq+j0XBVNHOhhkoDi5xCH1ZD3OJ3CbfQy4hf7CuQlC2XWgG/jk+5hd7fAnMLP93684r+BlfAX6ElR1kQvuZm3Pl/vqIXt4PbsCcatGhckvbkDhNMQuAI856wAzuHaLRF1dfFlztzSRE32suD5HaxyCe9vtG+143XdrJocsLme33CJqtq4z1ho/5Aehn3CgUeWxny2FsZhqbLmqGrctbOmma+kDMKumxi3UB5U7U15esesCnozfK2ubO9KO8rGeewoKxUtPmFBt5uYtSs7Tf3ijrL7HubbLV90dlTnzYeM1vZ1kK2024f1sne1rYvb9DtI229GhurzYN1z9AtY7u7vTYf5/feZs32USd/s7Cc99TArajVcqVW2inuLgY7S92b1Tgf6mypfVTJ1F/1gI06pgM27Zs7tbJ3cxdyRffIas8X15fNVb+17ShbOS1j2XiR0I3DNWKi3RElqJr+vTxgU8g5hmPks+ZzWk7GVxywacjxTc3Yrqxsvx3v69pKCRXr3cbRXvmb1RzqD6fldFU0c6GGW9jzRE6xC07gtSiv6Ke4NTsIwS12H3MLnfG81HWDeLLQcefxDX6jfazvk64g/nG9T7qC0Mf2PukKYh/z+6Sr6PjcVvRjfZ90BeGP8X3S1UN/g1uzV0AaXsG/yW+0R269wSZ7mslGlh/sFseFLe6E6V8p8Gp6DyN+N7O0lfz5C7dlPbG5xQ5SEMZtUS8EDs+7OdpwCccdzAYmkzKPwz1dhCdd68nLGp6wL7oc53izO/F5DrEvIG7tnuH31SS/7+XqETJ5LmcjnndydQ9ROmnh8Bn4HB+3hEltjss7frMdJs2AX8PTgONzxiZGMXOd2JucvZx0sSZnLydnLydn0H6QwL/F/2nwf6qPfN4=
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
eNrtGUtv48Y52566pxZo7wRRoEAhyqRIPQ0fbMn2yrt+wLLX6yaGMBoOHzbF4c4MtZIXOnTbe8Ggf6C7jpwYziZBgjZJm557KHr3HvIj8gv6DSXFcuzEmyYBspV1oEjN937z05PjDmHcp+Gt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9ki/e0XJjCJV6h9L0v8VoFExMzVyIFU7dIkeAiKkFCWUbZcFp6yfraJd53Xw6VTcPWi1cvh37xn28YzvhaDuWKG739Bw3WoW59YeX+fuPh1v4rtByCKeaH2My8IpY5N0MdBqfp1FzOP1Or+/nAP5X6Z6bW8T0aT63uHupMb8anr603+T51bpdrihu3T5vbUWhPre5yHze9g920ah6HU/sm409vhc9OleIv8XcTFzS66o+m/wIqRUf9
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
eNrtWUFz28YVjtube2gP7R2D6alDQABBACQ1OkiUZMuVREmkHFmWhrMEFgREAAthF5QojQ51e+8g0z+QWJFSjeIkk0ybpE3PPfTYi3zIP8ilv6BvQVIiK9tKMs4kKcUDCWDfvn3f997ue3h8ctrBMfVIeOfcCxmOkcXghr715DTGuwmm7A8nAWYusY9XqrX60yT2Ln7jMhbR8sQEijyZRDhEnmyRYKKjTlguYhNwHfk4U3PcJHb3+Z3tQzHAlKIWpmJZeHwoWgTWChnciHswRfCowFws7GEEP7HghQJ1xJwgxsTHXCihOBaPtuFJQGzs80etiEmarEssiZuEy4bwVIVfymKMArhhcYLhnuEgAlwgx1UpssmfEeL3TWHdKFvCScIMOld1eV0WDsUQBZkAxSi2XD5sY2rFXtSXECvI9wVGBJrETh9GU+ZyEYphLpBKM0VRDGTFzMO9W2A37mZXAxPAci9siUdHHDmw78XY5kb2RTn8gShp7mCLgejR9tGpi5ENi/zx2CWUpc9G3fIBsiwMXOHQIjaoT99vHXhRTrCx4yOGz8AVIc7QpmdtjCMJ+V4Hn/RmpR+iKPI9C/HxiR1KwvO+6yRuyfXhM+4pCRwdsvSzadoNrSpYMr0wsdKFIAoFVS4UZeXDfYky5IU+BIXkIzDqJMrG/zY8ECGrDZqkfoCmJ73Jz4ZlCE3fXUJWtTaikjsqfRfFgVH4ePh5nITMC3B6Wlm5vlx/8Go5TVZVufTRiGKOKH0/+yln3x7564gSzOKuZBHQlb6tPBuQ5eOwxdz0qVYovRdjGsHWwL8/g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S73PWI4wyH8gkA9PR0s7GwvrtxZM2Orko5YDDn79759edDut1umGzdbhuu4LHq3Hl5s6HC6xY/SBYbm3rOdiUD3Z3N3fb24PHMtipA4arVqnb9lzVqhG7aBXtok3WPH8Yxjsd5fhVFa8UB6pTvv+x61rifnvzsAcDa1h0ltfa3v5dtz7UnX16p7LPBvFgZytkc4uH27v3wwUKC2yvtnJns7okdwPm9vE0VPvN0ryByciRb3NaIwRrhEwqpHJeIfOGN2bQLF7th/PGKvb3lgiG80Y7gwn4TUNocw3NDSng7C/IINnjXnNjbWVV1pyE8+0V7h3W6OJwdf+g5fPlrf7NjTVh7ZRtVluSSSQvQXAsh1hTDnOWUx/n4YXrP9Grrx6QyyVPWtFkkI2EVIL3esdtiLGK0hMWyMTD1h7D8eIy2VrYSV+7llvF/KoxsHvlylyX3NreGtEAk2mPpa/8StNsOE7FnDdC2qzPOZY1nmu/P86ST/S/e/evHtW0YTwxuWc2zGwIMhyBZCGJhbt+l7ZWHjgfVla39tmQ3nWGor6ws7xlFkzZfYxtZapRvBibxXHjQYFsBGpAmxfwCucz7/LII9gVkCmmVx21cMDs4QDtaI5jsmHiHKNJoLOFodIQdnroM8QRup7t3Ys6tTJ4NdqtOizb05eojIMa5zQXHhyYDauARgJNzcaT6Qw2KXYpLBSRmf1xmpt4E0MvURT9E0kQPC2YgexjV+uqyYOCiZtz5XfwYDgMp1KPnt648csheIFr2x+aOaJrERkenjZndD0j7UPOaAYjfAXPGc1gpHjOaBYjJJAjytvRz2WEYjmjWS17/BtOTmkGJfzfJ4d0PaTf5YBmZNFD8TAfbDMg3QRGE5UX28zZlr9FzkK0T0XmXI5pxpukzBHNQNTN+9EsRDQnNGv6mzmi6xFFdD9HdD0ionJC1xPiLMi79QxGD833ckRvQTSbiam0jMxLVD5aam3cenTjxg8QdyN4
+1 -1
View File
@@ -19,7 +19,7 @@ LangGraph has a [persistence layer](https://langchain-ai.github.io/langgraph/con
### Streaming
LangGraph also provides support for [streaming](../how-tos/index.md#streaming) workflow / agent state to the user (or developer) over the course of execution. LangGraph supports streaming of both events ([such as feedback from a tool call](../how-tos/stream-updates.ipynb)) and [tokens from LLM calls](../how-tos/streaming-tokens.ipynb) embedded in an application.
LangGraph also provides support for [streaming](../how-tos/index.md#streaming) workflow / agent state to the user (or developer) over the course of execution. LangGraph supports streaming of both events ([such as feedback from a tool call](../how-tos/streaming.md#updates)) and [tokens from LLM calls](../how-tos/streaming-tokens.md) embedded in an application.
### Debugging and Deployment
+6 -6
View File
@@ -7,11 +7,11 @@ LangGraph is built with first class support for streaming. There are several dif
`.stream` and `.astream` are sync and async methods for streaming back outputs from a graph run.
There are several different modes you can specify when calling these methods (e.g. `graph.stream(..., mode="...")):
- [`"values"`](../how-tos/stream-values.ipynb): This streams the full value of the state after each step of the graph.
- [`"updates"`](../how-tos/stream-updates.ipynb): This streams the updates to the state after each step of the graph. If multiple updates are made in the same step (e.g. multiple nodes are run) then those updates are streamed separately.
- [`"custom"`](../how-tos/streaming-content.ipynb): This streams custom data from inside your graph nodes.
- [`"messages"`](../how-tos/streaming-tokens.ipynb): This streams LLM tokens and metadata for the graph node where LLM is invoked.
- `"debug"`: This streams as much information as possible throughout the execution of the graph.
- [`"values"`](../how-tos/streaming.md#values): This streams the full value of the state after each step of the graph.
- [`"updates"`](../how-tos/streaming.md#updates): This streams the updates to the state after each step of the graph. If multiple updates are made in the same step (e.g. multiple nodes are run) then those updates are streamed separately.
- [`"custom"`](../how-tos/streaming.md#custom): This streams custom data from inside your graph nodes.
- [`"messages"`](../how-tos/streaming-tokens.md): This streams LLM tokens and metadata for the graph node where LLM is invoked.
- [`"debug"`](../how-tos/streaming.md#debug): This streams as much information as possible throughout the execution of the graph.
You can also specify multiple streaming modes at the same time by passing them as a list. When you do this, the streamed outputs will be tuples `(stream_mode, data)`. For example:
@@ -145,7 +145,7 @@ guide for that [here](../how-tos/streaming-tokens.ipynb).
!!! warning "ASYNC IN PYTHON<=3.10"
You may fail to see events being emitted from inside a node when using `.astream_events` in Python <= 3.10. If you're using a Langchain RunnableLambda, a RunnableGenerator, or Tool asynchronously inside your node, you will have to propagate callbacks to these objects manually. This is because LangChain cannot automatically propagate callbacks to child objects in this case. Please see examples [here](../how-tos/streaming-content.ipynb) and [here](../how-tos/streaming-events-from-within-tools.ipynb).
You may fail to see events being emitted from inside a node when using `.astream_events` in Python <= 3.10. If you're using a Langchain RunnableLambda, a RunnableGenerator, or Tool asynchronously inside your node, you will have to propagate callbacks to these objects manually. This is because LangChain cannot automatically propagate callbacks to child objects in this case. Please see examples [here](../how-tos/streaming-tokens.md) and [here](../how-tos/streaming-events-from-within-tools.md).
## LangGraph Platform
+3 -8
View File
@@ -81,15 +81,10 @@ See the below guides for how-to implement human-in-the-loop workflows with the (
[Streaming](../concepts/streaming.md) is crucial for enhancing the responsiveness of applications built on LLMs. By displaying output progressively, even before a complete response is ready, streaming significantly improves user experience (UX), particularly when dealing with the latency of LLMs.
- [How to stream full state of your graph](stream-values.ipynb)
- [How to stream state updates of your graph](stream-updates.ipynb)
- [How to stream](streaming.ipynb)
- [How to stream LLM tokens](streaming-tokens.ipynb)
- [How to stream LLM tokens without LangChain models](streaming-tokens-without-langchain.ipynb)
- [How to stream custom data](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 within a tool without LangChain models](streaming-events-from-within-tools-without-langchain.ipynb)
- [How to stream events from the final node](streaming-from-final-node.ipynb)
- [How to stream LLM tokens from specific nodes](streaming-specific-nodes.ipynb)
- [How to stream data from within a tool](streaming-events-from-within-tools.ipynb)
- [How to stream from subgraphs](streaming-subgraphs.ipynb)
- [How to disable streaming for models that don't support it](disable-streaming.ipynb)
-186
View File
@@ -1,186 +0,0 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "3631f2b9-aa79-472e-a9d6-9125a90ee704",
"metadata": {},
"source": [
"# How to stream state updates of your graph"
]
},
{
"cell_type": "markdown",
"id": "858c7499-0c92-40a9-bd95-e5a5a5817e92",
"metadata": {},
"source": [
"LangGraph supports multiple streaming modes. The main ones are:\n",
"\n",
"- `values`: This streaming mode streams back values of the graph. This is the **full state of the graph** after each node is called.\n",
"- `updates`: This streaming mode streams back updates to the graph. This is the **update to the state of the graph** after each node is called.\n",
"\n",
"This guide covers `stream_mode=\"updates\"`."
]
},
{
"cell_type": "markdown",
"id": "7c2f84f1-0751-4779-97d4-5cbb286093b7",
"metadata": {},
"source": [
"## Setup\n",
"\n",
"First, let's install the required package and set our API keys"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "6b4285e4-7434-4971-bde0-aabceef8ee7e",
"metadata": {},
"outputs": [],
"source": [
"%%capture --no-stderr\n",
"%pip install -U langgraph langchain-openai langchain-community"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f7f9f24a-e3d0-422b-8924-47950b2facd6",
"metadata": {},
"outputs": [],
"source": [
"import getpass\n",
"import os\n",
"\n",
"\n",
"def _set_env(var: str):\n",
" if not os.environ.get(var):\n",
" os.environ[var] = getpass.getpass(f\"{var}: \")\n",
"\n",
"\n",
"_set_env(\"OPENAI_API_KEY\")"
]
},
{
"cell_type": "markdown",
"id": "cc6c48fe",
"metadata": {},
"source": [
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Set up <a href=\"https://smith.langchain.com\">LangSmith</a> for LangGraph development</p>\n",
" <p style=\"padding-top: 5px;\">\n",
" Sign up for LangSmith to quickly spot issues and improve the performance of your LangGraph projects. LangSmith lets you use trace data to debug, test, and monitor your LLM apps built with LangGraph — read more about how to get started <a href=\"https://docs.smith.langchain.com\">here</a>. \n",
" </p>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "2e7777f9",
"metadata": {},
"source": [
"## Define the graph\n",
"\n",
"We'll be using a simple ReAct agent for this guide."
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "85cf2e23-29f2-40cc-b302-5377b3b49da9",
"metadata": {},
"outputs": [],
"source": [
"from typing import Literal\n",
"from langchain_community.tools.tavily_search import TavilySearchResults\n",
"from langchain_core.runnables import ConfigurableField\n",
"from langchain_core.tools import tool\n",
"from langchain_openai import ChatOpenAI\n",
"from langgraph.prebuilt import create_react_agent\n",
"\n",
"\n",
"@tool\n",
"def get_weather(city: Literal[\"nyc\", \"sf\"]):\n",
" \"\"\"Use this to get weather information.\"\"\"\n",
" if city == \"nyc\":\n",
" return \"It might be cloudy in nyc\"\n",
" elif city == \"sf\":\n",
" return \"It's always sunny in sf\"\n",
" else:\n",
" raise AssertionError(\"Unknown city\")\n",
"\n",
"\n",
"tools = [get_weather]\n",
"\n",
"model = ChatOpenAI(model_name=\"gpt-4o\", temperature=0)\n",
"graph = create_react_agent(model, tools)"
]
},
{
"cell_type": "markdown",
"id": "956db549-5207-4be1-a823-78311738e3f8",
"metadata": {},
"source": [
"## Stream updates"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "e9e9ffb0-2cd5-466f-b70b-b6ed51b852d1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Receiving update from node: 'agent'\n",
"{'messages': [AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_kc6cvcEkTAUGRlSHrP4PK9fn', 'function': {'arguments': '{\"city\":\"sf\"}', 'name': 'get_weather'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 14, 'prompt_tokens': 57, 'total_tokens': 71}, 'model_name': 'gpt-4o-2024-05-13', 'system_fingerprint': 'fp_3e7d703517', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-cd68b3a0-86c3-4afa-9649-1b962a0dd062-0', tool_calls=[{'name': 'get_weather', 'args': {'city': 'sf'}, 'id': 'call_kc6cvcEkTAUGRlSHrP4PK9fn'}], usage_metadata={'input_tokens': 57, 'output_tokens': 14, 'total_tokens': 71})]}\n",
"\n",
"\n",
"\n",
"Receiving update from node: 'tools'\n",
"{'messages': [ToolMessage(content=\"It's always sunny in sf\", name='get_weather', tool_call_id='call_kc6cvcEkTAUGRlSHrP4PK9fn')]}\n",
"\n",
"\n",
"\n",
"Receiving update from node: 'agent'\n",
"{'messages': [AIMessage(content='The weather in San Francisco is currently sunny.', response_metadata={'token_usage': {'completion_tokens': 10, 'prompt_tokens': 84, 'total_tokens': 94}, 'model_name': 'gpt-4o-2024-05-13', 'system_fingerprint': 'fp_3e7d703517', 'finish_reason': 'stop', 'logprobs': None}, id='run-009d83c4-b874-4acc-9494-20aba43132b9-0', usage_metadata={'input_tokens': 84, 'output_tokens': 10, 'total_tokens': 94})]}\n",
"\n",
"\n",
"\n"
]
}
],
"source": [
"inputs = {\"messages\": [(\"human\", \"what's the weather in sf\")]}\n",
"async for chunk in graph.astream(inputs, stream_mode=\"updates\"):\n",
" for node, values in chunk.items():\n",
" print(f\"Receiving update from node: '{node}'\")\n",
" print(values)\n",
" print(\"\\n\\n\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
-248
View File
@@ -1,248 +0,0 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "3631f2b9-aa79-472e-a9d6-9125a90ee704",
"metadata": {},
"source": [
"# How to stream full state of your graph"
]
},
{
"cell_type": "markdown",
"id": "858c7499-0c92-40a9-bd95-e5a5a5817e92",
"metadata": {},
"source": [
"LangGraph supports multiple streaming modes. The main ones are:\n",
"\n",
"- `values`: This streaming mode streams back values of the graph. This is the **full state of the graph** after each node is called.\n",
"- `updates`: This streaming mode streams back updates to the graph. This is the **update to the state of the graph** after each node is called.\n",
"\n",
"This guide covers `stream_mode=\"values\"`."
]
},
{
"cell_type": "markdown",
"id": "7c2f84f1-0751-4779-97d4-5cbb286093b7",
"metadata": {},
"source": [
"## Setup\n",
"\n",
"First, let's install the required packages and set our API keys"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "6b4285e4-7434-4971-bde0-aabceef8ee7e",
"metadata": {},
"outputs": [],
"source": [
"%%capture --no-stderr\n",
"%pip install -U langgraph langchain-openai langchain-community"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f7f9f24a-e3d0-422b-8924-47950b2facd6",
"metadata": {},
"outputs": [],
"source": [
"import getpass\n",
"import os\n",
"\n",
"\n",
"def _set_env(var: str):\n",
" if not os.environ.get(var):\n",
" os.environ[var] = getpass.getpass(f\"{var}: \")\n",
"\n",
"\n",
"_set_env(\"OPENAI_API_KEY\")"
]
},
{
"cell_type": "markdown",
"id": "eaaab1fc",
"metadata": {},
"source": [
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Set up <a href=\"https://smith.langchain.com\">LangSmith</a> for LangGraph development</p>\n",
" <p style=\"padding-top: 5px;\">\n",
" Sign up for LangSmith to quickly spot issues and improve the performance of your LangGraph projects. LangSmith lets you use trace data to debug, test, and monitor your LLM apps built with LangGraph — read more about how to get started <a href=\"https://docs.smith.langchain.com\">here</a>. \n",
" </p>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "7939a3c5",
"metadata": {},
"source": [
"## Define the graph\n",
"\n",
"We'll be using a simple ReAct agent for this guide."
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "ef5a3ec6-0cd0-4541-ab1b-d63ede22720e",
"metadata": {},
"outputs": [],
"source": [
"from typing import Literal\n",
"from langchain_community.tools.tavily_search import TavilySearchResults\n",
"from langchain_core.runnables import ConfigurableField\n",
"from langchain_core.tools import tool\n",
"from langchain_openai import ChatOpenAI\n",
"from langgraph.prebuilt import create_react_agent\n",
"\n",
"\n",
"@tool\n",
"def get_weather(city: Literal[\"nyc\", \"sf\"]):\n",
" \"\"\"Use this to get weather information.\"\"\"\n",
" if city == \"nyc\":\n",
" return \"It might be cloudy in nyc\"\n",
" elif city == \"sf\":\n",
" return \"It's always sunny in sf\"\n",
" else:\n",
" raise AssertionError(\"Unknown city\")\n",
"\n",
"\n",
"tools = [get_weather]\n",
"\n",
"model = ChatOpenAI(model_name=\"gpt-4o\", temperature=0)\n",
"graph = create_react_agent(model, tools)"
]
},
{
"cell_type": "markdown",
"id": "002a715b-e0be-4e89-8d42-f0098882586b",
"metadata": {},
"source": [
"## Stream values"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "e9e9ffb0-2cd5-466f-b70b-b6ed51b852d1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"================================\u001b[1m Human Message \u001b[0m=================================\n",
"\n",
"what's the weather in sf\n",
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
"Tool Calls:\n",
" get_weather (call_61VvIzqVGtyxcXi0z6knZkjZ)\n",
" Call ID: call_61VvIzqVGtyxcXi0z6knZkjZ\n",
" Args:\n",
" city: sf\n",
"=================================\u001b[1m Tool Message \u001b[0m=================================\n",
"Name: get_weather\n",
"\n",
"It's always sunny in sf\n",
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
"\n",
"The weather in San Francisco is currently sunny.\n"
]
}
],
"source": [
"inputs = {\"messages\": [(\"human\", \"what's the weather in sf\")]}\n",
"async for chunk in graph.astream(inputs, stream_mode=\"values\"):\n",
" chunk[\"messages\"][-1].pretty_print()"
]
},
{
"cell_type": "markdown",
"id": "d73de237-bf45-4fa7-93ef-6dae7eacffc0",
"metadata": {},
"source": [
"If we want to just get the final result, we can use the same method and just keep track of the last value we received"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "c122bf15-a489-47bf-b482-a744a54e2cc4",
"metadata": {},
"outputs": [],
"source": [
"inputs = {\"messages\": [(\"human\", \"what's the weather in sf\")]}\n",
"async for chunk in graph.astream(inputs, stream_mode=\"values\"):\n",
" final_result = chunk"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "316022e5-4c65-48e4-9878-8d94a2425ed4",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'messages': [HumanMessage(content=\"what's the weather in sf\", id='54b39b6f-054b-4306-980b-86905e48a6bc'),\n",
" AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_avoKnK8reERzTUSxrN9cgFxY', 'function': {'arguments': '{\"city\":\"sf\"}', 'name': 'get_weather'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 14, 'prompt_tokens': 57, 'total_tokens': 71}, 'model_name': 'gpt-4o-2024-05-13', 'system_fingerprint': 'fp_5e6c71d4a8', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-f2f43c89-2c96-45f4-975c-2d0f22d0d2d1-0', tool_calls=[{'name': 'get_weather', 'args': {'city': 'sf'}, 'id': 'call_avoKnK8reERzTUSxrN9cgFxY'}], usage_metadata={'input_tokens': 57, 'output_tokens': 14, 'total_tokens': 71}),\n",
" ToolMessage(content=\"It's always sunny in sf\", name='get_weather', id='fc18a798-c7b2-4f73-84fa-8ffdffb6ddcb', tool_call_id='call_avoKnK8reERzTUSxrN9cgFxY'),\n",
" AIMessage(content='The weather in San Francisco is currently sunny. Enjoy the sunshine!', response_metadata={'token_usage': {'completion_tokens': 14, 'prompt_tokens': 84, 'total_tokens': 98}, 'model_name': 'gpt-4o-2024-05-13', 'system_fingerprint': 'fp_5e6c71d4a8', 'finish_reason': 'stop', 'logprobs': None}, id='run-21418147-da8e-4738-a076-239377397c40-0', usage_metadata={'input_tokens': 84, 'output_tokens': 14, 'total_tokens': 98})]}"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"final_result"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "0f64ebbe-535c-4b35-a95f-0a7490cfed90",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
"\n",
"The weather in San Francisco is currently sunny. Enjoy the sunshine!\n"
]
}
],
"source": [
"final_result[\"messages\"][-1].pretty_print()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
-346
View File
@@ -1,346 +0,0 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "15c4bd28",
"metadata": {},
"source": [
"# How to stream custom data\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li> \n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/streaming/\">\n",
" Streaming\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#astream_events\">\n",
" astream_events API\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models/\">\n",
" Chat Models\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#tools\">\n",
" Tools\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div>\n",
"\n",
"The most common use case for streaming from inside a node is to stream LLM tokens, but you may also want to stream custom data.\n",
"\n",
"For example, if you have a long-running tool call, you can dispatch custom events between the steps and use these custom events to monitor progress. You could also surface these custom events to an end user of your application to show them how the current task is progressing.\n",
"\n",
"You can do so in two ways:\n",
"* using graph's `.stream` / `.astream` methods with `stream_mode=\"custom\"`\n",
"* emitting custom events using [adispatch_custom_events](https://python.langchain.com/docs/how_to/callbacks_custom_events/).\n",
"\n",
"Below we'll see how to use both APIs.\n",
"\n",
"## Setup\n",
"\n",
"First, let's install our required packages"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "e1a20f31",
"metadata": {},
"outputs": [],
"source": [
"%%capture --no-stderr\n",
"%pip install -U langgraph"
]
},
{
"cell_type": "markdown",
"id": "12297071",
"metadata": {},
"source": [
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Set up <a href=\"https://smith.langchain.com\">LangSmith</a> for LangGraph development</p>\n",
" <p style=\"padding-top: 5px;\">\n",
" Sign up for LangSmith to quickly spot issues and improve the performance of your LangGraph projects. LangSmith lets you use trace data to debug, test, and monitor your LLM apps built with LangGraph — read more about how to get started <a href=\"https://docs.smith.langchain.com\">here</a>. \n",
" </p>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "29814253-ca9b-4844-a8a5-d6b19fbdbdba",
"metadata": {},
"source": [
"## Stream custom data using `.stream / .astream`"
]
},
{
"cell_type": "markdown",
"id": "b729644a-b65f-4e69-ad45-f2e88ffb4e9d",
"metadata": {},
"source": [
"### Define the graph"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "9731c40f-5ce7-460d-b2ad-33185529c99d",
"metadata": {},
"outputs": [],
"source": [
"from langchain_core.messages import AIMessage\n",
"from langgraph.graph import START, StateGraph, MessagesState, END\n",
"from langgraph.types import StreamWriter\n",
"\n",
"\n",
"async def my_node(\n",
" state: MessagesState,\n",
" writer: StreamWriter, # <-- provide StreamWriter to write chunks to be streamed\n",
"):\n",
" chunks = [\n",
" \"Four\",\n",
" \"score\",\n",
" \"and\",\n",
" \"seven\",\n",
" \"years\",\n",
" \"ago\",\n",
" \"our\",\n",
" \"fathers\",\n",
" \"...\",\n",
" ]\n",
" for chunk in chunks:\n",
" # write the chunk to be streamed using stream_mode=custom\n",
" writer(chunk)\n",
"\n",
" return {\"messages\": [AIMessage(content=\" \".join(chunks))]}\n",
"\n",
"\n",
"# Define a new graph\n",
"workflow = StateGraph(MessagesState)\n",
"\n",
"workflow.add_node(\"model\", my_node)\n",
"workflow.add_edge(START, \"model\")\n",
"workflow.add_edge(\"model\", END)\n",
"\n",
"app = workflow.compile()"
]
},
{
"cell_type": "markdown",
"id": "ecd69eed-9624-4640-b0af-c9f82b190900",
"metadata": {},
"source": [
"### Stream content"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "00a91b15-82c7-443c-acb6-a7406df15cee",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Four\n",
"score\n",
"and\n",
"seven\n",
"years\n",
"ago\n",
"our\n",
"fathers\n",
"...\n"
]
}
],
"source": [
"from langchain_core.messages import HumanMessage\n",
"\n",
"inputs = [HumanMessage(content=\"What are you thinking about?\")]\n",
"async for chunk in app.astream({\"messages\": inputs}, stream_mode=\"custom\"):\n",
" print(chunk, flush=True)"
]
},
{
"cell_type": "markdown",
"id": "c7b9f1f0-c170-40dc-9c22-289483dfbc99",
"metadata": {},
"source": [
"You will likely need to use [multiple streaming modes](https://langchain-ai.github.io/langgraph/how-tos/stream-multiple/) as you will\n",
"want access to both the custom data and the state updates."
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "f8ed22d4-6ce6-4b04-a68b-2ea516e3ab15",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"('custom', 'Four')\n",
"('custom', 'score')\n",
"('custom', 'and')\n",
"('custom', 'seven')\n",
"('custom', 'years')\n",
"('custom', 'ago')\n",
"('custom', 'our')\n",
"('custom', 'fathers')\n",
"('custom', '...')\n",
"('updates', {'model': {'messages': [AIMessage(content='Four score and seven years ago our fathers ...', additional_kwargs={}, response_metadata={})]}})\n"
]
}
],
"source": [
"from langchain_core.messages import HumanMessage\n",
"\n",
"inputs = [HumanMessage(content=\"What are you thinking about?\")]\n",
"async for chunk in app.astream({\"messages\": inputs}, stream_mode=[\"custom\", \"updates\"]):\n",
" print(chunk, flush=True)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "ca976d6a-7c64-4603-8bb4-dee95428c33d",
"metadata": {},
"source": [
"## Stream custom data using `.astream_events`\n",
"\n",
"If you are already using graph's `.astream_events` method in your workflow, you can also stream custom data by emitting custom events using `adispatch_custom_event`\n",
"\n",
"<div class=\"admonition warning\">\n",
" <p class=\"admonition-title\">ASYNC IN PYTHON<=3.10</p>\n",
" <p>\n",
"\n",
"LangChain cannot automatically propagate configuration, including callbacks necessary for `astream_events()`, to child runnables if you are running async code in python<=3.10. This is a common reason why you may fail to see events being emitted from custom runnables or tools.\n",
"\n",
"If you are running python<=3.10, you will need to manually propagate the `RunnableConfig` object to the child runnable in async environments. For an example of how to manually propagate the config, see the implementation of the node below with `adispatch_custom_event`.\n",
"\n",
"If you are running python>=3.11, the `RunnableConfig` will automatically propagate to child runnables in async environment. However, it is still a good idea to propagate the `RunnableConfig` manually if your code may run in other Python versions.\n",
" </p>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "b390a9fe-2d5f-4e82-a1ea-c7c0186b8559",
"metadata": {},
"source": [
"### Define the graph"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "486a01a0",
"metadata": {},
"outputs": [],
"source": [
"from langchain_core.runnables import RunnableConfig, RunnableLambda\n",
"from langchain_core.callbacks.manager import adispatch_custom_event\n",
"\n",
"\n",
"async def my_node(state: MessagesState, config: RunnableConfig):\n",
" chunks = [\n",
" \"Four\",\n",
" \"score\",\n",
" \"and\",\n",
" \"seven\",\n",
" \"years\",\n",
" \"ago\",\n",
" \"our\",\n",
" \"fathers\",\n",
" \"...\",\n",
" ]\n",
" for chunk in chunks:\n",
" await adispatch_custom_event(\n",
" \"my_custom_event\",\n",
" {\"chunk\": chunk},\n",
" config=config, # <-- propagate config\n",
" )\n",
"\n",
" return {\"messages\": [AIMessage(content=\" \".join(chunks))]}\n",
"\n",
"\n",
"# Define a new graph\n",
"workflow = StateGraph(MessagesState)\n",
"\n",
"workflow.add_node(\"model\", my_node)\n",
"workflow.add_edge(START, \"model\")\n",
"workflow.add_edge(\"model\", END)\n",
"\n",
"app = workflow.compile()"
]
},
{
"cell_type": "markdown",
"id": "7dcded03-6776-405e-afae-005a3212d3e4",
"metadata": {},
"source": [
"### Stream content"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "ce773a40",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Four|score|and|seven|years|ago|our|fathers|...|"
]
}
],
"source": [
"from langchain_core.messages import HumanMessage\n",
"\n",
"inputs = [HumanMessage(content=\"What are you thinking about?\")]\n",
"async for event in app.astream_events({\"messages\": inputs}, version=\"v2\"):\n",
" tags = event.get(\"tags\", [])\n",
" if event[\"event\"] == \"on_custom_event\" and event[\"name\"] == \"my_custom_event\":\n",
" data = event[\"data\"]\n",
" if data:\n",
" print(data[\"chunk\"], end=\"|\", flush=True)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@@ -1,372 +0,0 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "18e6e213-b398-4a7e-b342-ba225e97b424",
"metadata": {},
"source": [
"# How to stream events from within a tool (without LangChain LLMs / tools)\n",
"\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li> \n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/streaming/\">\n",
" Streaming\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#astream_events\">\n",
" astream_events API\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models/\">\n",
" Chat Models\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#tools\">\n",
" Tools\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div>\n",
"\n",
"In this guide, we will demonstrate how to stream tokens from tools used by a custom ReAct agent, without relying on LangChains chat models or tool-calling functionalities. \n",
"\n",
"We will use the OpenAI client library directly for the chat model interaction. The tool execution will be implemented from scratch.\n",
"\n",
"This showcases how LangGraph can be utilized independently of built-in LangChain components like chat models or tools.\n",
"\n",
"## Setup\n",
"\n",
"First, let's install the required packages and set our API keys"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "47f79af8-58d8-4a48-8d9a-88823d88701f",
"metadata": {},
"outputs": [],
"source": [
"%%capture --no-stderr\n",
"%pip install -U langgraph openai"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "0cf6b41d-7fcb-40b6-9a72-229cdd00a094",
"metadata": {},
"outputs": [],
"source": [
"import getpass\n",
"import os\n",
"\n",
"\n",
"def _set_env(var: str):\n",
" if not os.environ.get(var):\n",
" os.environ[var] = getpass.getpass(f\"{var}: \")\n",
"\n",
"\n",
"_set_env(\"OPENAI_API_KEY\")"
]
},
{
"cell_type": "markdown",
"id": "d8df7b58",
"metadata": {},
"source": [
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Set up <a href=\"https://smith.langchain.com\">LangSmith</a> for LangGraph development</p>\n",
" <p style=\"padding-top: 5px;\">\n",
" Sign up for LangSmith to quickly spot issues and improve the performance of your LangGraph projects. LangSmith lets you use trace data to debug, test, and monitor your LLM apps built with LangGraph — read more about how to get started <a href=\"https://docs.smith.langchain.com\">here</a>. \n",
" </p>\n",
"</div>"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "7d766c7d-34ea-455b-8bcb-f2f12d100e1d",
"metadata": {},
"source": [
"## Define the graph\n",
"\n",
"### Define a node that will call OpenAI API"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "d59234f9-173e-469d-a725-c13e0979663e",
"metadata": {},
"outputs": [],
"source": [
"from openai import AsyncOpenAI\n",
"from langchain_core.language_models.chat_models import ChatGenerationChunk\n",
"from langchain_core.messages import AIMessageChunk\n",
"from langchain_core.runnables.config import (\n",
" ensure_config,\n",
" get_callback_manager_for_config,\n",
")\n",
"\n",
"openai_client = AsyncOpenAI()\n",
"# define tool schema for openai tool calling\n",
"\n",
"tool = {\n",
" \"type\": \"function\",\n",
" \"function\": {\n",
" \"name\": \"get_items\",\n",
" \"description\": \"Use this tool to look up which items are in the given place.\",\n",
" \"parameters\": {\n",
" \"type\": \"object\",\n",
" \"properties\": {\"place\": {\"type\": \"string\"}},\n",
" \"required\": [\"place\"],\n",
" },\n",
" },\n",
"}\n",
"\n",
"\n",
"async def call_model(state, config=None):\n",
" config = ensure_config(config | {\"tags\": [\"agent_llm\"]})\n",
" callback_manager = get_callback_manager_for_config(config)\n",
" messages = state[\"messages\"]\n",
"\n",
" llm_run_manager = callback_manager.on_chat_model_start({}, [messages])[0]\n",
" response = await openai_client.chat.completions.create(\n",
" messages=messages, model=\"gpt-3.5-turbo\", tools=[tool], stream=True\n",
" )\n",
"\n",
" response_content = \"\"\n",
" role = None\n",
"\n",
" tool_call_id = None\n",
" tool_call_function_name = None\n",
" tool_call_function_arguments = \"\"\n",
" async for chunk in response:\n",
" delta = chunk.choices[0].delta\n",
" if delta.role is not None:\n",
" role = delta.role\n",
"\n",
" if delta.content:\n",
" response_content += delta.content\n",
" llm_run_manager.on_llm_new_token(delta.content)\n",
"\n",
" if delta.tool_calls:\n",
" # note: for simplicity we're only handling a single tool call here\n",
" if delta.tool_calls[0].function.name is not None:\n",
" tool_call_function_name = delta.tool_calls[0].function.name\n",
" tool_call_id = delta.tool_calls[0].id\n",
"\n",
" # note: we're wrapping the tools calls in ChatGenerationChunk so that the events from .astream_events in the graph can render tool calls correctly\n",
" tool_call_chunk = ChatGenerationChunk(\n",
" message=AIMessageChunk(\n",
" content=\"\",\n",
" additional_kwargs={\"tool_calls\": [delta.tool_calls[0].dict()]},\n",
" )\n",
" )\n",
" llm_run_manager.on_llm_new_token(\"\", chunk=tool_call_chunk)\n",
" tool_call_function_arguments += delta.tool_calls[0].function.arguments\n",
"\n",
" if tool_call_function_name is not None:\n",
" tool_calls = [\n",
" {\n",
" \"id\": tool_call_id,\n",
" \"function\": {\n",
" \"name\": tool_call_function_name,\n",
" \"arguments\": tool_call_function_arguments,\n",
" },\n",
" \"type\": \"function\",\n",
" }\n",
" ]\n",
" else:\n",
" tool_calls = None\n",
"\n",
" response_message = {\n",
" \"role\": role,\n",
" \"content\": response_content,\n",
" \"tool_calls\": tool_calls,\n",
" }\n",
" return {\"messages\": [response_message]}"
]
},
{
"cell_type": "markdown",
"id": "3a3877e8-8ace-40d5-ad04-cbf21c6f3250",
"metadata": {},
"source": [
"### Define our tools and a tool-calling node"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "b90941d8-afe4-42ec-9262-9c3b87c3b1ec",
"metadata": {},
"outputs": [],
"source": [
"import json\n",
"from langchain_core.callbacks import adispatch_custom_event\n",
"\n",
"\n",
"async def get_items(place: str) -> str:\n",
" \"\"\"Use this tool to look up which items are in the given place.\"\"\"\n",
"\n",
" # this can be replaced with any actual streaming logic that you might have\n",
" def stream(place: str):\n",
" if \"bed\" in place: # For under the bed\n",
" yield from [\"socks\", \"shoes\", \"dust bunnies\"]\n",
" elif \"shelf\" in place: # For 'shelf'\n",
" yield from [\"books\", \"penciles\", \"pictures\"]\n",
" else: # if the agent decides to ask about a different place\n",
" yield \"cat snacks\"\n",
"\n",
" tokens = []\n",
" for token in stream(place):\n",
" await adispatch_custom_event(\n",
" # this will allow you to filter events by name\n",
" \"tool_call_token_stream\",\n",
" {\n",
" \"function_name\": \"get_items\",\n",
" \"arguments\": {\"place\": place},\n",
" \"tool_output_token\": token,\n",
" },\n",
" # this will allow you to filter events by tags\n",
" config={\"tags\": [\"tool_call\"]},\n",
" )\n",
" tokens.append(token)\n",
"\n",
" return \", \".join(tokens)\n",
"\n",
"\n",
"# define mapping to look up functions when running tools\n",
"function_name_to_function = {\"get_items\": get_items}\n",
"\n",
"\n",
"async def call_tools(state):\n",
" messages = state[\"messages\"]\n",
"\n",
" tool_call = messages[-1][\"tool_calls\"][0]\n",
" function_name = tool_call[\"function\"][\"name\"]\n",
" function_arguments = tool_call[\"function\"][\"arguments\"]\n",
" arguments = json.loads(function_arguments)\n",
"\n",
" function_response = await function_name_to_function[function_name](**arguments)\n",
" tool_message = {\n",
" \"tool_call_id\": tool_call[\"id\"],\n",
" \"role\": \"tool\",\n",
" \"name\": function_name,\n",
" \"content\": function_response,\n",
" }\n",
" return {\"messages\": [tool_message]}"
]
},
{
"cell_type": "markdown",
"id": "6685898c-9a1c-4803-a492-bd70574ebe38",
"metadata": {},
"source": [
"### Define our graph"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "228260be-1f9a-4195-80e0-9604f8a5dba6",
"metadata": {},
"outputs": [],
"source": [
"import operator\n",
"from typing import Annotated, Literal\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langgraph.graph import StateGraph, END, START\n",
"\n",
"\n",
"class State(TypedDict):\n",
" messages: Annotated[list, operator.add]\n",
"\n",
"\n",
"def should_continue(state) -> Literal[\"tools\", END]:\n",
" messages = state[\"messages\"]\n",
" last_message = messages[-1]\n",
" if last_message[\"tool_calls\"]:\n",
" return \"tools\"\n",
" return END\n",
"\n",
"\n",
"workflow = StateGraph(State)\n",
"workflow.add_edge(START, \"model\")\n",
"workflow.add_node(\"model\", call_model) # i.e. our \"agent\"\n",
"workflow.add_node(\"tools\", call_tools)\n",
"workflow.add_conditional_edges(\"model\", should_continue)\n",
"workflow.add_edge(\"tools\", \"model\")\n",
"graph = workflow.compile()"
]
},
{
"cell_type": "markdown",
"id": "d046e2ef-f208-4831-ab31-203b2e75a49a",
"metadata": {},
"source": [
"## Stream tokens from within the tool\n",
"\n",
"Here, we'll use the `astream_events` API to stream back individual events. Please see [astream_events](https://python.langchain.com/docs/concepts/#astream_events) for more details."
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "45c96a79-4147-42e3-89fd-d942b2b49f6c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Tool token socks\n",
"Tool token shoes\n",
"Tool token dust bunnies\n"
]
}
],
"source": [
"async for event in graph.astream_events(\n",
" {\"messages\": [{\"role\": \"user\", \"content\": \"what's in the bedroom\"}]}, version=\"v2\"\n",
"):\n",
" tags = event.get(\"tags\", [])\n",
" if event[\"event\"] == \"on_custom_event\" and \"tool_call\" in tags:\n",
" print(\"Tool token\", event[\"data\"][\"tool_output_token\"])"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@@ -3,50 +3,82 @@
{
"attachments": {},
"cell_type": "markdown",
"id": "04b012ac-e0b5-483e-a645-d13d0e215aad",
"id": "695d935e-b4fe-45a6-a061-a66d32cb832b",
"metadata": {},
"source": [
"# How to stream data from within a tool\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li> \n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/streaming/\">\n",
" Streaming\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models/\">\n",
" Chat Models\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#tools\">\n",
" Tools\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://api.python.langchain.com/en/latest/runnables/langchain_core.runnables.config.RunnableConfig.html#langchain_core.runnables.config.RunnableConfig\">\n",
" RunnableConfig\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#runnable-interface\">\n",
" RunnableInterface\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div>\n",
"!!! info \"Prerequisites\"\n",
"\n",
"If your graph involves tools that invoke LLMs (or any other LangChain `Runnable` objects like other graphs, `LCEL` chains, or retrievers), you might want to surface partial results during the execution of the tool, especially if the tool takes a longer time to run.\n",
" This guide assumes familiarity with the following:\n",
" \n",
" - [Streaming](../../concepts/streaming/)\n",
" - [Chat Models](https://python.langchain.com/docs/concepts/chat_models/)\n",
" - [Tools](https://python.langchain.com/docs/concepts/tools/)\n",
"\n",
"A common scenario is streaming LLM tokens generated by a tool calling an LLM, though this applies to any use of Runnable objects. \n",
"If your graph calls tools that use LLMs or any other streaming APIs, you might want to surface partial results during the execution of the tool, especially if the tool takes a longer time to run.\n",
"\n",
"This guide shows how to stream data from within a tool using the `astream` API with `stream_mode=\"messages\"` and also the more granular `astream_events` API. The `astream` API should be sufficient for most use cases.\n",
"1. To stream **arbitrary** data from inside a tool you can use [`stream_mode=\"custom\"`](../streaming#custom) and `get_stream_writer()`:\n",
"\n",
" ```python\n",
" # highlight-next-line\n",
" from langgraph.config import get_stream_writer\n",
" \n",
" def tool(tool_arg: str):\n",
" writer = get_stream_writer()\n",
" for chunk in custom_data_stream():\n",
" # stream any arbitrary data\n",
" # highlight-next-line\n",
" writer(chunk)\n",
" ...\n",
" \n",
" for chunk in graph.stream(\n",
" inputs,\n",
" # highlight-next-line\n",
" stream_mode=\"custom\"\n",
" ):\n",
" print(chunk)\n",
" ```\n",
"\n",
"2. To stream LLM tokens generated by a tool calling an LLM you can use [`stream_mode=\"messages\"`](../streaming#messages):\n",
"\n",
" ```python\n",
" from langgraph.graph import StateGraph, MessagesState\n",
" from langchain_openai import ChatOpenAI\n",
" \n",
" model = ChatOpenAI()\n",
" \n",
" def tool(tool_arg: str):\n",
" model.invoke(tool_arg)\n",
" ...\n",
" \n",
" def call_tools(state: MessagesState):\n",
" tool_call = get_tool_call(state)\n",
" tool_result = tool(**tool_call[\"args\"])\n",
" ...\n",
" \n",
" graph = (\n",
" StateGraph(MessagesState)\n",
" .add_node(call_tools)\n",
" ...\n",
" .compile()\n",
" \n",
" for msg, metadata in graph.stream(\n",
" inputs,\n",
" # highlight-next-line\n",
" stream_mode=\"messages\"\n",
" ):\n",
" print(msg)\n",
" ```\n",
"\n",
"!!! note \"Using without LangChain\"\n",
"\n",
" If you need to stream data from inside tools **without using LangChain**, you can use [`stream_mode=\"custom\"`](../streaming/#custom). Check out the [example below](#example-without-langchain) to learn more.\n",
"\n",
"!!! warning \"Async in Python < 3.11\"\n",
" \n",
" When using Python < 3.11 with async code, please ensure you manually pass the `RunnableConfig` through to the chat model when invoking it like so: `model.ainvoke(..., config)`.\n",
" The stream method collects all events from your nested code using a streaming tracer passed as a callback. In 3.11 and above, this is automatically handled via [contextvars](https://docs.python.org/3/library/contextvars.html); prior to 3.11, [asyncio's tasks](https://docs.python.org/3/library/asyncio-task.html#asyncio.create_task) lacked proper `contextvar` support, meaning that the callbacks will only propagate if you manually pass the config through. We do this in the `call_model` function below.\n",
"\n",
"## Setup\n",
"\n",
@@ -55,8 +87,8 @@
},
{
"cell_type": "code",
"execution_count": 3,
"id": "47f79af8-58d8-4a48-8d9a-88823d88701f",
"execution_count": 1,
"id": "b364dfe2-010b-4588-8489-fb4d8be1f200",
"metadata": {},
"outputs": [],
"source": [
@@ -66,10 +98,18 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"id": "0cf6b41d-7fcb-40b6-9a72-229cdd00a094",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdin",
"output_type": "stream",
"text": [
"OPENAI_API_KEY: ········\n"
]
}
],
"source": [
"import getpass\n",
"import os\n",
@@ -98,77 +138,135 @@
},
{
"cell_type": "markdown",
"id": "e3d02ebb-c2e1-4ef7-b187-810d55139317",
"id": "b4ddc3ff-5620-48de-82f0-03b9137410cf",
"metadata": {},
"source": [
"## Define the graph\n",
"## Streaming custom data\n",
"\n",
"We'll use a prebuilt ReAct agent for this guide"
]
},
{
"cell_type": "markdown",
"id": "9378fd4a-69e4-49e2-b34c-a98a0505ea35",
"metadata": {},
"source": [
"<div class=\"admonition warning\">\n",
" <p class=\"admonition-title\">ASYNC IN PYTHON<=3.10</p>\n",
" <p>\n",
"Any Langchain `RunnableLambda`, a `RunnableGenerator`, or `Tool` that invokes other runnables and is running async in python<=3.10, will have to propagate callbacks to child objects **manually**. This is because LangChain cannot automatically propagate callbacks to child objects in this case.\n",
" \n",
"This is a common reason why you may fail to see events being emitted from custom runnables or tools.\n",
" </p>\n",
"</div>"
"We'll use a [prebuilt ReAct agent][langgraph.prebuilt.chat_agent_executor.create_react_agent] for this guide:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"id": "f1975577-a485-42bd-b0f1-d3e987faf52b",
"metadata": {},
"outputs": [],
"source": [
"from langchain_core.callbacks import Callbacks\n",
"from langchain_core.messages import HumanMessage\n",
"from langchain_core.tools import tool\n",
"from langchain_openai import ChatOpenAI\n",
"\n",
"from langgraph.prebuilt import create_react_agent\n",
"from langchain_openai import ChatOpenAI\n",
"from langgraph.config import get_stream_writer\n",
"\n",
"\n",
"@tool\n",
"async def get_items(\n",
" place: str,\n",
" callbacks: Callbacks, # <--- Manually accept callbacks (needed for Python <= 3.10)\n",
") -> str:\n",
" \"\"\"Use this tool to look up which items are in the given place.\"\"\"\n",
" # Attention when using async, you should be invoking the LLM using ainvoke!\n",
" # If you fail to do so, streaming will not WORK.\n",
" return await llm.ainvoke(\n",
" [\n",
" {\n",
" \"role\": \"user\",\n",
" \"content\": f\"Can you tell me what kind of items i might find in the following place: '{place}'. \"\n",
" \"List at least 3 such items separating them by a comma. And include a brief description of each item..\",\n",
" }\n",
" ],\n",
" {\"callbacks\": callbacks},\n",
" )\n",
"async def get_items(place: str) -> str:\n",
" \"\"\"Use this tool to list items one might find in a place you're asked about.\"\"\"\n",
" # highlight-next-line\n",
" writer = get_stream_writer()\n",
"\n",
" # this can be replaced with any actual streaming logic that you might have\n",
" items = [\"books\", \"penciles\", \"pictures\"]\n",
" for chunk in items:\n",
" # highlight-next-line\n",
" writer({\"custom_tool_data\": chunk})\n",
"\n",
" return \", \".join(items)\n",
"\n",
"\n",
"llm = ChatOpenAI(model_name=\"gpt-4o\")\n",
"llm = ChatOpenAI(model_name=\"gpt-4o-mini\")\n",
"tools = [get_items]\n",
"# contains `agent` (tool-calling LLM) and `tools` (tool executor) nodes\n",
"agent = create_react_agent(llm, tools=tools)"
]
},
{
"cell_type": "markdown",
"id": "15cb55cc-b59d-4743-b6a3-13db75414d2c",
"id": "fa96d572-d15f-4f00-b629-cf25e0b4dece",
"metadata": {},
"source": [
"## Using stream_mode=\"messages\"\n",
"Let's now invoke our agent with an input that requires a tool call:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "8ae5051c-53b9-4c53-87b2-d7263cda3b7b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'custom_tool_data': 'books'}\n",
"{'custom_tool_data': 'penciles'}\n",
"{'custom_tool_data': 'pictures'}\n"
]
}
],
"source": [
"inputs = {\n",
" \"messages\": [ # noqa\n",
" {\"role\": \"user\", \"content\": \"what items are in the office?\"}\n",
" ]\n",
"}\n",
"async for chunk in agent.astream(\n",
" inputs,\n",
" # highlight-next-line\n",
" stream_mode=\"custom\",\n",
"):\n",
" print(chunk)"
]
},
{
"cell_type": "markdown",
"id": "6d8fa9fc-19af-47d6-9031-ee1720c51aa2",
"metadata": {},
"source": [
"## Streaming LLM tokens"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "38eaf453-9773-424d-a110-9e1038a69805",
"metadata": {},
"outputs": [],
"source": [
"from langchain_core.messages import AIMessageChunk\n",
"from langchain_core.runnables import RunnableConfig\n",
"\n",
"Using `stream_mode=\"messages\"` is a good option if you don't have any complex LCEL logic inside of nodes (or you don't need super granular progress from within the LCEL chain)."
"\n",
"@tool\n",
"async def get_items(\n",
" place: str,\n",
" # Manually accept config (needed for Python <= 3.10)\n",
" # highlight-next-line\n",
" config: RunnableConfig,\n",
") -> str:\n",
" \"\"\"Use this tool to list items one might find in a place you're asked about.\"\"\"\n",
" # Attention: when using async, you should be invoking the LLM using ainvoke!\n",
" # If you fail to do so, streaming will NOT work.\n",
" response = await llm.ainvoke(\n",
" [\n",
" {\n",
" \"role\": \"user\",\n",
" \"content\": (\n",
" f\"Can you tell me what kind of items i might find in the following place: '{place}'. \"\n",
" \"List at least 3 such items separating them by a comma. And include a brief description of each item.\"\n",
" ),\n",
" }\n",
" ],\n",
" # highlight-next-line\n",
" config,\n",
" )\n",
" return response.content\n",
"\n",
"\n",
"tools = [get_items]\n",
"# contains `agent` (tool-calling LLM) and `tools` (tool executor) nodes\n",
"agent = create_react_agent(llm, tools=tools)"
]
},
{
@@ -176,78 +274,210 @@
"execution_count": 6,
"id": "4c9cdad3-3e9a-444f-9d9d-eae20b8d3486",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Certainly|!| Here| are| three| items| you| might| find| in| a| bedroom|:\n",
"\n",
"|1|.| **|Bed|**|:| The| central| piece| of| furniture| in| a| bedroom|,| typically| consisting| of| a| mattress| supported| by| a| frame|.| It| is| designed| for| sleeping| and| can| vary| in| size| from| twin| to| king|.| Beds| often| have| bedding|,| including| sheets|,| pillows|,| and| comfort|ers|,| to| enhance| comfort|.\n",
"\n",
"|2|.| **|D|resser|**|:| A| piece| of| furniture| with| drawers| used| for| storing| clothing| and| personal| items|.| Dress|ers| often| have| a| flat| surface| on| top|,| which| can| be| used| for| decorative| items|,| a| mirror|,| or| personal| accessories|.| They| help| keep| the| bedroom| organized| and| clutter|-free|.\n",
"\n",
"|3|.| **|Night|stand|**|:| A| small| table| or| cabinet| placed| beside| the| bed|,| used| for| holding| items| such| as| a| lamp|,| alarm| clock|,| books|,| or| personal| items|.| Night|stands| provide| convenience| for| easy| access| to| essentials| during| the| night|,| adding| functionality| and| style| to| the| bedroom| decor|.|"
]
}
],
"source": [
"final_message = \"\"\n",
"inputs = {\n",
" \"messages\": [ # noqa\n",
" {\"role\": \"user\", \"content\": \"what items are in the bedroom?\"}\n",
" ]\n",
"}\n",
"async for msg, metadata in agent.astream(\n",
" {\"messages\": [(\"human\", \"what items are on the shelf?\")]}, stream_mode=\"messages\"\n",
" inputs,\n",
" # highlight-next-line\n",
" stream_mode=\"messages\",\n",
"):\n",
" # Stream all messages from the tool node\n",
" if (\n",
" msg.content\n",
" and not isinstance(msg, HumanMessage)\n",
" isinstance(msg, AIMessageChunk)\n",
" and msg.content\n",
" # Stream all messages from the tool node\n",
" # highlight-next-line\n",
" and metadata[\"langgraph_node\"] == \"tools\"\n",
" and not msg.name\n",
" ):\n",
" print(msg.content, end=\"|\", flush=True)\n",
" # Final message should come from our agent\n",
" if msg.content and metadata[\"langgraph_node\"] == \"agent\":\n",
" final_message += msg.content"
" print(msg.content, end=\"|\", flush=True)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "81656193-1cbf-4721-a8df-0e316fd510e5",
"id": "d598d7e2-617d-4c06-bc9a-6a03d5f58499",
"metadata": {},
"source": [
"## Using stream events API\n",
"\n",
"For simplicity, the `get_items` tool doesn't use any complex LCEL logic inside it -- it only invokes an LLM.\n",
"\n",
"However, if the tool were more complex (e.g., using a RAG chain inside it), and you wanted to see more granular events from within the chain, then you can use the astream events API.\n",
"\n",
"The example below only illustrates how to invoke the API.\n",
"\n",
"<div class=\"admonition warning\">\n",
" <p class=\"admonition-title\">Use async for the astream events API</p>\n",
" <p>\n",
" You should generally be using `async` code (e.g., using `ainvoke` to invoke the llm) to be able to leverage the astream events API properly.\n",
" </p>\n",
"</div>"
"## Example without LangChain"
]
},
{
"cell_type": "markdown",
"id": "780ddcb6-63a7-4c83-a739-bafbe3cd135a",
"metadata": {},
"source": [
"You can also stream data from within tool invocations **without using LangChain**. Below example demonstrates how to do it for a graph with a single tool-executing node. We'll leave it as an exercise for the reader to [implement ReAct agent from scratch](../react-agent-from-scratch) without using LangChain."
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "c3acdec9-0a24-4348-921e-435c8ea6f9fe",
"id": "3e8be67f-4bb8-4f14-9fdb-fc60340f3930",
"metadata": {},
"outputs": [],
"source": [
"import operator\n",
"import json\n",
"\n",
"from typing import TypedDict\n",
"from typing_extensions import Annotated\n",
"from langgraph.graph import StateGraph, START\n",
"\n",
"from openai import AsyncOpenAI\n",
"\n",
"openai_client = AsyncOpenAI()\n",
"model_name = \"gpt-4o-mini\"\n",
"\n",
"\n",
"async def stream_tokens(model_name: str, messages: list[dict]):\n",
" response = await openai_client.chat.completions.create(\n",
" messages=messages, model=model_name, stream=True\n",
" )\n",
" role = None\n",
" async for chunk in response:\n",
" delta = chunk.choices[0].delta\n",
"\n",
" if delta.role is not None:\n",
" role = delta.role\n",
"\n",
" if delta.content:\n",
" yield {\"role\": role, \"content\": delta.content}\n",
"\n",
"\n",
"# this is our tool\n",
"async def get_items(place: str) -> str:\n",
" \"\"\"Use this tool to list items one might find in a place you're asked about.\"\"\"\n",
" # highlight-next-line\n",
" writer = get_stream_writer()\n",
" response = \"\"\n",
" async for msg_chunk in stream_tokens(\n",
" model_name,\n",
" [\n",
" {\n",
" \"role\": \"user\",\n",
" \"content\": (\n",
" \"Can you tell me what kind of items \"\n",
" f\"i might find in the following place: '{place}'. \"\n",
" \"List at least 3 such items separating them by a comma. \"\n",
" \"And include a brief description of each item.\"\n",
" ),\n",
" }\n",
" ],\n",
" ):\n",
" response += msg_chunk[\"content\"]\n",
" # highlight-next-line\n",
" writer(msg_chunk)\n",
"\n",
" return response\n",
"\n",
"\n",
"class State(TypedDict):\n",
" messages: Annotated[list[dict], operator.add]\n",
"\n",
"\n",
"# this is the tool-calling graph node\n",
"async def call_tool(state: State):\n",
" ai_message = state[\"messages\"][-1]\n",
" tool_call = ai_message[\"tool_calls\"][-1]\n",
"\n",
" function_name = tool_call[\"function\"][\"name\"]\n",
" if function_name != \"get_items\":\n",
" raise ValueError(f\"Tool {function_name} not supported\")\n",
"\n",
" function_arguments = tool_call[\"function\"][\"arguments\"]\n",
" arguments = json.loads(function_arguments)\n",
"\n",
" function_response = await get_items(**arguments)\n",
" tool_message = {\n",
" \"tool_call_id\": tool_call[\"id\"],\n",
" \"role\": \"tool\",\n",
" \"name\": function_name,\n",
" \"content\": function_response,\n",
" }\n",
" return {\"messages\": [tool_message]}\n",
"\n",
"\n",
"graph = (\n",
" StateGraph(State) # noqa\n",
" .add_node(call_tool)\n",
" .add_edge(START, \"call_tool\")\n",
" .compile()\n",
")"
]
},
{
"cell_type": "markdown",
"id": "4e712d12-841c-4eac-a4d8-d01c73c86c8c",
"metadata": {},
"source": [
"Let's now invoke our graph with an AI message that contains a tool call:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "2c30c7b4-62df-4855-8219-d5e1a1a09be9",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"|In| a| bedroom|,| you| might| find| the| following| items|:\n",
"Sure|!| Here| are| three| common| items| you| might| find| in| a| bedroom|:\n",
"\n",
"|1|.| **|Bed|**|:| The| central| piece| of| furniture| in| a| bedroom|,| typically| consisting| of| a| mattress| on| a| frame|,| where| people| sleep|.| It| often| includes| bedding| such| as| sheets|,| blankets|,| and| pillows| for| comfort|.\n",
"|1|.| **|Bed|**|:| The| focal| point| of| the| bedroom|,| a| bed| typically| consists| of| a| mattress| resting| on| a| frame|,| and| it| may| include| pillows| and| bedding|.| It| provides| a| comfortable| place| for| sleeping| and| resting|.\n",
"\n",
"|2|.| **|Ward|robe|**|:| A| large|,| tall| cupboard| or| fre|estanding| piece| of| furniture| used| for| storing| clothes|.| It| may| have| hanging| space|,| shelves|,| and| sometimes| drawers| for| organizing| garments| and| accessories|.\n",
"|2|.| **|D|resser|**|:| A| piece| of| furniture| with| multiple| drawers|,| a| dresser| is| used| for| storing| clothes|,| accessories|,| and| personal| items|.| It| often| has| a| flat| surface| that| may| be| used| to| display| decorative| items| or| a| mirror|.\n",
"\n",
"|3|.| **|Night|stand|**|:| A| small| table| or| cabinet| placed| beside| the| bed|,| used| for| holding| items| like| a| lamp|,| alarm| clock|,| books|,| or| personal| belongings| that| might| be| needed| during| the| night| or| early| morning|.||"
"|3|.| **|Night|stand|**|:| Also| known| as| a| bedside| table|,| a| night|stand| is| placed| next| to| the| bed| and| typically| holds| items| like| lamps|,| books|,| alarm| clocks|,| and| personal| belongings| for| convenience| during| the| night|.\n",
"\n",
"|These| items| contribute| to| the| functionality| and| comfort| of| the| bedroom| environment|.|"
]
}
],
"source": [
"from langchain_core.messages import HumanMessage\n",
"inputs = {\n",
" \"messages\": [\n",
" {\n",
" \"content\": None,\n",
" \"role\": \"assistant\",\n",
" \"tool_calls\": [\n",
" {\n",
" \"id\": \"1\",\n",
" \"function\": {\n",
" \"arguments\": '{\"place\":\"bedroom\"}',\n",
" \"name\": \"get_items\",\n",
" },\n",
" \"type\": \"function\",\n",
" }\n",
" ],\n",
" }\n",
" ]\n",
"}\n",
"\n",
"async for event in agent.astream_events(\n",
" {\"messages\": [{\"role\": \"user\", \"content\": \"what's in the bedroom.\"}]}, version=\"v2\"\n",
"async for chunk in graph.astream(\n",
" inputs,\n",
" # highlight-next-line\n",
" stream_mode=\"custom\",\n",
"):\n",
" if (\n",
" event[\"event\"] == \"on_chat_model_stream\"\n",
" and event[\"metadata\"].get(\"langgraph_node\") == \"tools\"\n",
" ):\n",
" print(event[\"data\"][\"chunk\"].content, end=\"|\", flush=True)"
" print(chunk[\"content\"], end=\"|\", flush=True)"
]
}
],
@@ -267,7 +497,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.3"
}
},
"nbformat": 4,
@@ -0,0 +1,2 @@
WARNING: DO NOT MODIFY/DELETE
This is a dummy file needed for mkdocs-redirects, as it is expecting redirects to be markdown files
File diff suppressed because one or more lines are too long
@@ -0,0 +1,211 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "c5889ca0-6feb-4864-a630-e97ccc2c587e",
"metadata": {},
"source": [
"# How to stream LLM tokens from specific nodes\n",
"\n",
"!!! info \"Prerequisites\"\n",
"\n",
" This guide assumes familiarity with the following:\n",
" \n",
" - [Streaming](../../concepts/streaming/)\n",
" - [Chat Models](https://python.langchain.com/docs/concepts/chat_models/)\n",
"\n",
"A common use case when [streaming LLM tokens](../streaming-tokens) is to only stream them from specific nodes. To do so, you can use `stream_mode=\"messages\"` and filter the outputs by the `langgraph_node` field in the streamed metadata:\n",
"\n",
"```python\n",
"from langgraph.graph import StateGraph\n",
"from langchain_openai import ChatOpenAI\n",
"\n",
"model = ChatOpenAI()\n",
"\n",
"def node_a(state: State):\n",
" model.invoke(...)\n",
" ...\n",
"\n",
"def node_b(state: State):\n",
" model.invoke(...)\n",
" ...\n",
"\n",
"graph = (\n",
" StateGraph(State)\n",
" .add_node(node_a)\n",
" .add_node(node_b)\n",
" ...\n",
" .compile()\n",
" \n",
"for msg, metadata in graph.stream(\n",
" inputs,\n",
" # highlight-next-line\n",
" stream_mode=\"messages\"\n",
"):\n",
" # stream from 'node_a'\n",
" # highlight-next-line\n",
" if metadata[\"langgraph_node\"] == \"node_a\":\n",
" print(msg)\n",
"```\n",
"\n",
"!!! note \"Streaming from a specific LLM invocation\"\n",
"\n",
" If you need to instead filter streamed LLM tokens to a specific LLM invocation, check out [this guide](../streaming-tokens#filter-to-specific-llm-invocation)"
]
},
{
"cell_type": "markdown",
"id": "dcff85bd-8a5d-409e-93d4-e9242b5e976d",
"metadata": {},
"source": [
"## Setup\n",
"\n",
"First we need to install the packages required"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "05157237-783c-49de-9f29-7dca3c285647",
"metadata": {},
"outputs": [],
"source": [
"%%capture --no-stderr\n",
"%pip install --quiet -U langgraph langchain_openai"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "efd22cd2-3152-433b-ad50-65be8ace61d4",
"metadata": {},
"outputs": [],
"source": [
"import getpass\n",
"import os\n",
"\n",
"\n",
"def _set_env(var: str):\n",
" if not os.environ.get(var):\n",
" os.environ[var] = getpass.getpass(f\"{var}: \")\n",
"\n",
"\n",
"_set_env(\"OPENAI_API_KEY\")"
]
},
{
"cell_type": "markdown",
"id": "a0ce8c26-f38d-4bdb-89ff-b058e7560019",
"metadata": {},
"source": [
"## Example"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "419a3c71-7bf6-4656-99b8-b5d61f3f4bf1",
"metadata": {},
"outputs": [],
"source": [
"from typing import TypedDict\n",
"from langgraph.graph import START, StateGraph, MessagesState\n",
"from langchain_openai import ChatOpenAI\n",
"\n",
"model = ChatOpenAI(model=\"gpt-4o-mini\")\n",
"\n",
"\n",
"class State(TypedDict):\n",
" topic: str\n",
" joke: str\n",
" poem: str\n",
"\n",
"\n",
"def write_joke(state: State):\n",
" topic = state[\"topic\"]\n",
" joke_response = model.invoke(\n",
" [{\"role\": \"user\", \"content\": f\"Write a joke about {topic}\"}]\n",
" )\n",
" return {\"joke\": joke_response.content}\n",
"\n",
"\n",
"def write_poem(state: State):\n",
" topic = state[\"topic\"]\n",
" poem_response = model.invoke(\n",
" [{\"role\": \"user\", \"content\": f\"Write a short poem about {topic}\"}]\n",
" )\n",
" return {\"poem\": poem_response.content}\n",
"\n",
"\n",
"graph = (\n",
" StateGraph(State)\n",
" .add_node(write_joke)\n",
" .add_node(write_poem)\n",
" # write both the joke and the poem concurrently\n",
" .add_edge(START, \"write_joke\")\n",
" .add_edge(START, \"write_poem\")\n",
" .compile()\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "fed84d5e-ba10-4324-a664-dca263951a33",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"In| shadows| soft|,| they| quietly| creep|,| \n",
"|Wh|isk|ered| wonders|,| in| dreams| they| leap|.| \n",
"|With| eyes| like| lantern|s|,| bright| and| wide|,| \n",
"|Myst|eries| linger| where| they| reside|.| \n",
"\n",
"|P|aws| that| pat|ter| on| silent| floors|,| \n",
"|Cur|led| in| sun|be|ams|,| they| seek| out| more|.| \n",
"|A| flick| of| a| tail|,| a| leap|,| a| p|ounce|,| \n",
"|In| their| playful| world|,| we| can't| help| but| bounce|.| \n",
"\n",
"|Guard|ians| of| secrets|,| with| gentle| grace|,| \n",
"|Each| little| me|ow|,| a| warm| embrace|.| \n",
"|Oh|,| the| joy| that| they| bring|,| so| pure| and| true|,| \n",
"|In| the| heart| of| a| cat|,| there's| magic| anew|.| |"
]
}
],
"source": [
"for msg, metadata in graph.stream(\n",
" {\"topic\": \"cats\"},\n",
" # highlight-next-line\n",
" stream_mode=\"messages\",\n",
"):\n",
" # highlight-next-line\n",
" if msg.content and metadata[\"langgraph_node\"] == \"write_poem\":\n",
" print(msg.content, end=\"|\", flush=True)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@@ -0,0 +1,2 @@
WARNING: DO NOT MODIFY/DELETE
This is a dummy file needed for mkdocs-redirects, as it is expecting redirects to be markdown files
File diff suppressed because one or more lines are too long
@@ -1,355 +0,0 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "b23ced4e-dc29-43be-9f94-0c36bb181b8a",
"metadata": {},
"source": [
"# How to stream LLM tokens (without LangChain LLMs)"
]
},
{
"cell_type": "markdown",
"id": "7044eeb8-4074-4f9c-8a62-962488744557",
"metadata": {},
"source": [
"In this example we will stream tokens from the language model powering an agent. We'll be using OpenAI client library directly, without using LangChain chat models. We will also use a ReAct agent as an example."
]
},
{
"cell_type": "markdown",
"id": "a37f60af-43ea-4aa6-847a-df8cc47065f5",
"metadata": {},
"source": [
"## Setup\n",
"\n",
"First, let's install the required packages and set our API keys"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "47f79af8-58d8-4a48-8d9a-88823d88701f",
"metadata": {},
"outputs": [],
"source": [
"%%capture --no-stderr\n",
"%pip install -U langgraph openai"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0cf6b41d-7fcb-40b6-9a72-229cdd00a094",
"metadata": {},
"outputs": [],
"source": [
"import getpass\n",
"import os\n",
"\n",
"\n",
"def _set_env(var: str):\n",
" if not os.environ.get(var):\n",
" os.environ[var] = getpass.getpass(f\"{var}: \")\n",
"\n",
"\n",
"_set_env(\"OPENAI_API_KEY\")"
]
},
{
"cell_type": "markdown",
"id": "1c5bc618",
"metadata": {},
"source": [
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Set up <a href=\"https://smith.langchain.com\">LangSmith</a> for LangGraph development</p>\n",
" <p style=\"padding-top: 5px;\">\n",
" Sign up for LangSmith to quickly spot issues and improve the performance of your LangGraph projects. LangSmith lets you use trace data to debug, test, and monitor your LLM apps built with LangGraph — read more about how to get started <a href=\"https://docs.smith.langchain.com\">here</a>. \n",
" </p>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "e3d02ebb-c2e1-4ef7-b187-810d55139317",
"metadata": {},
"source": [
"## Define model, tools and graph"
]
},
{
"cell_type": "markdown",
"id": "3ba684f1-d46b-42e4-95cf-9685209a5992",
"metadata": {},
"source": [
"### Define a node that will call OpenAI API"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "d59234f9-173e-469d-a725-c13e0979663e",
"metadata": {},
"outputs": [],
"source": [
"from openai import AsyncOpenAI\n",
"from langchain_core.language_models.chat_models import ChatGenerationChunk\n",
"from langchain_core.messages import AIMessageChunk\n",
"from langchain_core.runnables.config import (\n",
" ensure_config,\n",
" get_callback_manager_for_config,\n",
")\n",
"\n",
"openai_client = AsyncOpenAI()\n",
"# define tool schema for openai tool calling\n",
"\n",
"tool = {\n",
" \"type\": \"function\",\n",
" \"function\": {\n",
" \"name\": \"get_items\",\n",
" \"description\": \"Use this tool to look up which items are in the given place.\",\n",
" \"parameters\": {\n",
" \"type\": \"object\",\n",
" \"properties\": {\"place\": {\"type\": \"string\"}},\n",
" \"required\": [\"place\"],\n",
" },\n",
" },\n",
"}\n",
"\n",
"\n",
"async def call_model(state, config=None):\n",
" config = ensure_config(config | {\"tags\": [\"agent_llm\"]})\n",
" callback_manager = get_callback_manager_for_config(config)\n",
" messages = state[\"messages\"]\n",
"\n",
" llm_run_manager = callback_manager.on_chat_model_start({}, [messages])[0]\n",
" response = await openai_client.chat.completions.create(\n",
" messages=messages, model=\"gpt-3.5-turbo\", tools=[tool], stream=True\n",
" )\n",
"\n",
" response_content = \"\"\n",
" role = None\n",
"\n",
" tool_call_id = None\n",
" tool_call_function_name = None\n",
" tool_call_function_arguments = \"\"\n",
" async for chunk in response:\n",
" delta = chunk.choices[0].delta\n",
" if delta.role is not None:\n",
" role = delta.role\n",
"\n",
" if delta.content:\n",
" response_content += delta.content\n",
" # note: we're wrapping the response in ChatGenerationChunk so that we can stream this back using stream_mode=\"messages\"\n",
" chunk = ChatGenerationChunk(\n",
" message=AIMessageChunk(\n",
" content=delta.content,\n",
" )\n",
" )\n",
" llm_run_manager.on_llm_new_token(delta.content, chunk=chunk)\n",
"\n",
" if delta.tool_calls:\n",
" # note: for simplicity we're only handling a single tool call here\n",
" if delta.tool_calls[0].function.name is not None:\n",
" tool_call_function_name = delta.tool_calls[0].function.name\n",
" tool_call_id = delta.tool_calls[0].id\n",
"\n",
" # note: we're wrapping the tools calls in ChatGenerationChunk so that we can stream this back using stream_mode=\"messages\"\n",
" tool_call_chunk = ChatGenerationChunk(\n",
" message=AIMessageChunk(\n",
" content=\"\",\n",
" additional_kwargs={\"tool_calls\": [delta.tool_calls[0].dict()]},\n",
" )\n",
" )\n",
" llm_run_manager.on_llm_new_token(\"\", chunk=tool_call_chunk)\n",
" tool_call_function_arguments += delta.tool_calls[0].function.arguments\n",
"\n",
" if tool_call_function_name is not None:\n",
" tool_calls = [\n",
" {\n",
" \"id\": tool_call_id,\n",
" \"function\": {\n",
" \"name\": tool_call_function_name,\n",
" \"arguments\": tool_call_function_arguments,\n",
" },\n",
" \"type\": \"function\",\n",
" }\n",
" ]\n",
" else:\n",
" tool_calls = None\n",
"\n",
" response_message = {\n",
" \"role\": role,\n",
" \"content\": response_content,\n",
" \"tool_calls\": tool_calls,\n",
" }\n",
" return {\"messages\": [response_message]}"
]
},
{
"cell_type": "markdown",
"id": "3a3877e8-8ace-40d5-ad04-cbf21c6f3250",
"metadata": {},
"source": [
"### Define our tools and a tool-calling node"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "b756ea32",
"metadata": {},
"outputs": [],
"source": [
"import json\n",
"\n",
"\n",
"async def get_items(place: str) -> str:\n",
" \"\"\"Use this tool to look up which items are in the given place.\"\"\"\n",
" if \"bed\" in place: # For under the bed\n",
" return \"socks, shoes and dust bunnies\"\n",
" if \"shelf\" in place: # For 'shelf'\n",
" return \"books, penciles and pictures\"\n",
" else: # if the agent decides to ask about a different place\n",
" return \"cat snacks\"\n",
"\n",
"\n",
"# define mapping to look up functions when running tools\n",
"function_name_to_function = {\"get_items\": get_items}\n",
"\n",
"\n",
"async def call_tools(state):\n",
" messages = state[\"messages\"]\n",
"\n",
" tool_call = messages[-1][\"tool_calls\"][0]\n",
" function_name = tool_call[\"function\"][\"name\"]\n",
" function_arguments = tool_call[\"function\"][\"arguments\"]\n",
" arguments = json.loads(function_arguments)\n",
"\n",
" function_response = await function_name_to_function[function_name](**arguments)\n",
" tool_message = {\n",
" \"tool_call_id\": tool_call[\"id\"],\n",
" \"role\": \"tool\",\n",
" \"name\": function_name,\n",
" \"content\": function_response,\n",
" }\n",
" return {\"messages\": [tool_message]}"
]
},
{
"cell_type": "markdown",
"id": "6685898c-9a1c-4803-a492-bd70574ebe38",
"metadata": {},
"source": [
"### Define our graph"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "228260be-1f9a-4195-80e0-9604f8a5dba6",
"metadata": {},
"outputs": [],
"source": [
"import operator\n",
"from typing import Annotated, Literal\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langgraph.graph import StateGraph, END, START\n",
"\n",
"\n",
"class State(TypedDict):\n",
" messages: Annotated[list, operator.add]\n",
"\n",
"\n",
"def should_continue(state) -> Literal[\"tools\", END]:\n",
" messages = state[\"messages\"]\n",
" last_message = messages[-1]\n",
" if last_message[\"tool_calls\"]:\n",
" return \"tools\"\n",
" return END\n",
"\n",
"\n",
"workflow = StateGraph(State)\n",
"workflow.add_edge(START, \"model\")\n",
"workflow.add_node(\"model\", call_model) # i.e. our \"agent\"\n",
"workflow.add_node(\"tools\", call_tools)\n",
"workflow.add_conditional_edges(\"model\", should_continue)\n",
"workflow.add_edge(\"tools\", \"model\")\n",
"graph = workflow.compile()"
]
},
{
"cell_type": "markdown",
"id": "d046e2ef-f208-4831-ab31-203b2e75a49a",
"metadata": {},
"source": [
"## Stream tokens"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "d6ed3df5",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[{'name': 'get_items', 'args': {}, 'id': 'call_h7g3jsgeRXIOUiaEC0VtM4EI', 'type': 'tool_call'}]\n",
"[{'name': 'get_items', 'args': {}, 'id': 'call_h7g3jsgeRXIOUiaEC0VtM4EI', 'type': 'tool_call'}]\n",
"[{'name': 'get_items', 'args': {}, 'id': 'call_h7g3jsgeRXIOUiaEC0VtM4EI', 'type': 'tool_call'}]\n",
"[{'name': 'get_items', 'args': {'place': ''}, 'id': 'call_h7g3jsgeRXIOUiaEC0VtM4EI', 'type': 'tool_call'}]\n",
"[{'name': 'get_items', 'args': {'place': 'bed'}, 'id': 'call_h7g3jsgeRXIOUiaEC0VtM4EI', 'type': 'tool_call'}]\n",
"[{'name': 'get_items', 'args': {'place': 'bedroom'}, 'id': 'call_h7g3jsgeRXIOUiaEC0VtM4EI', 'type': 'tool_call'}]\n",
"[{'name': 'get_items', 'args': {'place': 'bedroom'}, 'id': 'call_h7g3jsgeRXIOUiaEC0VtM4EI', 'type': 'tool_call'}]\n",
"In| the| bedroom|,| you| have| socks|,| shoes|,| and| some| dust| b|unn|ies|.|"
]
}
],
"source": [
"from langchain_core.messages import AIMessageChunk\n",
"\n",
"first = True\n",
"async for msg, metadata in graph.astream(\n",
" {\"messages\": [{\"role\": \"user\", \"content\": \"what's in the bedroom\"}]},\n",
" stream_mode=\"messages\",\n",
"):\n",
" if msg.content:\n",
" print(msg.content, end=\"|\", flush=True)\n",
"\n",
" if isinstance(msg, AIMessageChunk):\n",
" if first:\n",
" gathered = msg\n",
" first = False\n",
" else:\n",
" gathered = gathered + msg\n",
"\n",
" if msg.tool_call_chunks:\n",
" print(gathered.tool_calls)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
WARNING: DO NOT MODIFY/DELETE
This is a dummy file needed for mkdocs-redirects, as it is expecting redirects to be markdown files
+547
View File
@@ -0,0 +1,547 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "76c4b04f-0c03-4321-9d40-38d12c59d088",
"metadata": {},
"source": [
"# How to stream"
]
},
{
"cell_type": "markdown",
"id": "15403cdb-441d-43af-a29f-fc15abe03dcc",
"metadata": {},
"source": [
"!!! info \"Prerequisites\"\n",
"\n",
" This guide assumes familiarity with the following:\n",
" \n",
" - [Streaming](../../concepts/streaming/)\n",
" - [Chat Models](https://python.langchain.com/docs/concepts/chat_models/)\n",
"\n",
"Streaming is crucial for enhancing the responsiveness of applications built on LLMs. By displaying output progressively, even before a complete response is ready, streaming significantly improves user experience (UX), particularly when dealing with the latency of LLMs.\n",
"\n",
"LangGraph is built with first class support for streaming. There are several different ways to stream back outputs from a graph run:\n",
"\n",
"- `\"values\"`: Emit all values in the state after each step.\n",
"- `\"updates\"`: Emit only the node names and updates returned by the nodes after each step.\n",
" If multiple updates are made in the same step (e.g. multiple nodes are run) then those updates are emitted separately.\n",
"- `\"custom\"`: Emit custom data from inside nodes using `StreamWriter`.\n",
"- [`\"messages\"`](../streaming-tokens): Emit LLM messages token-by-token together with metadata for any LLM invocations inside nodes.\n",
"- `\"debug\"`: Emit debug events with as much information as possible for each step.\n",
"\n",
"You can stream outputs from the graph by using `graph.stream(..., stream_mode=<stream_mode>)` method, e.g.:\n",
"\n",
"=== \"Sync\"\n",
"\n",
" ```python\n",
" for chunk in graph.stream(inputs, stream_mode=\"updates\"):\n",
" print(chunk)\n",
" ```\n",
"\n",
"=== \"Async\"\n",
"\n",
" ```python\n",
" async for chunk in graph.astream(inputs, stream_mode=\"updates\"):\n",
" print(chunk)\n",
" ```\n",
"\n",
"You can also combine multiple streaming mode by providing a list to `stream_mode` parameter:\n",
"\n",
"=== \"Sync\"\n",
"\n",
" ```python\n",
" for chunk in graph.stream(inputs, stream_mode=[\"updates\", \"custom\"]):\n",
" print(chunk)\n",
" ```\n",
"\n",
"=== \"Async\"\n",
"\n",
" ```python\n",
" async for chunk in graph.astream(inputs, stream_mode=[\"updates\", \"custom\"]):\n",
" print(chunk)\n",
" ```"
]
},
{
"cell_type": "markdown",
"id": "9723cf76-6fe4-4b52-829f-3f28712ddcb7",
"metadata": {},
"source": [
"## Setup"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "427f8f66-7404-4c7d-a642-af5053b8b28f",
"metadata": {},
"outputs": [],
"source": [
"%%capture --no-stderr\n",
"%pip install --quiet -U langgraph langchain_openai"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "03310ce6-e21f-4378-93bf-dd273fdb3e9a",
"metadata": {},
"outputs": [
{
"name": "stdin",
"output_type": "stream",
"text": [
"OPENAI_API_KEY: ········\n"
]
}
],
"source": [
"import getpass\n",
"import os\n",
"\n",
"\n",
"def _set_env(var: str):\n",
" if not os.environ.get(var):\n",
" os.environ[var] = getpass.getpass(f\"{var}: \")\n",
"\n",
"\n",
"_set_env(\"OPENAI_API_KEY\")"
]
},
{
"cell_type": "markdown",
"id": "80399508-bad8-43b7-8ec9-4c06ad1774cc",
"metadata": {},
"source": [
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Set up <a href=\"https://smith.langchain.com\">LangSmith</a> for LangGraph development</p>\n",
" <p style=\"padding-top: 5px;\">\n",
" Sign up for LangSmith to quickly spot issues and improve the performance of your LangGraph projects. LangSmith lets you use trace data to debug, test, and monitor your LLM apps built with LangGraph — read more about how to get started <a href=\"https://docs.smith.langchain.com\">here</a>. \n",
" </p>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "be4adbb2-61e8-4bb7-942d-b4dc27ba71ac",
"metadata": {},
"source": [
"Let's define a simple graph with two nodes:"
]
},
{
"cell_type": "markdown",
"id": "f6d4c513-1006-4179-bba9-d858fc952169",
"metadata": {},
"source": [
"## Define graph"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "faeb5ce8-d383-4277-b0a8-322e713638e4",
"metadata": {},
"outputs": [],
"source": [
"from typing import TypedDict\n",
"from langgraph.graph import StateGraph, START\n",
"\n",
"\n",
"class State(TypedDict):\n",
" topic: str\n",
" joke: str\n",
"\n",
"\n",
"def refine_topic(state: State):\n",
" return {\"topic\": state[\"topic\"] + \" and cats\"}\n",
"\n",
"\n",
"def generate_joke(state: State):\n",
" return {\"joke\": f\"This is a joke about {state['topic']}\"}\n",
"\n",
"\n",
"graph = (\n",
" StateGraph(State)\n",
" .add_node(refine_topic)\n",
" .add_node(generate_joke)\n",
" .add_edge(START, \"refine_topic\")\n",
" .add_edge(\"refine_topic\", \"generate_joke\")\n",
" .compile()\n",
")"
]
},
{
"cell_type": "markdown",
"id": "f9b90850-85bf-4391-b6b7-22ad45edaa3b",
"metadata": {},
"source": [
"## Stream all values in the state (stream_mode=\"values\") {#values}"
]
},
{
"cell_type": "markdown",
"id": "d1ed60d4-cf78-4d4d-a660-6879539e168f",
"metadata": {},
"source": [
"Use this to stream **all values** in the state after each step."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "3daca06a-369b-41e5-8e4e-6edc4d4af3a7",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'topic': 'ice cream'}\n",
"{'topic': 'ice cream and cats'}\n",
"{'topic': 'ice cream and cats', 'joke': 'This is a joke about ice cream and cats'}\n"
]
}
],
"source": [
"for chunk in graph.stream(\n",
" {\"topic\": \"ice cream\"},\n",
" # highlight-next-line\n",
" stream_mode=\"values\",\n",
"):\n",
" print(chunk)"
]
},
{
"cell_type": "markdown",
"id": "adcb1bdb-f9fa-4d42-87ce-8e25d4290883",
"metadata": {},
"source": [
"## Stream state updates from the nodes (stream_mode=\"updates\") {#updates}"
]
},
{
"cell_type": "markdown",
"id": "44c55326-d077-4583-ae5b-396f45daf21c",
"metadata": {},
"source": [
"Use this to stream only the **state updates** returned by the nodes after each step. The streamed outputs include the name of the node as well as the update."
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "eed7d401-37d1-4d15-b6dd-88956fff89e1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'refine_topic': {'topic': 'ice cream and cats'}}\n",
"{'generate_joke': {'joke': 'This is a joke about ice cream and cats'}}\n"
]
}
],
"source": [
"for chunk in graph.stream(\n",
" {\"topic\": \"ice cream\"},\n",
" # highlight-next-line\n",
" stream_mode=\"updates\",\n",
"):\n",
" print(chunk)"
]
},
{
"cell_type": "markdown",
"id": "b9ed9c68-b7c5-4420-945d-84fa33fcf88f",
"metadata": {},
"source": [
"## Stream debug events (stream_mode=\"debug\") {#debug}"
]
},
{
"cell_type": "markdown",
"id": "94690715-f86c-42f6-be2d-4df82f6f9a96",
"metadata": {},
"source": [
"Use this to stream **debug events** with as much information as possible for each step. Includes information about tasks that were scheduled to be executed as well as the results of the task executions."
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "cc6354f6-0c39-49cf-a529-b9c6c8713d7c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'type': 'task', 'timestamp': '2025-01-28T22:06:34.789803+00:00', 'step': 1, 'payload': {'id': 'eb305d74-3460-9510-d516-beed71a63414', 'name': 'refine_topic', 'input': {'topic': 'ice cream'}, 'triggers': ['start:refine_topic']}}\n",
"{'type': 'task_result', 'timestamp': '2025-01-28T22:06:34.790013+00:00', 'step': 1, 'payload': {'id': 'eb305d74-3460-9510-d516-beed71a63414', 'name': 'refine_topic', 'error': None, 'result': [('topic', 'ice cream and cats')], 'interrupts': []}}\n",
"{'type': 'task', 'timestamp': '2025-01-28T22:06:34.790165+00:00', 'step': 2, 'payload': {'id': '74355cb8-6284-25e0-579f-430493c1bdab', 'name': 'generate_joke', 'input': {'topic': 'ice cream and cats'}, 'triggers': ['refine_topic']}}\n",
"{'type': 'task_result', 'timestamp': '2025-01-28T22:06:34.790337+00:00', 'step': 2, 'payload': {'id': '74355cb8-6284-25e0-579f-430493c1bdab', 'name': 'generate_joke', 'error': None, 'result': [('joke', 'This is a joke about ice cream and cats')], 'interrupts': []}}\n"
]
}
],
"source": [
"for chunk in graph.stream(\n",
" {\"topic\": \"ice cream\"},\n",
" # highlight-next-line\n",
" stream_mode=\"debug\",\n",
"):\n",
" print(chunk)"
]
},
{
"cell_type": "markdown",
"id": "6791da60-0513-43e6-b445-788dd81683bb",
"metadata": {},
"source": [
"## Stream LLM tokens ([stream_mode=\"messages\"](../streaming-tokens)) {#messages}"
]
},
{
"cell_type": "markdown",
"id": "1f45d68b-f7ca-4012-96cc-d276a143f571",
"metadata": {},
"source": [
"Use this to stream **LLM messages token-by-token** together with metadata for any LLM invocations inside nodes or tasks. Let's modify the above example to include LLM calls:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "efa787e1-be4d-433b-a1af-46a9c99ad8f3",
"metadata": {},
"outputs": [],
"source": [
"from langchain_openai import ChatOpenAI\n",
"\n",
"llm = ChatOpenAI(model=\"gpt-4o-mini\")\n",
"\n",
"\n",
"def generate_joke(state: State):\n",
" # highlight-next-line\n",
" llm_response = llm.invoke(\n",
" # highlight-next-line\n",
" [\n",
" # highlight-next-line\n",
" {\"role\": \"user\", \"content\": f\"Generate a joke about {state['topic']}\"}\n",
" # highlight-next-line\n",
" ]\n",
" # highlight-next-line\n",
" )\n",
" return {\"joke\": llm_response.content}\n",
"\n",
"\n",
"graph = (\n",
" StateGraph(State)\n",
" .add_node(refine_topic)\n",
" .add_node(generate_joke)\n",
" .add_edge(START, \"refine_topic\")\n",
" .add_edge(\"refine_topic\", \"generate_joke\")\n",
" .compile()\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "c251f809-8922-46ea-bd5b-18264fcc523a",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Why| did| the| cat| sit| on| the| ice| cream| cone|?\n",
"\n",
"|Because| it| wanted| to| be| a| \"|p|urr|-f|ect|\"| scoop|!| 🍦|🐱|"
]
}
],
"source": [
"for message_chunk, metadata in graph.stream(\n",
" {\"topic\": \"ice cream\"},\n",
" # highlight-next-line\n",
" stream_mode=\"messages\",\n",
"):\n",
" if message_chunk.content:\n",
" print(message_chunk.content, end=\"|\", flush=True)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "b1912d72-7b68-4810-8b98-d7f3c35fbb6d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'langgraph_step': 2,\n",
" 'langgraph_node': 'generate_joke',\n",
" 'langgraph_triggers': ['refine_topic'],\n",
" 'langgraph_path': ('__pregel_pull', 'generate_joke'),\n",
" 'langgraph_checkpoint_ns': 'generate_joke:568879bc-8800-2b0d-a5b5-059526a4bebf',\n",
" 'checkpoint_ns': 'generate_joke:568879bc-8800-2b0d-a5b5-059526a4bebf',\n",
" 'ls_provider': 'openai',\n",
" 'ls_model_name': 'gpt-4o-mini',\n",
" 'ls_model_type': 'chat',\n",
" 'ls_temperature': 0.7}"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"metadata"
]
},
{
"cell_type": "markdown",
"id": "0d1ebeda-4498-40e0-a30a-0844cb491425",
"metadata": {},
"source": [
"## Stream custom data (stream_mode=\"custom\") {#custom}"
]
},
{
"cell_type": "markdown",
"id": "e9ca56cc-d36e-4061-b1f6-9ade4e3e00a0",
"metadata": {},
"source": [
"Use this to stream custom data from inside nodes using [`StreamWriter`][langgraph.types.StreamWriter]."
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "e3bf6a2b-afe3-4bd3-8474-57cccd994f23",
"metadata": {},
"outputs": [],
"source": [
"from langgraph.types import StreamWriter\n",
"\n",
"\n",
"# highlight-next-line\n",
"def generate_joke(state: State, writer: StreamWriter):\n",
" # highlight-next-line\n",
" writer({\"custom_key\": \"Writing custom data while generating a joke\"})\n",
" return {\"joke\": f\"This is a joke about {state['topic']}\"}\n",
"\n",
"\n",
"graph = (\n",
" StateGraph(State)\n",
" .add_node(refine_topic)\n",
" .add_node(generate_joke)\n",
" .add_edge(START, \"refine_topic\")\n",
" .add_edge(\"refine_topic\", \"generate_joke\")\n",
" .compile()\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "2ecfb0b0-3311-46f5-9dc8-6c7853373792",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'custom_key': 'Writing custom data while generating a joke'}\n"
]
}
],
"source": [
"for chunk in graph.stream(\n",
" {\"topic\": \"ice cream\"},\n",
" # highlight-next-line\n",
" stream_mode=\"custom\",\n",
"):\n",
" print(chunk)"
]
},
{
"cell_type": "markdown",
"id": "28e67f4d-fcab-46a8-93e2-b7bee30336c1",
"metadata": {},
"source": [
"## Configure multiple streaming modes (stream_mode=\"custom\") {#multiple}"
]
},
{
"cell_type": "markdown",
"id": "01ff946a-f38d-42ad-bc71-a2621fab1b6c",
"metadata": {},
"source": [
"Use this to combine multiple streaming modes. The outputs are streamed as tuples `(stream_mode, streamed_output)`."
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "bf4cab4b-356c-4276-9035-26974abe1efe",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Stream mode: updates\n",
"{'refine_topic': {'topic': 'ice cream and cats'}}\n",
"\n",
"\n",
"Stream mode: custom\n",
"{'custom_key': 'Writing custom data while generating a joke'}\n",
"\n",
"\n",
"Stream mode: updates\n",
"{'generate_joke': {'joke': 'This is a joke about ice cream and cats'}}\n",
"\n",
"\n"
]
}
],
"source": [
"for stream_mode, chunk in graph.stream(\n",
" {\"topic\": \"ice cream\"},\n",
" # highlight-next-line\n",
" stream_mode=[\"updates\", \"custom\"],\n",
"):\n",
" print(f\"Stream mode: {stream_mode}\")\n",
" print(chunk)\n",
" print(\"\\n\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
+2
View File
@@ -0,0 +1,2 @@
WARNING: DO NOT MODIFY/DELETE
This is a dummy file needed for mkdocs-redirects, as it is expecting redirects to be markdown files
+11 -7
View File
@@ -58,6 +58,15 @@ plugins:
- autorefs
- redirects:
redirect_maps:
# lib redirects
'how-tos/stream-values.md': 'how-tos/streaming.md#values'
'how-tos/stream-updates.md': 'how-tos/streaming.md#updates'
'how-tos/streaming-content.md': 'how-tos/streaming.md#custom'
'how-tos/stream-multiple.md': 'how-tos/streaming.md#multiple'
'how-tos/streaming-tokens-without-langchain.md': 'how-tos/streaming-tokens.md#example-without-langchain'
'how-tos/streaming-from-final-node.md': 'how-tos/streaming-specific-nodes.md'
'how-tos/streaming-events-from-within-tools-without-langchain.md': 'how-tos/streaming-events-from-within-tools.md#example-without-langchain'
# cloud redirects
'cloud/index.md': 'concepts/index.md#langgraph-platform'
'cloud/how-tos/index.md': 'how-tos/index.md#langgraph-platform'
'cloud/concepts/api.md': 'concepts/langgraph_server.md'
@@ -138,15 +147,10 @@ nav:
- how-tos/review-tool-calls-functional.ipynb
- Streaming:
- Streaming: how-tos#streaming
- how-tos/stream-values.ipynb
- how-tos/stream-updates.ipynb
- how-tos/streaming.ipynb
- how-tos/streaming-tokens.ipynb
- how-tos/streaming-tokens-without-langchain.ipynb
- how-tos/streaming-content.ipynb
- how-tos/stream-multiple.ipynb
- how-tos/streaming-specific-nodes.ipynb
- how-tos/streaming-events-from-within-tools.ipynb
- how-tos/streaming-events-from-within-tools-without-langchain.ipynb
- how-tos/streaming-from-final-node.ipynb
- how-tos/streaming-subgraphs.ipynb
- how-tos/disable-streaming.ipynb
- Tool calling:
+2 -2
View File
@@ -1496,7 +1496,7 @@ class Pregel(PregelProtocol):
When used with functional API, values are emitted once at the end of the workflow.
- `"updates"`: Emit only the node or task names and updates returned by the nodes or tasks after each step.
If multiple updates are made in the same step (e.g. multiple nodes are run) then those updates are emitted separately.
- `"custom"`: Emit custom data using from inside nodes or tasks using `StreamWriter`.
- `"custom"`: Emit custom data from inside nodes or tasks using `StreamWriter`.
- `"messages"`: Emit LLM messages token-by-token together with metadata for any LLM invocations inside nodes or tasks.
- `"debug"`: Emit debug events with as much information as possible for each step.
output_keys: The keys to stream, defaults to all non-context channels.
@@ -1772,7 +1772,7 @@ class Pregel(PregelProtocol):
When used with functional API, values are emitted once at the end of the workflow.
- `"updates"`: Emit only the node or task names and updates returned by the nodes or tasks after each step.
If multiple updates are made in the same step (e.g. multiple nodes are run) then those updates are emitted separately.
- `"custom"`: Emit custom data using from inside nodes or tasks using `StreamWriter`.
- `"custom"`: Emit custom data from inside nodes or tasks using `StreamWriter`.
- `"messages"`: Emit LLM messages token-by-token together with metadata for any LLM invocations inside nodes or tasks.
- `"debug"`: Emit debug events with as much information as possible for each step.
output_keys: The keys to stream, defaults to all non-context channels.