Code Monkey home page Code Monkey logo

friday-gizmos's Introduction

FRIDAY-Gizmos

Welcome to FRIDAY-Gizmos - an open-source library of toolkit for FRIDAY. Everyone is more than welcomed to contribute you tools to this repo.

About

FRIDAY-Gizmos aims to assemble a comprehensive collection of tools and resources to support various funcationality of FRIDAY.

Contributing

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:

  1. 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.
  2. 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.

Community

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.

License

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.

friday-gizmos's People

Contributors

hccngu avatar lividwo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.