mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-17 07:26:16 +00:00
community[minor]: add hf chat wrapper (#14736)
Builds on #14040 with community refactor merged and notebook updated. Note that with this refactor, models will be imported from `langchain_community.chat_models.huggingface` rather than the main `langchain` repo. --------- Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> Signed-off-by: ugm2 <unaigaraymaestre@gmail.com> Signed-off-by: Yuchen Liang <yuchenl3@andrew.cmu.edu> Co-authored-by: Andrew Reed <andrew.reed.r@gmail.com> Co-authored-by: Andrew Reed <areed1242@gmail.com> Co-authored-by: A-Roucher <aymeric.roucher@gmail.com> Co-authored-by: Aymeric Roucher <69208727+A-Roucher@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
"""Test HuggingFace Chat wrapper."""
|
||||
from importlib import import_module
|
||||
|
||||
|
||||
def test_import_class() -> None:
|
||||
"""Test that the class can be imported."""
|
||||
module_name = "langchain_community.chat_models.huggingface"
|
||||
class_name = "ChatHuggingFace"
|
||||
|
||||
module = import_module(module_name)
|
||||
assert hasattr(module, class_name)
|
@@ -11,6 +11,7 @@ EXPECTED_ALL = [
|
||||
"ChatCohere",
|
||||
"ChatDatabricks",
|
||||
"ChatGooglePalm",
|
||||
"ChatHuggingFace",
|
||||
"ChatMlflow",
|
||||
"ChatMLflowAIGateway",
|
||||
"ChatOllama",
|
||||
|
Reference in New Issue
Block a user