Issue: When the third-party package is not installed, whenever we need to pip install <package> the ImportError is raised.
But sometimes, the ValueError or ModuleNotFoundError is raised. It is bad for consistency.
Change: replaced the ValueError or ModuleNotFoundError with ImportError when we raise an error with the pip install <package> message.
Note: Ideally, we replace all try: import... except... raise ...with helper functions like import_aim or just use the existing langchain_core.utils.utils.guard_import But it would be much bigger refactoring. @baskaryan Please, advice on this.
Issue: When the third-party package is not installed, whenever we need to
pip install <package>
the ImportError is raised. But sometimes, theValueError
orModuleNotFoundError
is raised. It is bad for consistency. Change: replaced theValueError
orModuleNotFoundError
withImportError
when we raise an error with thepip install <package>
message. Note: Ideally, we replace alltry: import... except... raise ...
with helper functions likeimport_aim
or just use the existing langchain_core.utils.utils.guard_import But it would be much bigger refactoring. @baskaryan Please, advice on this.