Skip to main content

HuggingFaceToolAgent

Tool agent for calling HuggingFace models. This agent is a wrapper around agents from the transformers library. For more information about the available models, please see the transformers documentation at https://huggingface.co/docs/transformers/transformers_agents. Parameters:
  • name (str): The name of the agent. *args (Any): Additional positional arguments to pass to the underlying Agent class.
  • remote (bool, optional): Flag indicating whether to run the agent remotely. (default: :obj:True) **kwargs (Any): Additional keyword arguments to pass to the underlying Agent class.

init

reset

Resets the chat history of the agent.

step

Runs the agent in single execution mode. Parameters:
  • remote (bool, optional): Flag indicating whether to run the agent remotely. Overrides the default setting. (default: :obj:None) **kwargs (Any): Keyword arguments to pass to the agent.
Returns: str: The response from the agent.

chat

Runs the agent in a chat conversation mode. Parameters:
  • remote (bool, optional): Flag indicating whether to run the agent remotely. Overrides the default setting. (default: :obj:None) **kwargs (Any): Keyword arguments to pass to the agent.
Returns: str: The response from the agent.