From adf2dc13de5a5e19023f8ce177add59400decc1c Mon Sep 17 00:00:00 2001 From: ccurme Date: Thu, 27 Jun 2024 18:12:16 -0400 Subject: [PATCH] community: fix lint (#23611) --- libs/community/langchain_community/chat_models/maritalk.py | 6 +++--- libs/community/langchain_community/chat_models/zhipuai.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/community/langchain_community/chat_models/maritalk.py b/libs/community/langchain_community/chat_models/maritalk.py index 3a1821baeb9..f06f2917e71 100644 --- a/libs/community/langchain_community/chat_models/maritalk.py +++ b/libs/community/langchain_community/chat_models/maritalk.py @@ -213,7 +213,7 @@ class ChatMaritalk(BaseChatModel): if response.status_code == 200: return response.json().get("answer", "No answer found") else: - raise MaritalkHTTPError(response) + raise MaritalkHTTPError(response) # type: ignore[arg-type] except ImportError: raise ImportError( @@ -301,7 +301,7 @@ class ChatMaritalk(BaseChatModel): async with client.stream( "POST", "https://chat.maritaca.ai/api/chat/inference", - data=json.dumps(data), + data=json.dumps(data), # type: ignore[arg-type] headers=headers, timeout=None, ) as response: @@ -323,7 +323,7 @@ class ChatMaritalk(BaseChatModel): yield chunk else: - raise MaritalkHTTPError(response) + raise MaritalkHTTPError(response) # type: ignore[arg-type] except ImportError: raise ImportError( diff --git a/libs/community/langchain_community/chat_models/zhipuai.py b/libs/community/langchain_community/chat_models/zhipuai.py index fd0648e9129..9ec8ffa728c 100644 --- a/libs/community/langchain_community/chat_models/zhipuai.py +++ b/libs/community/langchain_community/chat_models/zhipuai.py @@ -447,7 +447,7 @@ class ChatZhipuAI(BaseChatModel): import httpx with httpx.Client(headers=headers, timeout=60) as client: - response = client.post(self.zhipuai_api_base, json=payload) + response = client.post(self.zhipuai_api_base, json=payload) # type: ignore[arg-type] response.raise_for_status() return self._create_chat_result(response.json()) @@ -534,7 +534,7 @@ class ChatZhipuAI(BaseChatModel): import httpx async with httpx.AsyncClient(headers=headers, timeout=60) as client: - response = await client.post(self.zhipuai_api_base, json=payload) + response = await client.post(self.zhipuai_api_base, json=payload) # type: ignore[arg-type] response.raise_for_status() return self._create_chat_result(response.json())