Welcome to FRIDAY-Gizmos - an open-source library of toolkit for FRIDAY. Everyone is more than welcomed to contribute you tools to this repo.
FRIDAY-Gizmos aims to assemble a comprehensive collection of tools and resources to support various funcationality of FRIDAY.
We welcome contributions of all forms - whether it's adding new tools, fixing bugs, improving documentation, or sharing ideas.
If you're interested in contributing tools to our collection, it must meet the following requirements:
- The format should be consistent with the example tools:
- You need to import
from friday.action.base_action import BaseAction
and other required Python packages. - The class name should be consistent with the tool's file name.
- The
__init__
function must contain self._description, briefly describing the specific functionality of the tool, which will be used for tool retrieval. - The
__call__
function should contain the tool's specific execution code, with detailed explanations of input and output parameters. - Finally, provide a usage example in the form of comments at the end. This example will assist FRIDAY in using the tool. If the tool is generated by FRIDAY, rest assured, it automatically meets the above requirements.
- You need to import
- The tool must be reusable. For example, if creating a new folder, the folder name should be written as a parameter rather than being hardcoded in the tool's code.
Here is an example of a tool:
from friday.action.base_action import BaseAction
import os
class create_folder(BaseAction):
def __init__(self):
self._description = "Create a folder under the default working directory."
def __call__(self, working_directory=None, folder_name='myfold', *args, **kwargs):
"""
Create a folder under the specified working directory or the default working directory.
Args:
working_directory (str): The path of the working directory. If not provided, the default working directory will be used.
folder_name (str): The name of the folder to be created. Default is 'myfold'.
Returns:
None
"""
# Check if the working_directory is provided, if not, use the default working directory
if working_directory:
os.chdir(working_directory)
# Create the folder
os.makedirs(folder_name)
# Example of how to use the class
# create_folder_action = create_folder()
# create_folder_action(working_directory='/home/heroding/桌面/Jarvis/working_dir', folder_name='my_new_folder')
For specific steps on using these tools with FRIDAY, see FRIDAY.
Join our community to connect with other agent enthusiasts, share your tools and demos, and collaborate on exciting initiatives. You can find us on Slack.
Genius Gizmos is licensed under the MIT License, which means you are free to use, modify, and distribute the code for both commercial and non-commercial purposes.