From e935da0b12599e9a2ecf92f18c900a64bd144aeb Mon Sep 17 00:00:00 2001 From: Mohammad Mohtashim <45242107+keenborder786@users.noreply.github.com> Date: Mon, 7 Apr 2025 18:27:33 +0500 Subject: [PATCH] ChatTongyi reasoning_content fix (#30694) - **Description:** Small fix for `reasoning_content` key - **Issue:** #30689 --- libs/community/langchain_community/chat_models/tongyi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/chat_models/tongyi.py b/libs/community/langchain_community/chat_models/tongyi.py index 645bd44b175..c28a727d8eb 100644 --- a/libs/community/langchain_community/chat_models/tongyi.py +++ b/libs/community/langchain_community/chat_models/tongyi.py @@ -731,7 +731,7 @@ class ChatTongyi(BaseChatModel): if ( choice["finish_reason"] == "null" and message["content"] == "" - and message["reasoning_content"] == "" + and message.get("reasoning_content", "") == "" and "tool_calls" not in message ): continue