[PR #2101] [MERGED] fix: The weather in Boston is always unsafe #2134

Closed
opened 2026-02-17 17:23:06 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/2101
Author: @tom1299
Created: 1/6/2026
Status: Merged
Merged: 1/6/2026
Merged by: @lnhsingh

Base: mainHead: fix_invoke_statement_in_streaming_common_patterns


📝 Commits (2)

  • d4f46fa Move user message to be passed as message to invoke
  • 223820b Merge branch 'main' into fix_invoke_statement_in_streaming_common_patterns

📊 Changes

1 file changed (+8 additions, -5 deletions)

View changed files

📝 src/oss/langchain/streaming.mdx (+8 -5)

📄 Description

Overview

In one of the examples for streaming, a tool message is passed as config to invoke. Instead it should be passes as a message. This results in the tool output ("It's always sunny in Boston!") to be classified as unsafe. This PR moves the tool message to messages so that the tool output is actually evaluated by the llm.

Type of change

Type: Fix typo/bug/link/formatting

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally using docs dev
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links
  • I have updated navigation in src/docs.json if needed

Additional notes

Changes:

  • Update the code example
  • Change output for the sample message to be safe

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/2101 **Author:** [@tom1299](https://github.com/tom1299) **Created:** 1/6/2026 **Status:** ✅ Merged **Merged:** 1/6/2026 **Merged by:** [@lnhsingh](https://github.com/lnhsingh) **Base:** `main` ← **Head:** `fix_invoke_statement_in_streaming_common_patterns` --- ### 📝 Commits (2) - [`d4f46fa`](https://github.com/langchain-ai/docs/commit/d4f46fae7d55261e02f23a8573c0c2ae43ba737b) Move user message to be passed as message to invoke - [`223820b`](https://github.com/langchain-ai/docs/commit/223820b9e080ecef00ac16499e82a3b86f66788b) Merge branch 'main' into fix_invoke_statement_in_streaming_common_patterns ### 📊 Changes **1 file changed** (+8 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/langchain/streaming.mdx` (+8 -5) </details> ### 📄 Description ## Overview In one of the [examples](https://docs.langchain.com/oss/python/langchain/streaming#accessing-completed-messages) for streaming, a tool message is passed as `config` to invoke. Instead it should be passes as a `message`. This results in the tool output ("It's always sunny in Boston!") to be classified as unsafe. This PR moves the tool message to messages so that the tool output is actually evaluated by the llm. ## Type of change **Type:** Fix typo/bug/link/formatting ## Checklist - [X] I have read the [contributing guidelines](README.md) - [X] I have tested my changes locally using `docs dev` - [X] All code examples have been tested and work correctly - [X] I have used **root relative** paths for internal links - [X] I have updated navigation in `src/docs.json` if needed ## Additional notes Changes: * Update the code example * Change output for the sample message to be safe --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-17 17:23:06 -05:00
yindo closed this issue 2026-02-17 17:23:06 -05:00
yindo changed title from [PR #2101] fix: The weather in Boston is always unsafe to [PR #2101] [MERGED] fix: The weather in Boston is always unsafe 2026-06-05 18:16:50 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2134