You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/langchain/agents/tools.py

14 lines
271 B
Python

"""Interface for tools."""
from dataclasses import dataclass
from typing import Callable, Optional
@dataclass
class Tool:
"""Interface for tools."""
name: str
func: Callable[[str], str]
description: Optional[str] = None
return_direct: bool = False