load_huggingface_tool#

langchain_community.agent_toolkits.load_tools.load_huggingface_tool(task_or_repo_id: str, model_repo_id: str | None = None, token: str | None = None, remote: bool = False, **kwargs: Any) BaseTool[source]#

Loads a tool from the HuggingFace Hub.

Parameters:
  • task_or_repo_id (str) – Task or model repo id.

  • model_repo_id (str | None) – Optional model repo id. Defaults to None.

  • token (str | None) – Optional token. Defaults to None.

  • remote (bool) – Optional remote. Defaults to False.

  • kwargs (Any) – Additional keyword arguments.

Returns:

A tool.

Raises:
  • ImportError – If the required libraries are not installed.

  • NotImplementedError – If multimodal outputs or inputs are not supported.

Return type:

BaseTool

Examples using load_huggingface_tool