File size: 501 Bytes
670dd87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from pydantic import Field

from agency_swarm import BaseTool


class CheckCurrentDir(BaseTool):
    """
    This tool checks the current directory path.
    """

    chain_of_thought: str = Field(
        ...,
        description="Please think step-by-step about what you need to do next, after checking current directory to solve the task.",
        exclude=True,
    )

    class ToolConfig:
        one_call_at_a_time: bool = True

    def run(self):
        import os

        return os.getcwd()