huggingface[patch]: bump deps and increment version to 0.1.0.dev1 (#26263)

This commit is contained in:
ccurme
2024-09-10 16:49:12 -04:00
committed by GitHub
parent bee8994b7e
commit fc08f240ee
5 changed files with 47 additions and 15 deletions

View File

@@ -26,7 +26,7 @@ class HuggingFaceEmbeddings(BaseModel, Embeddings):
)
"""
client: Any #: :meta private:
client: Any = None #: :meta private:
model_name: str = DEFAULT_MODEL_NAME
"""Model name to use."""
cache_folder: Optional[str] = None
@@ -51,7 +51,6 @@ class HuggingFaceEmbeddings(BaseModel, Embeddings):
super().__init__(**kwargs)
try:
import sentence_transformers # type: ignore[import]
except ImportError as exc:
raise ImportError(
"Could not import sentence_transformers python package. "

View File

@@ -30,8 +30,8 @@ class HuggingFaceEndpointEmbeddings(BaseModel, Embeddings):
)
"""
client: Any #: :meta private:
async_client: Any #: :meta private:
client: Any = None
async_client: Any = None
model: Optional[str] = None
"""Model name to use."""
repo_id: Optional[str] = None

View File

@@ -115,8 +115,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 #: :meta private:
async_client: Any = None #: :meta private:
task: Optional[str] = None
"""Task to call the model with.
Should be a task that returns `generated_text` or `summary_text`."""