1234567891011121314151617181920 |
- from abc import ABC, abstractmethod
- from typing import Any
- DEFAULT_MAX_RUN_STEPS = 20
- class BaseAgent(ABC):
- r"""An abstract base class for all agents."""
- @abstractmethod
- def run(self, user_input: str, **kwargs) -> Any:
- """Run the agent with the given user input.
- Args:
- user_input (str): The input from the user.
- **kwargs: Additional keyword arguments.
- Returns:
- Any: The output from the agent.
- """
- pass
|