langchain-ai / langchain-nvidia

MIT License
49 stars 15 forks source link

The `langchain-nvidia-ai-endpoints` package does not have a `__version__` attribute #28

Open aishwaryap opened 4 months ago

aishwaryap commented 4 months ago

Hi all, I was recently trying to debug a mismatch between a public example using langchain-nvidia-ai-endpoints and something I was trying to implement and found that the langchain-nvidia-ai-endpoints package does not have a __version__ attribute.

Code:

import langchain_nvidia_ai_endpoints
print(langchain_nvidia_ai_endpoints.__dict__.keys())

Output:

dict_keys(['__name__', '__doc__', '__package__', '__loader__', '__spec__', '__path__', '__file__', '__cached__', '__builtins__', '_statics', '_common', 'chat_models', 'ChatNVIDIA', 'callbacks', 'embeddings', 'NVIDIAEmbeddings', '__all__'])

Code:

import langchain_nvidia_ai_endpoints
print(langchain_nvidia_ai_endpoints.__version__)

Output:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[20], line 2
      1 import langchain_nvidia_ai_endpoints
----> 2 print(langchain_nvidia_ai_endpoints.__version__)

AttributeError: module 'langchain_nvidia_ai_endpoints' has no attribute '__version__'

While there are other ways to check the version of the package that has been installed, this is a standard attribute that's valuable to have for debugging. Requesting that this be added.