Skip to content

Commit c50dd79

Browse files
authored
docs: Update langchain-openai package version in chat_token_usage_tracking (#24436)
This PR updates docs to mention correct version of the `langchain-openai` package required to use the `stream_usage` parameter. As it can be noticed in the details of this [merge commit](722c8f5), that functionality is available only in `langchain-openai >= 0.1.9` while docs state it's available in `langchain-openai >= 0.1.8`.
1 parent aade9bf commit c50dd79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/how_to/chat_token_usage_tracking.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"\n",
1717
"Tracking token usage to calculate cost is an important part of putting your app in production. This guide goes over how to obtain this information from your LangChain model calls.\n",
1818
"\n",
19-
"This guide requires `langchain-openai >= 0.1.8`."
19+
"This guide requires `langchain-openai >= 0.1.9`."
2020
]
2121
},
2222
{
@@ -153,7 +153,7 @@
153153
"\n",
154154
"#### OpenAI\n",
155155
"\n",
156-
"For example, OpenAI will return a message [chunk](https://api.python.langchain.com/en/latest/messages/langchain_core.messages.ai.AIMessageChunk.html) at the end of a stream with token usage information. This behavior is supported by `langchain-openai >= 0.1.8` and can be enabled by setting `stream_usage=True`. This attribute can also be set when `ChatOpenAI` is instantiated.\n",
156+
"For example, OpenAI will return a message [chunk](https://api.python.langchain.com/en/latest/messages/langchain_core.messages.ai.AIMessageChunk.html) at the end of a stream with token usage information. This behavior is supported by `langchain-openai >= 0.1.9` and can be enabled by setting `stream_usage=True`. This attribute can also be set when `ChatOpenAI` is instantiated.\n",
157157
"\n",
158158
"```{=mdx}\n",
159159
":::note\n",

0 commit comments

Comments
 (0)