-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 39c154b
Showing
77 changed files
with
12,455 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 3fa6a9273d17e476b9c853cf984a8669 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
IoA & IoT Simulation | ||
####################### | ||
|
||
| | ||
IOT Party: In an IoT scenario, five agents team up for communication and collaboration to prepare for a party based on a guest information list. These agents are HostAssistant, CatererAssistant, EntertainmentAssistant, EnvironmentAssistant, and DrinkerAssistant. Among them, CatererAssistant, EntertainmentAssistant, EnvironmentAssistant, and DrinkerAssistant are four agents utilizing a ReAct agent's communication layer to operate various smart home tools for party preparation. Here is how to start and use it. | ||
|
||
|
||
|
||
Docker Execution | ||
=========================== | ||
* First, create a ReAct Agent image. The http_proxy is optional and is used to employ your machine's proxy when building the Docker container, as some packages require access to blocked websites. If you are not using clash on your computer, replace the 7890 port with your proxy software's port. If you are already outside the firewall, remove this parameter. | ||
|
||
.. code-block:: bash | ||
docker build -f dockerfiles/tool_agents/react.Dockerfile --build-arg http_proxy=http://host.docker.internal:7890 --build-arg https_proxy=http://host.docker.internal:7890 -t react:latest . | ||
| | ||
* Start the containers specified in the docker-compose configuration file. | ||
|
||
.. code-block:: bash | ||
docker-compose -f dockerfiles/compose/IOT_Party.yml up --build | ||
| | ||
* After starting, execute a command in another command-line window, which will initiate a goal. | ||
|
||
.. code-block:: bash | ||
python tests/test_IOT_party.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
IoA & IoT Real-World | ||
####################### | ||
|
||
| | ||
IOT Real Device: In the IoT real device scenario, real Xiaomi smart home devices are accessed through the miio protocol. This includes the Mijia LED Desk Lamp 1S Enhanced Edition (Black), Redmi Projector 2,Mijia Smart DC Standing Fan 1X, Xiaomi Smart Air Purifier 4 Lite, Mijia Smart Hot and Cold Water Dispenser, MI AI Speaker (2nd Gen), and Mijia Smart Anti-bacterial Humidifier 2. Agents enable interconnectivity and communication between devices, coordinating various smart home appliances to create an intelligent and comfortable living experience. | ||
|
||
Docker Execution | ||
=========================== | ||
* First, create a ReAct Agent image. The http_proxy is optional and is for using your local machine's proxy when building the Docker container, as some packages require bypassing internet restrictions. If you are not using clash on your computer, replace the 7890 port with your proxy software's port. If you are already outside the network restrictions, remove this parameter. | ||
|
||
.. code-block:: bash | ||
docker build -f dockerfiles/tool_agents/react.Dockerfile --build-arg http_proxy=http://host.docker.internal:7890 --build-arg https_proxy=http://host.docker.internal:7890 -t react:latest . | ||
| | ||
* Start the containers specified in the docker-compose configuration file. | ||
|
||
.. code-block:: bash | ||
docker-compose -f dockerfiles/compose/IOT_Party.yml up --build | ||
| | ||
* After starting, execute a command in another command-line window, which will initiate a goal. | ||
|
||
.. code-block:: bash | ||
python tests/test_IOT_real.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
GAIA Benchmark | ||
======================================= | ||
|
||
Let's dive into the GAIA benchmark - a rigorous test designed to challenge AI agents' problem-solving skills! | ||
|
||
🤔 What's GAIA? | ||
--------------- | ||
`GAIA <https://arxiv.org/abs/2311.12983>`_ is a benchmark that tests AI systems on a wide range of real-world tasks that require a set of fundamental abilities such as reasoning, multi-modality handling, web browsing, and generally tool-use proficiency. | ||
|
||
🚀 Let's Get Started! | ||
---------------------- | ||
|
||
0. Prepare the docker images: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
We assume that you have followed the `Instruction <../getting_started/installation.html>`_ to prepare the docker images for the server, client and ReAct agent. | ||
|
||
1. Launch the Milvus service: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
First, we need to launch the Milvus service. It's like the librarian of our AI team, helping to organize and retrieve information quickly. | ||
|
||
.. code-block:: bash | ||
docker-compose -f dockerfiles/compose/milvus.yaml up | ||
2. Launch the server and the client: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Now, let's bring our server and client agents online. This command sets up the collaborative environment. | ||
|
||
.. code-block:: bash | ||
docker-compose -f dockerfiles/compose/gaia.yaml up | ||
3. Let the Games Begin! | ||
^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
With everything in place, it's time to start the GAIA benchmark. | ||
|
||
.. code-block:: bash | ||
python scripts/gaia/test_gaia.py --level <level_in_gaia> --max_workers <thread_number> | ||
- Replace `<level_in_gaia>` with your chosen difficulty (1, 2, or 3). | ||
- Set `<thread_number>` to decide how many tasks the team handles simultaneously. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Open Instruction Dataset | ||
======================== | ||
|
||
Let's explore our curated open instruction dataset - a diverse collection of tasks designed to test the versatility of AI agents! | ||
|
||
🤔 What's the Open Instruction Dataset? | ||
--------------------------------------- | ||
This dataset consists of a wide range of open-ended instructions, challenging AI systems to perform tasks across various domains such as information retrieval, coding, mathematical problem-solving, and general assistance. | ||
|
||
🚀 Let's Get Started! | ||
--------------------- | ||
|
||
0. Prepare the docker images: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
We assume that you have followed the `Installation Instructions <../getting_started/installation.html>`_ to prepare the docker images for the server client, **AutoGPT and Open Interpreter**. | ||
|
||
1. Launch the Milvus service: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
First, we need to launch the Milvus service to help manage and retrieve information efficiently: | ||
|
||
.. code-block:: bash | ||
docker-compose -f dockerfiles/compose/milvus.yaml up | ||
2. Launch the server and the clients: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Now, let's bring our server and client agents online, including AutoGPT and Open Interpreter: | ||
|
||
.. code-block:: bash | ||
docker-compose -f dockerfiles/compose/open_instruction.yaml up | ||
3. Start the Open Instruction test: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
With everything set up, it's time to run the open instruction dataset: | ||
|
||
.. code-block:: bash | ||
python scripts/open_instruction/test_open_instruction.py | ||
This script will send the instructions from our curated dataset to the IoA framework, allowing you to observe how AutoGPT and Open Interpreter collaborate to tackle a variety of open-ended tasks. | ||
|
||
🎭 Watch the Collaboration Unfold | ||
--------------------------------- | ||
As the test runs, you'll see AutoGPT and Open Interpreter work together, leveraging their unique capabilities to address a wide range of instructions. This demonstrates the power of IoA in integrating different AI agents to solve diverse, open-ended problems. | ||
|
||
Feel free to examine the outputs and see how the agents complement each other in handling various types of tasks. This test showcases the flexibility and adaptability of the IoA framework in real-world scenarios! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
Collaborative Paper Writing | ||
########################################## | ||
|
||
Let's try out an interesting and simple example of IoA at work: drafting the introduction of the research paper of IoA. | ||
|
||
✍️ Paper Writing with IoA | ||
========================= | ||
|
||
Picture this: Four AI assistants sitting around a virtual table, brainstorming and crafting the perfect introduction for a paper about IoA itself. Here's our dream team: | ||
|
||
1. Weize Chen's Assistant | ||
2. Chen Qian's Assistant | ||
3. Cheng Yang's Assistant | ||
4. ArxivAssistant (our research guru) | ||
|
||
ArxivAssistant is the bookworm of the group. Built on a ReAct agent framework, it's an expert at digging up relevant papers from Arxiv to support our writing. | ||
|
||
⚙️ Try it out | ||
-------------------------------- | ||
|
||
Ready to see these agents in action? Follow these simple steps: | ||
|
||
1. Launch the Milvus service: | ||
|
||
First, we need to launch the Milvus service. It's like the librarian of our AI team, helping to organize and retrieve information quickly. | ||
|
||
.. code-block:: bash | ||
docker-compose -f dockerfiles/compose/milvus.yaml up | ||
2. Create the ReAct Agent image: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. code-block:: bash | ||
docker pull weize/react-agent:latest | ||
docker tag weize/react-agent:latest react-agent:latest | ||
# or | ||
# docker build -f dockerfiles/tool_agents/react.Dockerfile -t react-agent:latest . | ||
3. Set up your credentials: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Add your OpenAI API key and other environment variables to :code:`dockerfiles/compose/.env`. | ||
|
||
.. note:: If you've already set these as system environment variables, you can skip this step! | ||
|
||
4. Launch the IoA writing squad: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. code-block:: bash | ||
docker-compose -f dockerfiles/compose/paper_writing.yml up --build | ||
5. Kickstart the writing process: | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
In a new command line window, run: | ||
|
||
.. code-block:: bash | ||
python scripts/test_paper_writing.py | ||
And there you have it! You've just initiated an AI-powered writing collaboration. | ||
|
||
.. | | ||
.. Paper Writing with Printer | ||
.. ==================================== | ||
.. IOA Paper Writing with Printer builds on the Paper Writing scenario, introducing the FormatCraft Printer which can print out the result of the IOA paper introduction completed in the Paper Writing scenario. Here’s how to start and use it: | ||
.. 1. First, create the ReAct Agent image. | ||
.. .. code-block:: bash | ||
.. docker build -f dockerfiles/tool_agents/latex_printer_react.Dockerfile -t latex_printer_react:latest . | ||
.. | | ||
.. 2. Create a network that allows docker containers to communicate with each other. | ||
.. .. code-block:: bash | ||
.. docker network create agent_network | ||
.. | | ||
.. 3. Start the containers specified in the docker-compose configuration file. | ||
.. .. code-block:: bash | ||
.. docker-compose -f dockerfiles/compose/paper_writing_with_printer.yml up --build | ||
.. | | ||
.. 4. After starting, execute a command in another window command line, which will initiate a goal. | ||
.. .. code-block:: bash | ||
.. python tests/test_paper_writing_with_printer.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
####################### | ||
Agent | ||
####################### | ||
|
||
| | ||
Create a folder named your_case_name under the :code:`im_client/config/cases` directory for your cases. For example: :code:`im_client/config/cases/IOT` | ||
|
||
Create a file named :code:`your_agent_name.yaml` to serve as the configuration file for the agent, depending on the number of agents required, create the corresponding number of YAML files. For example: :code:`im_client/config/cases/IOT/Caterer.yaml` | ||
|
||
:code:`your_agent_name.yaml` is divided into four sections: **server** , **tool_agent**, **comm**, **llm**。 | ||
|
||
Server | ||
=========================== | ||
server: All configuration consists of the following IP Address and Port. | ||
|
||
.. code-block:: yaml | ||
server: | ||
host: http://your_server_IP_address (ex. http://IoA-server) | ||
port: 7788 (setting 7788 port in your server) | ||
hostname: your_server_IP_address (ex. IoA-server) | ||
| | ||
Tool Agent | ||
=========================== | ||
tool agent: Represents different agents integrated into AgentVerse, such as ReAct, OpenInterpreter, etc. The tool_agent is optional and determined by the actual agents required for the case. | ||
|
||
.. code-block:: yaml | ||
tool_agent: | ||
agent_type: ReAct / OpenInterpreter | ||
desc: your tool agent description | ||
tool_config: your tools file path | ||
container_name: docker container name | ||
model: GPT version (ex. gpt-4-1106) | ||
| | ||
Comm | ||
========================== | ||
comm: The communication agent used for communicating with other agents and also for assigning tasks to the tool_agent. | ||
|
||
.. code-block:: yaml | ||
comm: | ||
name: your communication agent name | ||
desc: your communication agent description | ||
type: Thing Assistant / Human Assistant | ||
| | ||
LLM | ||
========================== | ||
llm: Configuration properties for the LLM.。 | ||
|
||
.. code-block:: yaml | ||
llm: | ||
llm_type: openai-chat | ||
model: GPT version (ex. gpt-4-1106) | ||
temperature: our default value is 0.1, it is optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
####################### | ||
docker-compose | ||
####################### | ||
|
||
| | ||
Introduce your OpenAI API Key in the :code:`.env` file under the :code:`dockerfiles/compose` directory: | ||
|
||
.. code-block:: bash | ||
OPENAI_API_KEY="your_openai_api_key" | ||
.. note:: | ||
|
||
The environment variables specified in the :code:`.env` file will be overridden by system environment variables. Please ensure the system environment variables are set correctly. | ||
|
||
|
||
|
||
Docker Compose | ||
===================================== | ||
Create your case-specific :code:`your_case.yml` file in the :code:`dockerfiles/compose` directory. For example: :code:`dockerfiles/compose/IOT_Party.yml` | ||
|
||
.. code-block:: yaml | ||
version: "3" | ||
service: | ||
Name: (ex. Cater) | ||
image: your_needed_image(ex. IoA-agent:latest) | ||
build: | ||
context: ../../ | ||
dockerfile: your_docker_file(ex. dockerfiles/agent.Dockerfile) | ||
args: (如果已连接外网,则不需要此参数) | ||
http_proxy: http://172.27.16.1:7890 | ||
https_proxy: http://172.27.16.1:7890 | ||
container_name: your_container_name | ||
env_file: | ||
- .env | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
volumes: | ||
- OPENAI_API_KEY | ||
- OPENAI_BASE_URL(如果不需要此参数,请删除) | ||
- CUSTOM_CONFIG=your_agent.yaml path(ex. agentverse/config/cases/IOT/Caterer.yaml) | ||
ports: | ||
- your_host_port:your_container_port(ex. 5051:5050) | ||
depends_on: | ||
- Server | ||
- your_needed_server(ex. IOT-Server) | ||
stdin_open: true | ||
tty: true | ||
Oops, something went wrong.