Fix/nvidia ai endpoints streaming
This PR fixes the streaming issue introduced with langchain_nvidia_ai_endpoints package.
-
It creates a patched version of
ChatNVIDIAbased on the version of thelangchain_nvidia_ai_endpointspackage. Two patched versions are created for the version ranges 0.1. - 0.2.0 and 0.2.0 - 0.3.0. TheChatNVIDIAFactoryis responsible for checking the package version and returning the corresponding patched class. The patched class is then assigned toChatNVIDIA, which will be used in providers. -
Imodifies the import statement in the providers module to import the patched version of ChatNVIDIA from the _langchain_nvidia_ai_endpoints_patch module.
-
it is tested on
langchain_nvidia_ai_endpointsversions 0.1.3.0 - 0.1.4 - 0.1.5 - 0.1.6 - 0.1.7 and 0.2.0
Note: Only the streaming support is tested