Skip to content

Commit

Permalink
Fix issue langchain-ai#20453: Deprecated attribute lookup error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangfuqiang committed Sep 24, 2024
1 parent 4fab899 commit 3f50eca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/langchain/langchain/llms/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
if name in DEPRECATED_LOOKUP:
raise AttributeError(f'The attribute {name} is deprecated. Please use the new import path.')
return _import_attribute(name)


Expand Down

0 comments on commit 3f50eca

Please sign in to comment.