Skip to content

Commit

Permalink
community: fix lint (#23611)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccurme authored Jun 27, 2024
1 parent ef0593d commit adf2dc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions libs/community/langchain_community/chat_models/maritalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ async def _acall(
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(
Expand Down Expand Up @@ -301,7 +301,7 @@ async def _astream(
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:
Expand All @@ -323,7 +323,7 @@ async def _astream(
yield chunk

else:
raise MaritalkHTTPError(response)
raise MaritalkHTTPError(response) # type: ignore[arg-type]

except ImportError:
raise ImportError(
Expand Down
4 changes: 2 additions & 2 deletions libs/community/langchain_community/chat_models/zhipuai.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def _generate(
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())

Expand Down Expand Up @@ -534,7 +534,7 @@ async def _agenerate(
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())

Expand Down

0 comments on commit adf2dc1

Please sign in to comment.