AI Personal Learning
and practical guidance

Bambo: a lightweight and flexible framework for intelligent bodies, with simple configuration of roles and tools to handle multiple loads of tasks

General Introduction

Bambo is a new type of proxy framework that is lighter and more flexible than mainstream frameworks and is able to handle a wide range of load tasks.Bambo achieves efficient proxy functionality by defining all the tools in the tools directory and using asynchronous custom functions. Users can define the model and client parameters they need to call in the llm_client.py file, and then create their own test scripts in the examples folder.Bambo's goal is to provide an efficient and flexible proxy solution for a variety of application scenarios.

Traditional Agent framework each role is an independent Agent, need a "supervisor" to coordinate the work, role switching to go through a complex handover process, LLM calls more often, resulting in poor response speed and smoothness.

Bambo solves this problem by role-playing. Based on Bambo, notebooklm similar effect is realized, there is no TTS in the effect, if needed, you can add the corresponding code in the test script.

Bambo: Lightweight and flexible smart body framework with simple configuration of roles and tools to handle multiple loads of tasks-1


 

Bambo: Lightweight and Flexible Agent Framework to Handle Multiple Loads-1

 

Function List

  • Lightweight and flexible proxy framework
  • Handles a wide range of loads
  • Support for asynchronous custom functions
  • Define and invoke the required model and client parameters
  • Creating and running test scripts
  • Multi-character scenario support
  • Code execution and analysis functions

 

Using Help

Installation process

  1. Cloning Warehouse:
    git clone https://github.com/LB-Young/Bambo.git
    cd Bambo
    
  2. Install the dependencies:
    pip install -r requirements.txt
    
  3. Install PyTorch manually (if necessary):
    pip3 install torch torchvision torchaudio
    

Setup and Configuration

  1. Define all the tools in the tools directory and make sure that custom functions are asynchronous.
  2. Define the model and client parameters for the desired call in the llm_client.py file.
  3. Create your own test scripts in the examples folder, defining the required roles and tools.
  4. Initialize the Bambo object and pass in the required parameters:
    from src.bambo import Bambo
    from src.llm_client import client, model
    from src.tools.code_execute import code_execute
    roles = {
    "finance_expert": "finance_expert",
    
    
    "computer_expert": "computer_expert",
    }
    tools = {}
    bambo = Bambo(client=client, bambo_role=None, roles=roles, tools=tools, agents=None, model=model)
    query = "I am a high school student and now I want to choose a major, but I don't know what to choose. Could you please describe what are the advantages and disadvantages of each of the three majors Finance, Law and Computer Science."
    async for item in bambo.execute(query=query).
    print(item, end="", flush=True)
    

Using Bambo

  1. Run the Bambo interface:
    python examples/notebooklm.py
    
  2. or run the agent in the background:
    nohup python examples/multi_roles.py &> multi_roles.log &
    
  3. The interactive menu will guide you through the following options:
    • Create/update training dataset
    • training model
    • Running Agents
    • Run a complete workflow
    • abort

configure

Edit config.py to customize:

  • Model Selection
  • Training hyperparameters
  • Proxy Settings
  • Responsive Templates
  • Task Filtering

Bambo offers a variety of ways to filter the tasks handled:

  1. Labeling (automatic)
  2. Blacklisting (manual)
May not be reproduced without permission:Chief AI Sharing Circle " Bambo: a lightweight and flexible framework for intelligent bodies, with simple configuration of roles and tools to handle multiple loads of tasks

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish