Git Product home page Git Product logo

epfl-dlab / aiflows Goto Github PK

View Code? Open in Web Editor NEW
216.0 109.0 11.0 141.39 MB

πŸ€–πŸŒŠ aiFlows: The building blocks of your collaborative AI

Home Page: https://epfl-dlab.github.io/aiflows/

License: MIT License

Makefile 0.07% Python 27.51% CSS 2.25% Batchfile 0.08% HTML 0.18% TypeScript 1.95% JavaScript 0.56% Jupyter Notebook 67.40%
agent agents ai ai-framework ai-frameworks chatgpt copilot gpt language-model language-models

aiflows's Introduction


image

Website Static Badge Documentation PyPi version Documentation

πŸ“’ Major update: We’re excited to announce the release of version 1.1.0 of our project! This release introduces significant enhancements to aiFlows, highlighted by the introduction of the Flows engine. This engine empowers concurrent execution and peer-to-peer distributed collaboration, revolutionizing the way you interact with your projects.

We are still polishing some aspects of the developer experience, so share your feedback on Discord!

πŸ€–πŸŒŠ aiFlows embodies the Flows abstraction and greatly simplifies the design and implementation of complex (work)Flows involving humans, AI systems, and tools. In collaboration with CoLink, it enables:

  • 🧩 Modularity: Flows can be stacked like LEGO blocks into arbitrarily nested structures with the complexity hidden behind a message-based interface
  • 🀝 Reusability: Flows shared on the FlowVerse can be downloaded and tailor-fitted to your needs
  • πŸ•Έ Remote Peer-to-Peer Collaboration: Flows can readily engage in a peer-to-peer collaboration with other remote Flows that could run anywhere
  • πŸ”€ Concurrency: Flows can readily implement concurrent execution (e.g., a Flow being invoked by multiple Flows or a Flow invoking multiple Flows concurrently) –– without any additional complexity

Quick Install

The library is compatible with Python 3.10+.

pip install aiflows
Other installation options

Install the bleeding-edge version

git clone [email protected]:epfl-dlab/aiflows.git
cd aiflows
pip install -e .

Flows in a Nutshell

The framework is centered around Flows and messages. Flows are independent, self-contained, goal-driven computational building blocks that can complete semantically meaningful units of work. To exchange information, Flows communicate via a standardized message-based interface. Messages can be of any type the recipient Flow can process.

image

The Flows framework exemplified. The first column depicts examples of tools. Notably, in the Flows framework, AI systems correspond to tools. The second column depicts Atomic Flows, effectively minimal wrappers around tools constructed from the example tools. The third column depicts examples of Composite Flows defining structured interaction between Atomic or Composite Flows. The fourth column illustrates a specific Composite competitive coding Flow as those used in the experiments in the paper. The fifth column outlines the structure of a hypothetical Flow, defining a meta-reasoning process that could support autonomous behavior.

FlowVerse in a Nutshell

The FlowVerse is a repository of Flows (powered by the πŸ€— HuggingFace hub) created and shared by our community for everyone to use! With aiFlows, Flows can be readily downloaded, used, extended, or composed into novel, more complex Flows. For instance, sharing a Flow that uses only API-based tools (tools subsume models in the Flows abstraction) is as simple as sharing a config file (e.g., here is the AutoGPT Flow on FlowVerse). For the ones using ChatGPT, you could think of them as completely customizable open-source GPTs(++).

The FlowVerse is continuously growing. To explore the currently available Flows, check out the πŸ€²β”‚flow-sharing Forum on the Discord server. Additionally, the Tutorials and Detailed Examples in the Getting Started sections cover some of the Flows we provide in more detail (e.g., the ChatAtomicFlow and QA, VisionAtomicFlow and VisualQA, ReAct and ReAct with human feedback, AutoGPT, etc.).

Why should I use aiFlows?

AI is set to revolutionize the way we work. Our mission is to support AI researchers and to allow them to seamlessly share advancements with practitioners. This will establish a feedback loop, guiding progress toward beneficial directions while ensuring that everyone can freely access and benefit from the next-generation AI tools.

You will benefit from:

  • The ability to design, implement, and study arbitrarily complex interactions -- even interactions that require concurrent execution or remote collaboration
  • Complete control and customizability (e.g., the tools, the specific Flows and the information they have access to, the choice of models and their deployment, etc.)

Additionally, as a researcher, you will benefit from:

  • The ability to readily reproduce, reuse, or build on top of Flows shared on the FlowVerse and systematically study them across different settings (the infrastructure in the cc_flows repository could be a useful starting point in future studies)
  • The ability to readily make your work accessible to practitioners and other researchers and access their feedback.

Additionally, as a practitioner, you will benefit from:

  • The ability to readily reuse or build on top of Flows shared on the FlowVerse
  • The ability to readily give access to your Flows to others
  • Direct access to any advancements in the field.

To develop the next-generation AI tools, we will need a principled abstraction that supports concurrent execution and peer-to-peer remote collaboration. At the same time, to maximize their benefits, developers and researchers will need to have complete control over their workflows. aiFlows strives to empower you to make each Flow your own! See the contribute section for more information.

[Getting Started]

Here, you'll see how you can run inference with your first question-answering Flow, and you can trivially change between vastly different question-answering Flows thanks to the modular abstraction and FlowVerse!

In this tutorial, we introduce you to the library's features through a walkthrough of how to build useful Flows of gradually increasing complexity.

We are constantly optimizing our Flow development workflow (pun intended:). In this short guide, we share our best tips so that you don't have to learn the hard way.

Many of the recently proposed prompting and collaboration strategies involving tools, humans, and AI models are, in essence, specific Flows (see the figure below). In the links above, you'll find a detailed walkthrough of how to build some representative workflows.

image

Check out the examples folder for more examples of how to build and use aiFlows.

Contribute

As mentioned above, our goal is to make Flows a community-driven project that will benefit researchers and developers alike (see the Why should I use aiFlows? section), and to achieve this goal, we need your help.

You can become a part of the project in a few ways:

  • contribute to the aiFlows codebase: this will directly improve the library and benefit everyone using it
  • contribute to the FlowVerse: by making your work accessible to everyone, others might improve your work and build on it, or you can build on others' work
  • use the library in your creative projects, push it to its limits, and share your feedback: the proof of the pudding is in the eating, and the best way to identify promising directions, as well as important missing features, is by experimenting
  • last but not least, ⭐ the repository and πŸ“£ share aiFlows with your friends and colleagues; spread the word ❀️

We have tried to find a way for anyone to benefit by contributing to the project. The Contribution Guide describes our envisioned workflows in more detail (we would love to hear your feedback on this -- the Discord server already has a channel for it :)).

In a nutshell, this is just the beginning, and we have a long way to go. Stay tuned, and let's work on a great (open-source) AI future together!

Citation

If you found this work useful, please cite it as:

@misc{josifoski2023flows,
      title={Flows: Building Blocks of Reasoning and Collaborating AI},
      author={Martin Josifoski and Lars Klein and Maxime Peyrard and Baldwin Nicolas and Yifei Li and Saibo Geng and Julian Paul Schnitzler and Yuxing Yao and Jiheng Wei and Debjit Paul and Robert West},
      year={2023},
      eprint={2308.01285},
      archivePrefix={arXiv},
      primaryClass={cs.AI}
}

aiflows's People

Contributors

3represents avatar cervisiarius avatar lhk avatar martinj96 avatar nbaldwin98 avatar peyrardm avatar saibo-creator avatar staverm avatar tachi-67 avatar tohrnii avatar yeeef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aiflows's Issues

CLI utility to generate flow config files

Description of feature

It might be helpful to have a CLI utility that helps developers generate flow config files. There are probably a few different ways to accomplish this and may be worth a discussion. Apologies if something accomplishing the same already exists and I missed it.

Motivation (optional)

No response

Expected behavior (optional)

No response

Additional Information (optional)

No response

Automatically install pip requirements of a Flow from the FlowVerse

Description of feature

When retrieving a Flow from the FlowVerse using aiflows.flow_verse.sync_dependencies, prompt the user to confirm whether they would like to download the flow's pip requirements as well. These requirements are specified in the pip_requirements.txt file of the respective flow.

Motivation (optional)

Currently, the manual download of requirements can be inconvenient

Expected behavior (optional)

No response

Additional Information (optional)

No response

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.