mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-02 07:42:40 +00:00
reverted directory variable back to optional
This commit is contained in:
@@ -1,16 +1,17 @@
|
|||||||
import os
|
import os
|
||||||
from typing import Any, Type
|
from typing import Any, Optional, Type
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from crewai_tools import BaseTool
|
from ..base_tool import BaseTool
|
||||||
from distutils.util import strtobool
|
from distutils.util import strtobool
|
||||||
|
|
||||||
|
|
||||||
class FileWriterToolInput(BaseModel):
|
class FileWriterToolInput(BaseModel):
|
||||||
filename: str
|
filename: str
|
||||||
content: str
|
content: str
|
||||||
directory: str = "./"
|
directory: Optional[str] = "./"
|
||||||
overwrite: str = "False"
|
overwrite: str = "False"
|
||||||
|
|
||||||
class FileWriterTool2(BaseTool):
|
class FileWriterTool(BaseTool):
|
||||||
name: str = "File Writer Tool"
|
name: str = "File Writer Tool"
|
||||||
description: str = (
|
description: str = (
|
||||||
"A tool to write content to a specified file. Accepts filename, content, and optionally a directory path and overwrite flag as input."
|
"A tool to write content to a specified file. Accepts filename, content, and optionally a directory path and overwrite flag as input."
|
||||||
|
|||||||
Reference in New Issue
Block a user