The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community: Remove the system message count limit for ChatTongyi. (#30192)
Hugh Gaoaa6dae4a5bd6
diff --git a/libs/community/langchain_community/chat_models/tongyi.py b/libs/community/langchain_community/chat_models/tongyi.pyindex de02213c58..4c44272f27 100644--- a/libs/community/langchain_community/chat_models/tongyi.py+++ b/libs/community/langchain_community/chat_models/tongyi.py@@ -783,8 +783,6 @@ class ChatTongyi(BaseChatModel):]if len(system_message_indices) == 1 and system_message_indices[0] != 0:raise ValueError("System message can only be the first message.")- elif len(system_message_indices) > 1:- raise ValueError("There can be only one system message at most.")params["messages"] = message_dicts