mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-28 15:00:23 +00:00
community[patch]: fix huggingface pydantic 2 init (#26286)
This commit is contained in:
@@ -120,8 +120,8 @@ class HuggingFaceEndpoint(LLM):
|
||||
model_kwargs: Dict[str, Any] = Field(default_factory=dict)
|
||||
"""Holds any model parameters valid for `call` not explicitly specified"""
|
||||
model: str
|
||||
client: Any
|
||||
async_client: Any
|
||||
client: Any = None
|
||||
async_client: Any = None
|
||||
task: Optional[str] = None
|
||||
"""Task to call the model with.
|
||||
Should be a task that returns `generated_text` or `summary_text`."""
|
||||
|
@@ -43,7 +43,7 @@ class HuggingFaceHub(LLM):
|
||||
hf = HuggingFaceHub(repo_id="gpt2", huggingfacehub_api_token="my-api-key")
|
||||
"""
|
||||
|
||||
client: Any #: :meta private:
|
||||
client: Any = None #: :meta private:
|
||||
repo_id: Optional[str] = None
|
||||
"""Model name to use.
|
||||
If not provided, the default model for the chosen task will be used."""
|
||||
|
Reference in New Issue
Block a user