Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions libs/langchain/langchain_classic/chat_models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,25 @@
if model_provider == "huggingface":
_check_pkg("langchain_huggingface")
from langchain_huggingface import ChatHuggingFace, HuggingFacePipeline
chat_params = {

Check failure on line 442 in libs/langchain/langchain_classic/chat_models/base.py

View workflow job for this annotation

GitHub Actions / lint (libs/langchain, 3.14) / Python 3.14

Ruff (invalid-syntax)

langchain_classic/chat_models/base.py:442:1: invalid-syntax: Unexpected indentation

Check failure on line 442 in libs/langchain/langchain_classic/chat_models/base.py

View workflow job for this annotation

GitHub Actions / lint (libs/langchain, 3.10) / Python 3.10

Ruff (invalid-syntax)

langchain_classic/chat_models/base.py:442:1: invalid-syntax: Unexpected indentation
k: v
for k, v in kwargs.items()
if k
in (
"tokenizer",
"system_message",
"custom_get_token_ids",
"verbose",
"metadata",
"tags",
)
}
endpoint_params = {
k: v for k, v in kwargs.items() if k not in chat_params
}

llm = HuggingFacePipeline.from_model_id(model_id=model, **kwargs)
return ChatHuggingFace(llm=llm)
llm = HuggingFaceEndpoint(repo_id=model, **endpoint_params)
return ChatHuggingFace(llm=llm, **chat_params)

if model_provider == "groq":
_check_pkg("langchain_groq")
Expand Down Expand Up @@ -496,7 +512,7 @@
raise ValueError(msg)


_SUPPORTED_PROVIDERS = {

Check failure on line 515 in libs/langchain/langchain_classic/chat_models/base.py

View workflow job for this annotation

GitHub Actions / lint (libs/langchain, 3.14) / Python 3.14

Ruff (invalid-syntax)

langchain_classic/chat_models/base.py:515:1: invalid-syntax: Expected a statement

Check failure on line 515 in libs/langchain/langchain_classic/chat_models/base.py

View workflow job for this annotation

GitHub Actions / lint (libs/langchain, 3.10) / Python 3.10

Ruff (invalid-syntax)

langchain_classic/chat_models/base.py:515:1: invalid-syntax: Expected a statement
"openai",
"anthropic",
"azure_openai",
Expand Down
Loading