diff --git a/libs/langchain/langchain/chat_models/tongyi.py b/libs/langchain/langchain/chat_models/tongyi.py index 28f6d232ba..42326b32df 100644 --- a/libs/langchain/langchain/chat_models/tongyi.py +++ b/libs/langchain/langchain/chat_models/tongyi.py @@ -285,7 +285,8 @@ class ChatTongyi(BaseChatModel): else: raise HTTPError( f"HTTP error occurred: status_code: {resp.status_code} \n " - f"code: {resp.code} \n message: {resp.message}" + f"code: {resp.code} \n message: {resp.message}", + response=resp, ) return _completion_with_retry(**kwargs)