mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-04 12:39:32 +00:00
partners: support reading HuggingFace params from env (#23309)
Description: 1. partners/HuggingFace module support reading params from env. Not adjust langchain_community/.../huggingfaceXX modules since they are deprecated. 2. pydantic 2 @root_validator migration. Issue: #22448 #22819 --------- Co-authored-by: gongwn1 <gongwn1@lenovo.com>
This commit is contained in:
@@ -325,7 +325,7 @@ class ChatHuggingFace(BaseChatModel):
|
||||
else self.tokenizer
|
||||
)
|
||||
|
||||
@root_validator()
|
||||
@root_validator(pre=False, skip_on_failure=True)
|
||||
def validate_llm(cls, values: dict) -> dict:
|
||||
if (
|
||||
not _is_huggingface_hub(values["llm"])
|
||||
|
Reference in New Issue
Block a user