From 3d3b46a7828559290f828f431a61a560bcfb127e Mon Sep 17 00:00:00 2001 From: Nikhil Kumar <64120577+nikhilkmr300@users.noreply.github.com> Date: Mon, 25 Mar 2024 00:29:21 -0700 Subject: [PATCH] docs: Update docs for `HuggingFacePipeline` (#19306) Updated `HuggingFacePipeline` docs to be in sync with list of supported tasks, including translation. - [x] **PR title**: "community: Update docs for `HuggingFacePipeline`" - Where "package" is whichever of langchain, community, core, experimental, etc. is being modified. Use "docs: ..." for purely docs changes, "templates: ..." for template changes, "infra: ..." for CI changes. - Example: "community: add foobar LLM" - [x] **PR message**: - **Description:** Update docs for `HuggingFacePipeline`, was earlier missing `translation` as a valid task - **Issue:** N/A - **Dependencies:** N/A - **Twitter handle:** None - [x] **Add tests and docs**: - [x] **Lint and test**: Run `make format`, `make lint` and `make test` from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/ --- .../community/langchain_community/llms/huggingface_pipeline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/community/langchain_community/llms/huggingface_pipeline.py b/libs/community/langchain_community/llms/huggingface_pipeline.py index e989cd16da8..6957d8d6ec2 100644 --- a/libs/community/langchain_community/llms/huggingface_pipeline.py +++ b/libs/community/langchain_community/llms/huggingface_pipeline.py @@ -27,7 +27,8 @@ class HuggingFacePipeline(BaseLLM): To use, you should have the ``transformers`` python package installed. - Only supports `text-generation`, `text2text-generation` and `summarization` for now. + Only supports `text-generation`, `text2text-generation`, `summarization` and + `translation` for now. Example using from_model_id: .. code-block:: python