Skip to content

Commit

Permalink
Upgrade langchain dependency versions to resolve dependabot alerts. (
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi authored Oct 2, 2023
1 parent 4df3191 commit cd2479d
Show file tree
Hide file tree
Showing 5 changed files with 1,996 additions and 2,046 deletions.
3 changes: 2 additions & 1 deletion libs/langchain/langchain/embeddings/dashscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def _embed_with_retry(**kwargs: Any) -> Any:
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 _embed_with_retry(**kwargs)
Expand Down
6 changes: 4 additions & 2 deletions libs/langchain/langchain/llms/tongyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def _generate_with_retry(**_kwargs: Any) -> Any:
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 _generate_with_retry(**kwargs)
Expand All @@ -77,7 +78,8 @@ def _stream_generate_with_retry(**_kwargs: Any) -> Any:
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 stream_resps

Expand Down
6 changes: 4 additions & 2 deletions libs/langchain/langchain/utilities/zapier.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,13 @@ def list(self) -> List[Dict]:
raise requests.HTTPError(
f"An unauthorized response occurred. Check that your "
f"access token is correct and doesn't need to be "
f"refreshed. Err: {http_err}"
f"refreshed. Err: {http_err}",
response=response,
)
raise requests.HTTPError(
f"An unauthorized response occurred. Check that your api "
f"key is correct. Err: {http_err}"
f"key is correct. Err: {http_err}",
response=response,
)
raise http_err
return response.json()["results"]
Expand Down
Loading

0 comments on commit cd2479d

Please sign in to comment.