docs(file-writer): use public .run() in example, not _run()

_run is the internal entrypoint; the public API is .run(). Update the
example so readers aren't shown calling a private method.
This commit is contained in:
theCyberTech
2026-06-28 13:25:15 +08:00
parent c10be0e06e
commit c17da4e3ad

View File

@@ -37,8 +37,8 @@ from crewai_tools import FileWriterTool
# Initialize the tool
file_writer_tool = FileWriterTool()
# Write content to a file in a specified directory (keyword arguments)
result = file_writer_tool._run(
# Write content to a file in a specified directory
result = file_writer_tool.run(
filename='example.txt',
content='This is a test content.',
directory='test_directory',