Construct a ChatHuggingFace model from a model_id.
from_model_id(
cls,
model_id: str,
task: str | None = None,
backend: Literal['pipeline', 'endpoint', 'text-gen'] = 'pipeline',
**kwargs: Any = {}
) -> ChatHuggingFace| Name | Type | Description |
|---|---|---|
model_id* | str | The model ID of the Hugging Face model. |
task | str | None | Default: NoneThe task to perform (e.g., "text-generation"). |
backend | Literal['pipeline', 'endpoint', 'text-gen'] | Default: 'pipeline'The backend to use. One of "pipeline", "endpoint", "text-gen". |
**kwargs | Any | Default: {}Additional arguments to pass to the backend or ChatHuggingFace. |