diff --git a/libs/community/langchain_community/chat_models/tongyi.py b/libs/community/langchain_community/chat_models/tongyi.py index de02213c580..4c44272f271 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