Update README.md

This commit is contained in:
Liu Zhicong
2023-09-28 19:14:52 -07:00
parent fc0c91d942
commit a889761677
10 changed files with 159 additions and 312 deletions
+141 -216
View File
@@ -6,7 +6,6 @@
OpenDAN is an open source Personal AI OS , which consolidates various AI modules in one place for your personal use. OpenDAN is an open source Personal AI OS , which consolidates various AI modules in one place for your personal use.
## **Project Introduction** ## **Project Introduction**
OpenDAN (Open and Do Anything Now with AI) is revolutionizing the AI landscape with its Personal AI Operating System. Designed for seamless integration of diverse AI modules, it ensures unmatched interoperability. OpenDAN empowers users to craft powerful AI agents—from butlers and assistants to personal tutors and digital companions—all while retaining control. These agents can team up to tackle complex challenges, integrate with existing services, and command smart(IoT) devices. OpenDAN (Open and Do Anything Now with AI) is revolutionizing the AI landscape with its Personal AI Operating System. Designed for seamless integration of diverse AI modules, it ensures unmatched interoperability. OpenDAN empowers users to craft powerful AI agents—from butlers and assistants to personal tutors and digital companions—all while retaining control. These agents can team up to tackle complex challenges, integrate with existing services, and command smart(IoT) devices.
@@ -17,275 +16,198 @@ This project is still in its very early stages, and there may be significant cha
## **Updates** ## **Updates**
After over three months of development, the code for the first version of OpenDAN MVP (0.5.1), driven by the new contributor `waterflier`, has been merged into the Master branch. This version has realized many concepts proposed in the PoC version of OpenDAN and completed the basic framework of the OS, especially defining the application form on AIOS. Currently, the 0.5.1 version operates in an "all-in-one" mode. For 0.5.2, we will advance the formal implementation of the OpenDAN OS kernel based on the partial framework code of the [CYFS Owner Online Device(OOD) OS](https://github.com/buckyos/CYFS) that has already been completed.
![MVP](./doc/res/mvp.png)
The main new features of OpenDAN 0.5.1 (MVP) include:
[x] Rapid installation and deployment of OpenDAN based on Docker, making OpenDAN compatible with a wide range of hardware environments (PC/Mac/RaspberryPI/NAS) through Docker.
[x] The core support for AI Agent's large language model has been switched, now supporting locally running the open-source model (LLaMa).
[x] Introduction of more built-in AI Agents:
[x] Personal Assistant Jarvis : Consultant.Assistant who anages your schedule and communication records. ChatGPT alternative.
[x] Information Assistant Mia : Manage your personal data and sort it into a knowledge base
[x] Private English Teacher Tracy : Your private English teacher
[x] ai_bash (for developers) :No longer need to memory complicated command line parameters! Bash is used by "Find FILES in ~/Documents that Contain OpenDAN".
[x] Connectivity to AI Agent/Workflow via Telegram/Email.
[x] Building a local private Knowledge Base based on existing file or email spiders, enabling AI Agent access to personal data.
[x] Supports text files and common image formats.
[ ] Supports other common formats.
[x] Implemented Workflow: Collaboration of Agents to solve more complex issues.
[x] Built-in Workflow story_maker, integrated the AIGC tool to create audio fairy tale books.
[x] Distributed AI computing core available for complex selections.
[x] Manual download and installation of new Agent/Workflow.
[ ] OpenDAN Store : Agent/Workflow/Models One-Stop installation (Delayed to 0.5.2).
Try it immediately!
Developers click here to learn about OpenDan's system development updates.
## **Intro video - What is OpenDAN?** ## **Intro video - What is OpenDAN?**
Click the image below for a demo: Click the image below for a demo:
[![Intro Video](https://github-production-user-asset-6210df.s3.amazonaws.com/126534313/243310994-4d1ece51-b06d-413d-a2ac-ea5099bb6e94.png)](https://www.youtube.com/watch?v=l2QmsIOXhdQ "Intro Video") [![Intro Video](https://github-production-user-asset-6210df.s3.amazonaws.com/126534313/243310994-4d1ece51-b06d-413d-a2ac-ea5099bb6e94.png)](https://www.youtube.com/watch?v=l2QmsIOXhdQ "Intro Video")
## **Subscribe to updates here** ## **Subscribe to updates here**
https://twitter.com/openDAN_AI <https://twitter.com/openDAN_AI>
## **Installation**
## Installation There are two ways to install the Internal Test Version of OpenDAN:
1. Installation through docker, this is also the installation method we recommend now
2. Installing through the source code, this method may encounter some traditional Pyhont dependence problems and requires you to have a certain ability to solve.But if you want to do secondary development of OpenDAN, this method is necessary.
OpenDAN的internal test版本有两种安装方式: ### Preparation before installation
1.通过Docker安装,这也是我们现在推荐的安装方法
2.通过源代码安装,这种方法可能会遇到一些传统的Pyhont依赖问题,需要你有一定的解决能力。但是如果你想要对OpenDAN进行二次开发,这种方法是必须的。 1. Docker environment
This article does not introduce how to install the docker, execute it under your console
### 安装前准备工作
1. Docker环境
本文不介绍怎么安装Docker,在你的控制台下执行
``` ```
docker --version docker -version
``` ```
如果能够看到Docker的版本号(>20.0),说明你已经安装了Docker.
不知道怎么安装Docker的话,可以参考[这里](https://docs.docker.com/engine/install/)
2. OpenAI的API Token If you can see the docker version number (> 20.0), it means that you have installed Docker.
还没有API Token的话,可以通过[这里](https://beta.openai.com/)申请 If you don't know how to install docker, you can refer to [here](https://docs.docker.com/engine/install/)
(申请API Token对新玩家可能有一些门槛,可以在身边找找朋友,可以让他们给你一个临时的,或则加入我们的内测体验群,我们也会不时放出一些免费体验的API Token,这些Token被限制了最大消费和有效时间)
2. OpenAI API Token
If there is no api token, you can apply for [here](https://beta.openai.com/)
Applying for the API Token may have some thresholds for new players. You can find friends around you, and you can give you a temporary, or join our internal test experience group. We will also release some free experience API token from time to time.These token is limited to the maximum consumption and effective time
### Install
After executing the following command, you can install the Docker Image of OpenDAN
#### 安装OpenDAN
执行下面的命令,就可以安装OpenDAN的Docker Image了
``` ```
docker pull paios/aios:latest docker pull paios/aios:latest
``` ```
## 运行OpenDAN ## **Run OpenDAN**
首次运行OpenDAN需要进行初始化,初始化过程中需要你输入一些信息,因此启动Docker的时候记住要带上 -it参数。
OpenDAN是你的Personal AIOS,因此其运行过程中会产生一些重要的个人数据(比如和Agent的对话记录,日程数据等),这些数据会保存在你的本地磁盘上,因此在启动Docker的时候,我们推荐你将本地磁盘挂载到Docker的容器中,这样才能保证数据的持久化。 The first Run of OpenDAN needs to be initialized. You need to enter some information in the process of initialization. Therefore, when starting the docker, remember to bring the -it parameter.
OpenDAN is your Personal AIOS, so it will generate some important personal data (such as chat history with agent, schedule data, etc.) during its operation. These data will be stored on your local disk. ThereforeWe recommend that you mount the local disk into the container of Docker so that the data can be guaranteed.
``` ```
docker run -v /your/local/myai/:/root/myai --name aios -it paios/aios:latest docker run -v /your/local/myai/:/root/myai --name aios -it paios/aios:latest
``` ```
在上述命令中,我们还为docker run创建的docker 实例起了一个名字叫aios,方便后续的操作。你也可以用自己喜欢的名字来代替
执行上述命令后,如果一切正常,你会看到如下界面 In the above command, we also set up a Docker instance for Docker Run named AIOS, which is convenient for subsequent operations.You can also use your favorite name instead.
![image]
After the first operation of the docker instance is created, it only needs to be executed again:
首次运行完成Docker实例的创建后,再次运行只需要执行:
``` ```
docker start -ai aios docker start -ai aios
``` ```
如果打算以服务模式运行,则不用带 -ai参数: If you plan to run in a service mode (NO UI), you don't need to bring the -AI parameter:
``` ```
docker start aios docker start aios
``` ```
## OpenDAN的首次运行配置 ### Hello, Jarvis
如果你过去没有用字符界面(CLI)的产品,可能会有一点点不习惯。但别紧张,即使在Internal Test版本中,你也只会在极少数的情况下需要使用CLI。 After the configuration is completed, you will enter a AIOS Shell, which is similar to Linux Bash and similar. The meaning of this interface is:
The current user "username" is communicating with the name "Agent/Workflow of Jarvis". The current topic is default.
OpenDAN必须是所有人都能轻松使用的未来操作系统,因此我们希望OpenDAN的使用和配置都是非常友好和简单的。但在Internal Test版本中,我们还没有足够的资源来实现这一目标。经过思考,我们决定先支持以CLI的方式来使用OpenDAN。 Say Hello to your private AI assistant Jarvis !
OpenDAN以LLM为AIOS的内核,通过不同的Agent/Workflow整合了很多很Cool的AI功能,你能在OpenDAN里一站式的体验AI工业的一些最新的成功。激活全部的功能需要做比较多的配置,但首次运行我们只需要做两项配置就可以了 **If everything is OK, you will get a reply from Jarvis after a moment .At this time, the OpenDAN system is running .**
1. LLM内核。OpenDAN是围绕LLM构建的未来智能操作系统,因此系统必须有至少一个LLM内核。 ![MVP](./doc/res/jarvis.png)
OpenDAN以Agent为单位对LLM进行配置,未指定LLM模型名的Agent将会默认使用GPT4(GPT4也是目前最聪明的LLM)。你可以修改该配置到llama或其它安装的Local LLM。今天使用Local LLM需要相当强的本地算力的支持,这需要一笔不小的一次性投入。
但我们相信LLM领域也会遵循摩尔定律,未来的LLM模型会越来越强大,越来越小,越来越便宜。因此我们相信在未来,每个人都会有自己的Local LLM。
2. 你的个人信息,这能让你的私人AI管家Jarvis更好的为你服务。注意这里一定要输入你自己正确的Telegram username ,否则由于权限控制,后续将无法通过Telegram访问OpenDAN上安装的Agent/Workflow。
好的,简单的了解了上述背景后,请按界面提示完成必要信息的输入。 ## **Core Concepts and Features of OpenDAN**
**AI Agent** Driven by a large language model, having own memory.The AI Agent completes tasks through natural language interaction.
**AI Workflow** Organize different AI Agents into an AI Agent Group to complete complex tasks.
![workflow](./doc/res/workflow.png)
**AI Envriment** Supports AI Agents to access file systems, IoT devices, network services, smart contracts, and everything on today's internet once authorized.
**AI Marketplace**: Offer a solution for one-click installation and use of various AI applications, helping users easily access and manage AI apps.
**AI Model Solution**: Provide a unified entry point for model search, download, and access control, making it convenient for users to find and use models suitable for their needs.
**Hardware-specific optimization**: Optimize for specific hardware to enable smooth local running of most open-source AI applications.
**Strict Privacy Protection and Management**: Strictly manage personal data, ranging from family albums to chat records and social media records, and provide a unified access control interface for AI applications.
**Personal Knowlege Base**:
**Integrated AIGC Workflow**: Offer AIGC Agent/Workflow for users to train their own voice models, Lora models, knowledge models, etc., using personal data. Based on these private model data, integrate the most advanced AIGC algorithm to help people release creativity easily and build more COOL and more personalized content.
**Development Framework**: Provide a development framework for customizing AI assistants for specific purposes, making it easy for developers to create unique AI applications / service for their customers.
P.S: ## **Deeply Understanding OpenDAN**
上述配置会保存在`/your/local/myai/etc/system.cfg.toml`中,如果你想要修改配置,可以直接修改这个文件。如果你想要调整配置,可以直接编辑这个文件。
### Build OpenDAN from source code
## (可选)安装本地LLM内核 1. Install the latest version of python (>= 3.11) and pip
首次快速体验OpenDAN,我们强烈的推荐你使用GPT4,虽然他很慢,也很贵,但他也是目前最强大和稳定的LLM内核。OpenDAN在架构设计上,允许不同的Agent选择不同的LLM内核(但系统里至少要有一个可用的LLM内核),如果你因为各种原因无法使用GPT4,可以是用下面方法安装Local LLM. 2. Clone the source code
目前我们只适配了基于Llama.cpp的Local LLM,用下面方法安装
Coming Soon
## Hello, Jarvis!
配置完成后,你会进入一个AIOS Shell,这和linux bash 和相似,这个界面的含义是:
当前用户 "username" 正在 和 名“为Jarvis的Agent/Workflow” 进行交流,当前话题是default。
和你的私人AI管家Jarvis Say Hello吧!
*** 如果一切正常,你将会在一小会后得到Jarvis的回复。此时OpenDAN系统已经正常运行了。***
## 给Jarvis注册Telegram账号
你已经完成了OpenDAN的安装和配置,并已经验证了其可以正常工作。下面让我们尽快回到熟悉的图形界面,回到移动互联网吧!
我们将给Jarvis注册一个Telegram账号,通过Telegram,我们可以使用熟悉的方式和Jarvis进行交流了~
在opendan的aios_shell输入
``` ```
/connect Jarvis git clone https://github.com/fiatrete/OpenDAN-Personal-AI-OS.git
cd OpenDAN-Personal-AI-OS
``` ```
按照提示输入Telegram Bot Token就完成了Jarvis的账号注册. 你可以通过阅读下面文章来了解如何获取Telegram Bot Token 3. Install the dependent python library
https://core.telegram.org/bots#how-do-i-create-a-bot
我们还支持给Agent注册email账号,用下面命令行
``` ```
/connect Jarvis email pip install -r ./src/requirements.txt
``` ```
然后根据提示就可以给Jarvis绑定电子邮件账号了。但由于目前系统并未对email内容定制前置过滤,所以可能会带来潜在的大量LLM访问费用,因此Email的支持是实验性的。我们推荐给Agent创建全新的电子邮件账号。 Waiting for installation.
4. Start OpenDAN through aios_shell
## 以服务方式运行OpenDAN
上述的运行方式是以交互方式运行OpenDAN,这种方式适合在开发和调试的时候使用。在实际使用的时候,我们推荐以服务方式运行OpenDAN,这样可以让OpenDAN在后台默默的运行,不会影响你的正常使用。
先输入
``` ```
/exit python ./src/srvice/aios_shell/aios_shell.py
```
关闭并退出OpenDAN,随后我们再用服务的方式启动OpenDAN:
```
docker start aios
``` ```
Now OpenDAN runs in the development mode, and the directory is:
- AIOS_ROOT: ./rootfs (/opt/aios in docker)
- AIOS_MYAI: ~/myai (/root/myai in docer)
Jarvis是运行在OpenDAN上的Agent,当OpenDAN退出后,其活动也会被终止。因此如果想随时随地通过Telegram和Jarvis交流,请记住保持OpenDAN的运行(不要关闭你的电脑,并保持其网络连接)。 ### OpenDAN Cookbook
实际上,OpenDAN是一个典型的Personal OS,运行在Personal Server之上。关于Personal Servier的详细定义可以参考CYFShttps://www.cyfs.com/)的OOD构想。因此运行在PC或笔记本上并不是一个正式选择,但谁要我们正在Internal Test呢? #### Chapter 1: Hello, Jarvis!
1.1 Installation of OpenDAN
1.2 Initial Configuration of OpenDAN
1.3 Introduction to Agent and Using Jarvis
1.4 Communicating with Jarvis Anytime and Anywhere via Telegram and Email
1.5 Using Jarvis in Daily Life
1.6 Mia and the Knowledge Base
1.7 Introduction to Other Built-in Agents
我们正在进行的很多研发工作,其中有很大一部分的目标,就是能让你轻松的拥有一个搭载AIOS的Personal Server.相对PC,我们将把这个新设备叫PI(Personal Intelligence)OpenDAN是面向PI的首个OS。 Click to Read.
#### Chapter 2: AIGC Workflow Coming Soon
Using Workflow to activate the AIGC feature and let the Agent team (director, artist, and narrator) collaborate to create a unique bedtime story for your child based on your instructions!
2.1 Using Workflow `story_maker`
2.2 Enabling Your Own AIGC Computation Node
2.3 Training and Using Your Own AIGC LoRA Model.
#### Chapter 3: Develop Agent/Workflow on OpenDAN (Writing)
What's the most crucial design aspect of an operating system? Defining new forms of applications!
This article will systematically introduce what future Intelligence Applications look like, how to develop and release Intelligence Applications, and how to connect new-age Intelligence Applications with traditional computing.
3.1 Developing Agents that Run on OpenDAN
3.2 Developing Workflows that Run on OpenDAN
3.3 Extending the Environments Accessible by Agents
3.4 Releasing Various Models Trained by Yourself
3.5 Expanding More Tunnels to Enhance the Accessibility of Agents/Workflow
3.6 Developing Traditional dApps on the Personal Server.
#### Chapter 4: OpenDAN Kernel Development (Writing)
This article will introduce the design and implementation of OpenDAN's architecture
![architecture](./doc/res/design.png)
## 你的私人管家 Jarvis 前来报道! 4.1 Integrate your own LLM core into OpenDAN.
现在你已经可以随时随地通过Telegram和Jarvis交流了,但只是把他看成更易于访问的ChatGPT,未免有点小瞧他了。让我们来看一下运行在OpenDAN里的Jarvis有什么新本事吧! 4.2 Knowledge Base: Expand more file types, allowing Agents to better understand your knowledge graph.
4.3 AI computation engine, integrating more AIGC capabilities, and accessing more computational power.
## 让Jarvis给你安排日程 4.4 OpenDAN's state management: File system and vector database.
4.5 Kernel services and permission isolation.
相信不少朋友有长期使用Outlook等传统Calender软件来管理自己日程的习惯。像我自己通常每周会花至少2个小时来是使用这类软件,当发生一些计划外的情况时,对计划进行手工调整是一个枯燥的工作。作为你的私人管家,Jarvis必须能够帮用自然语言的方式帮你管理日程! 4.6 Smart gateway.
试试和Jarvis说:
```
我周六和Alic上午去爬山,下午去看电影!
```
如果一切正常,你会看到Jarvis的回复,并且已经记住了你的日程安排。
你可以通过自然语言的方式和Jarvis查询
```
我这周末有哪些安排?
```
你会看到Jarvis的回复,其中包含了你的日程安排。
由于Jarvis使用LLM作为思考内核,他能以非常自然的方式和你进行交流,并在合适的时候管理你的日程。比如你可以说
```
我周六有朋友从LA过来,很久没见了,所有周六的约会都移动到周日吧!
```
你会看到Jarvis会自动的帮你吧周六的日程移动到周日。
实际上在整个交流的过程中,你不需要有明确的“使用日程管理语言的意识”,Jarvis作为你的管家,在理解你的个人数据的基础上,会在合适的时机和你进行交流,帮你管理日程。
这是一个非常简单而又常用的例子,通过这个例子,我们可以看到未来人们不再需要学习一些今天非常重要的基础软件了。
欢迎来到新时代!
Agent安排的日程数据都保存在 ~/myai/calender.db 文件中,格式是sqlite DB. 我们后续计划授权让Jarvis可以操作你生产环境中的Calender(比如常用的Google Calender)。但我们还是希望未来,人们可以把重要的个人数据都保存在自己物理上拥有的Personal Server中。
## 介绍Jarvis给你的朋友
把Jarvis的telegram账号分享给你的朋友,可以做一些有趣的事情。比如你的朋友可以在联系不到你的时候,通过Jarvis,你的高级私人助理来处理一些事务性的工作,比如了解你最近的日程安排或计划。
尝试后你会发现,Jarvis并不会按预期工作。是因为站在数据隐私的角度,Jarvis默认只会和“可信的人”进行交流。要实现上面目标,你需要让Jarvis能了解你的人际关系。
### 让Jarvis管理你的联系人
openDAN在 myai/contacts.toml 文件中保存了系统已知的所有人的信息。现在非常简单的分成了两组
1. Family Member,现在该文件里保存里你自己的信息(在系统首次初始化时登陆的)添加
2. Contact,通常是你的好友
任何不存在上述列表中的联系人,都会被系统划分到`Guest`。Jarvis默认不允许和`Guest`进行交流。因此如果你想要让Jarvis和你的朋友进行交流,你需要把他添加到`Contact`中。
你可以手工修改 myai/contacts.toml 文件,也可以通过Jarvis来添加联系人。试试和Jarvis说
```
Jarvis,请添加我的朋友Alic到我的联系人中,他的telegram username是xxxx,email是xxxx
```
Jarvis能够理解你的意图,并完成添加联系人的工作。
添加联系人后,你的朋友就可以和你的私人管家Jarvis进行交流了。
## Agent可以通过OpenDAN进一步访问你的信息 Coming soon ## **Upcoming Roadmap**
你已经知道Jarvis可以通过OpenDAN帮你管理一些重要的个人信息。但这些信息都是“新增信息”。在上世纪80年代PC发明以后,我们的一切都在高数的数字化。每个人都有海量的数字信息,包括你通过智能手机拍摄的照片,视频,你工作中产生的邮件文档等等。过去我们通过文件系统来管理这些信息,在AI时代,我们将通过Knowledge Base来管理这些信息,进入Knowlege Base的信息能更好的被AI访问,让你的Agent更理解你,更好的为你服务,真正成为你的专属私人管家。
Knowlege Base是OpenDAN里非常重要的一个基础概念,也是我们为什么需要Personal AIOS的一个关键原因。Knowlege Base相关的技术目前正在快速发展,因此OpenDAN的Knowlege Base的实现也在快速的进化。目前版本的效果更多的是让大家能体验Knowlege Base与Agent结合带来的新能力。站在系统设计的角度,我们也希望能提供一个对用户更友好,更平滑的方法来把已经存在的个人信息导入。
Knowlege Base功能已经默认开启了,将自己的数据放入Knowlege Base有两种方法
1)把要放入KnowlegeBase的数据复制到 `~myai/data`` 文件夹中
2)通过输入`/knowlege add $dir` 将$dir目录下的数据加入到Knowlege Base中,注意OpenDAN默认运行在容器中,因此$dir是相对于容器的路径,如果你想要加入本地的数据,需要先把本地数据挂载到容器中。
测试时请不要放大量文件,或有非常敏感信息的文件。OpenDAN会在后台不断扫描该文件夹中的文件并加入到Knowlege Base中。
目前能识别的文件格式有限,我们支持的文件类型有文本文件、图片、短视频等。
可以在命令行中通过
```
/knowlege journal
```
来查询扫描任务的状态。
### 认识你的个人信息助手Mia
然后我们可以通过 Agent "Mia"来访问Knwolege Base,试着与Mia交流一下吧!
```
/open Mia
```
### (可选)启用本地Embeding
Knowlege Base扫描并读取文件,产生Agent可以访问的信息的过程被称作Embeding.这个过程需要一定的计算资源,因此我们默认使用OpenAI的Embeding服务来完成这个工作。`这意味着加入Knowlege Base的文件会被上传到OpenAI的服务进行处理`,虽然OpenAI的信誉现在不错,但这依旧有潜在的隐私泄露风险。如果你有足够的本地算力(这个要求比Local LLM低很多),我们推荐你在本地启用Embeding的功能,更好的保护自己的隐私
Coming soon
## bash@aios
通过让Agent可以执行bash命令,也可以非常简单快速的让OpenDAN具有你的私有数据的访问能力。
使用命令
```
/open ai_bash
```
打开ai_bash,然后你就可以在aios_shell的命令行中执行传统的bash命令了。同时你还拥有了智能命令的能力,比如查找文件,你可以用
```
帮我查找 ~/Documents 目录下所有包含OpenDAN的文件
```
来代替输入find命令~ 非常酷吧!
OpenDAN目前默认运行在容器中,因此ai_bash也只能访问docker容器中的文件。这相对安全,但我们还是提醒你不要轻易的把ai_bash这个agent暴露出去,可能会带来潜在的安全风险。
## 我们为什么需要Personal AIOS?
很多人会第一个想到隐私,这是一个重要的原因,但我们不认为这是人们真正离开ChatGTP,选择Personal AIOS的真正原因。毕竟大部分人并不对隐私敏感。而且今天的平台厂商一般都是默默的使用你的隐私赚钱,而很少会真正泄露你的隐私,还算有一点道义。
我们认为:
1)成本是一个重要的决定因素。LLM是非常强大的,边界非常清楚的功能。是新时代的CPU。从产品和商业的角度,ChatGTP类产品只允许用有效的方法来使用它。让我想起了小型机刚刚出现时大家分时使用系统的时代:有用,但有限。要真正发挥LLM的价值,我们需要让每个人都能拥有自己的LLM,并能自由的使用LLM作为任何应用的底层组件,这就必须要通过一个基于LLM理论构建的操作系统来使用。
2)当拥有LLM后,你发现能做到的事情太多了!现在的ChatGPT通过Plugin对LLM能力的扩展,其能力边界是非常有限的,这里既有商业成本的原因,也有传统云服务的法律边界问题:平台要承担的责任太多了。而通过在AIOS中使用LLM,你可以自由的把自然语言,LLM,已有服务,智能设备连接在一起,并不用担心隐私泄露和责任问题(你自己承担了授权给LLM后产生后果的责任)!
## 第二章:OpenDAN的高级功能 Coming Soon
### 使用Workflow,构建个性化的儿童睡前故事
打开AIGC功能
让Agent团队(导演、画家、播音员)共同协作,根据你的指示为你的孩子创作一个独一无二的睡前故事!
### 启用自己的AIGC计算节点
Coming Soon
### 训练和使用自己的私有AIGC模型
Coming Soon
## 第三章:开发运行在OpenDAN上的Agent/Workflow Coming Soon
操作系统最重要的是什么?是定义了一种新应用的形态
OpenDAN现在虽然依然处于早期阶段,但我们对OpenDAN上的应用形态的思考已经基本成型,作为开发者,基于OpenDAN主要有下面几个方向
1. 开发运行在OpenDAN上的Agent
2. 开发运行在OpenDAN上的Workflow
3. 开发可以被Agent访问的Envirnment
4. 发布自己训练的各种模型
5. 支持更多的Tunnel,提高Agent的可访问性
6. 在Personal Server上开发传统的dApp
在系统的内核层面,主要有
1. LLM内核改进
2. 持续改进Knowlege Base:支持更多的文件类型,更好的内容分析能力和知识图谱组织能力,让LLM能更好的理解和访问你的个人信息
3. AI计算引擎,集成更多的AIGC能力 text_to_video,text_to_3d
### 以开发者模式安装并运行 OpenDAN
Coming Soon
### 开发自己的首个Agent并发布
Coming Soon
## **Roadmap**
[x] Release PoC of OpenDAN [x] Release PoC of OpenDAN
[x] 0.5.1 Implement data capture into Knownlege-Base(KB) via Spider, followed by access by AI Agent [x] 0.5.1 Implement personal data embeding to Knownlege-Base(KB) via Spider, followed by access by AI Agent
[ ] 0.5.2 Build a Personal-Center based on the KB and associate the AI Agent with accessible telgram accounts [ ] 0.5.2 Separate user mode and kernel mode, Knowledge Base supports scene format and more Spiders, supports personal AIGC model training
[ ] 0.5.3 - Release for waitlist [ ] 0.5.3 Release Home Environment, allowing Agents to access and control your home's IoT devices
[ ] 0.5.4 First public release [ ] 0.5.x Official version of OpenDAN Alpha. Release OpenDAN SDK 1.0.
[ ] 0.5.5 Incorporate modifications after the first public version, workload depends on feedback
[ ]0.5.6 Official version of MVP
## **Contributing** ## **Contributing**
@@ -295,11 +217,14 @@ We welcome community members to contribute to the project, including but not lim
- Submit a Pull Request to the repository - Submit a Pull Request to the repository
- Participate in discussions and development - Participate in discussions and development
OpenDAN utilizes the SourceDAO smart contract to incentivize the community. Developers who contribute can receive rewards in the form of OpenDAN DAO Tokens. DAO Token holders can collaboratively determine the development direction of OpenDAN. You can learn more about the rules of SourceDAO by reading this articlehttps://github.com/fiatrete/OpenDAN-Personal-AI-OS/issues/25
The DAO governance page for OpenDAN is under development. Once officially launched, all contributors will receive DAO Tokens according to the rules.
## **⭐Star History** ## **⭐Star History**
[![Star History Chart](https://api.star-history.com/svg?repos=fiatrete/OpenDAN-Personal-AI-Server-OS&type=Date)](https://star-history.com/#fiatrete/OpenDAN-Personal-AI-Server-OS&Date) [![Star History Chart](https://api.star-history.com/svg?repos=fiatrete/OpenDAN-Personal-AI-Server-OS&type=Date)](https://star-history.com/#fiatrete/OpenDAN-Personal-AI-Server-OS&Date)
## **License** ## **License**
MIT and SourceDAO The current license is MIT, but it will transition to SourceDAO in the future.
+7 -7
View File
@@ -6,9 +6,9 @@ With OpenDAN, we're putting AI in your hands, making life simpler and smarter.
This project is still in its very early stages, and there may be significant changes in the future. This project is still in its very early stages, and there may be significant changes in the future.
## Installation ## Installation
There are two ways to install the Internal Test Version of OpenDan: There are two ways to install the Internal Test Version of OpenDAN:
1. Installation through docker, this is also the installation method we recommend now 1. Installation through docker, this is also the installation method we recommend now
2. Installing through the source code, this method may encounter some traditional Pyhont dependence problems and requires you to have a certain ability to solve.But if you want to do secondary development of OpenDan, this method is necessary. 2. Installing through the source code, this method may encounter some traditional Pyhont dependence problems and requires you to have a certain ability to solve.But if you want to do secondary development of OpenDAN, this method is necessary.
### Preparation before installation ### Preparation before installation
1. Docker environment 1. Docker environment
@@ -23,8 +23,8 @@ If you don't know how to install docker, you can refer to [here] (https://docs.d
If there is no api token, you can apply for [here](https://beta.openai.com/) If there is no api token, you can apply for [here](https://beta.openai.com/)
(Applying for the API Token may have some thresholds for new players. You can find friends around you, and you can give you a temporary, or join our internal test experience group. We will also release some free experience API token from time to time.These token is limited to the maximum consumption and effective time) (Applying for the API Token may have some thresholds for new players. You can find friends around you, and you can give you a temporary, or join our internal test experience group. We will also release some free experience API token from time to time.These token is limited to the maximum consumption and effective time)
### Install OpenDan ### Install OpenDAN
After executing the following command, you can install the Docker Image of OpenDan After executing the following command, you can install the Docker Image of OpenDAN
``` ```
docker pull paios/aios:latest docker pull paios/aios:latest
``` ```
@@ -32,7 +32,7 @@ docker pull paios/aios:latest
## Run ## Run
The first Run of OpenDAN needs to be initialized. You need to enter some information in the process of initialization. Therefore, when starting the docker, remember to bring the -it parameter. The first Run of OpenDAN needs to be initialized. You need to enter some information in the process of initialization. Therefore, when starting the docker, remember to bring the -it parameter.
OpenDan is your Personal AIOS, so it will generate some important personal data (such as chat history with agent, schedule data, etc.) during its operation. These data will be stored on your local disk. ThereforeWe recommend that you mount the local disk into the container of Docker so that the data can be guaranteed. OpenDAN is your Personal AIOS, so it will generate some important personal data (such as chat history with agent, schedule data, etc.) during its operation. These data will be stored on your local disk. ThereforeWe recommend that you mount the local disk into the container of Docker so that the data can be guaranteed.
``` ```
docker run -v /your/local/myai/:/root/myai --name aios -it paios/aios:latest docker run -v /your/local/myai/:/root/myai --name aios -it paios/aios:latest
@@ -79,7 +79,7 @@ The above configuration will be saved in the `/your/local/myai/etc/system.cfg.to
## (Optional) Install the local LLM kernel ## (Optional) Install the local LLM kernel
For the first time quickly experience OpenDan, we strongly recommend you to use GPT4. Although he is very slow and expensive, he is also the most powerful and stable LLM core at present.OpenDan In the architecture design, different agents are allowed to choose different LLM kernels (but at least one available LLM kernel in the system should be available in the system). If you cannot use GPT4 for various reasons, you can use the Local LLM. For the first time quickly experience OpenDAN, we strongly recommend you to use GPT4. Although he is very slow and expensive, he is also the most powerful and stable LLM core at present.OpenDAN In the architecture design, different agents are allowed to choose different LLM kernels (but at least one available LLM kernel in the system should be available in the system). If you cannot use GPT4 for various reasons, you can use the Local LLM.
At present, we only adapt to LOCAL LLM based on LLaMa.CPP, and use the following method to install At present, we only adapt to LOCAL LLM based on LLaMa.CPP, and use the following method to install
Coming Soon Coming Soon
@@ -96,7 +96,7 @@ Say Hello to your private AI assistant Jarvis !
You've successfully installed and configured OpenDAN, and verified that it's working properly. Now, let's quickly return to the familiar graphical interface, back to the mobile internet world! You've successfully installed and configured OpenDAN, and verified that it's working properly. Now, let's quickly return to the familiar graphical interface, back to the mobile internet world!
We'll be registering a Telegram account for Jarvis. Through Telegram, you can communicate with Jarvis in a way that feels familiar. We'll be registering a Telegram account for Jarvis. Through Telegram, you can communicate with Jarvis in a way that feels familiar.
In the opendan's aios_shell, type: In the OpenDAN's aios_shell, type:
``` ```
/connect Jarvis /connect Jarvis
``` ```
Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

-76
View File
@@ -1,76 +0,0 @@
# workflow实例场景
# 能展示sub workflow
# 能展示env的整合
# 能展示filter的使用
# 能展示function的调用
# 能展示基于工作目标/KPI的sub workflow迭代流程
# 多人场景安排
# 例子:举办一个团队活动
# 方案讨论(通过交互引导的方式收集主人的需求)与确定
# 活动前:
# 通讯员,对接管理参加活动的人的情况 (email spider)
# 酒店预订 简单:搜索(酒店评价) 处理异常
# 行程(票务)预订 :搜索,处理异常
# 餐饮预订:给出方案,确定细节,预订
# 活动中:
# 进行统计和分析,调整设备
# 安保,空调,音乐,拍照,录像
# 响应紧急情况
# 活动结束后:
# 整理照片,视频,进行必要的二次创作,发送给相关人员
# 对活动进行总结,提出改件意见(指导下一次活动)
# 1. 人员
# 主管,负责和客户沟通,并对每个环境的结果进行总结
# 嘉宾对接
# 酒店组
# 行程组
# 财务组
# 多媒体组
name = "plan_maker"
[filter]
"*" = "manager"
[roles.manager]
name = "manager"
fullname = "经理"
agent="manager"
[[roles.manager.prompt]]
role="system"
content="""
你是一个活动策划公司的经理,与客户对接并向团队下达指令。你的团队分为下面几个小组:嘉宾对接组,酒店预定组,行程预订组,财务组,活动摄像组。活动策划分为四个阶段:方案讨论,活动前,活动中,活动后。你会根据客户的需求,对团队进行分工,分别完成各个阶段的工作。你的基本工作模式是:
1. 收到客户的明确的指令后,基于客户的已有信息和客户商量活动方案,和活动策划公司无关的业务你会回答‘与我无关’。当和客户完成活动方案的确认后,你会将拆解后的任务分配给各个小组
2. 根据目前已经确认的活动方案,你要根据时间适时的检查不同小组的工作情况。当收到小组的工作情况反馈后,你会站在全局的角度判断是否需要调整活动方案,如果需要调整,你会和客户商量重新确定方案,然后再将调整后的方案分配给各个小组。
3. 有时工作小组会主动与你沟通,反馈一些问题。你会站在全局的角度给与指导,适当的调整工作小组的工作目标。如果反馈的问题需要你和客户沟通,你会和客户沟通后重新确定方案。再将调整后的方案分配给受到影响各个小组。
4. 当你决定要和工作小组通信时,请使用 sendmsg(小组名称,内容) 的形式。
"""
[sub_workflows]
[sub_workflows."嘉宾对接组"]
name="嘉宾对接组"
filter = {"*" = "leader"}
# 展现读取email和发送email与嘉宾沟通的能力
[sub_workflows."嘉宾对接组".environments.email]
new_mail = "收到来自{event.data.from},标题为{event.data.subject}的邮件,内容为{event.data.content}的电子邮件" # 这里将new_mail事件转换为了一个来自环境的message
[sub_workflows."嘉宾对接组".roles.leader]
name = "leader"
fullname = "嘉宾对接组组长"
agent="email_reader"
[[sub_workflows."嘉宾对接组".roles.leader.prompt]]
role="system"
content="""你是一家活动策划公司的嘉宾对接组的组长,你的工作是基于已知信息,当前活动信息、公司经理的指令与嘉宾沟通,收集嘉宾的信息,然后将信息反馈给经理。在你看来,参加活动的多少有成员都是嘉宾,你可以通过你知道的信息给不同的成员进行分级。你的基本工作模式是:
1. 处理收到的邮件,如果邮件来自嘉宾,你会尝试从邮件的表态和内容中分享嘉宾的需要,并结合你对当前活动方案的理解判断是否需要和经理沟通,如果需要和经理沟通,你会将嘉宾的需求总结和告诉经理。不需要沟通的事项可以直接回复嘉宾。
2. 你总是通过 call_function(get_env,'parent.topic')的形式查询当前的活动方案。等待函数返回后,你会根据函数的返回结果继续处理上一个对话。
3. 当你决定要和经理通信时,请使用 sendmsg(manager,内容)的形式,内容的长度不超过200字。
4. 当你决定要回复嘉宾时,请使用 call(sendmail,嘉宾邮件地址,邮件标题,内容) 的形式,内容的长度不超过500字。"""
# 这里是孤立工作模式,组长只和经理沟通,也可以赋予其和其它组沟通的能力
+1 -1
View File
@@ -25,5 +25,5 @@ from .local_stability_node import Local_Stability_ComputeNode
from .stability_node import Stability_ComputeNode from .stability_node import Stability_ComputeNode
from .local_st_compute_node import LocalSentenceTransformer_Text_ComputeNode,LocalSentenceTransformer_Image_ComputeNode from .local_st_compute_node import LocalSentenceTransformer_Text_ComputeNode,LocalSentenceTransformer_Image_ComputeNode
AIOS_Version = "0.5.1, build 2023-9-27" AIOS_Version = "0.5.1, build 2023-9-28"
+3 -3
View File
@@ -196,9 +196,9 @@ class OpenAI_ComputeNode(ComputeNode):
if model_name.startswith("gpt-"): if model_name.startswith("gpt-"):
return True return True
if task.task_type == ComputeTaskType.TEXT_EMBEDDING: #if task.task_type == ComputeTaskType.TEXT_EMBEDDING:
if task.params["model_name"] == "text-embedding-ada-002": # if task.params["model_name"] == "text-embedding-ada-002":
return True # return True
return False return False
-2
View File
@@ -116,7 +116,6 @@ class AIOS_Shell:
knowledge_env = KnowledgeEnvironment("knowledge") knowledge_env = KnowledgeEnvironment("knowledge")
Environment.set_env_by_id("knowledge",knowledge_env) Environment.set_env_by_id("knowledge",knowledge_env)
cal_env = CalenderEnvironment("calender") cal_env = CalenderEnvironment("calender")
await cal_env.start() await cal_env.start()
Environment.set_env_by_id("calender",cal_env) Environment.set_env_by_id("calender",cal_env)
@@ -140,7 +139,6 @@ class AIOS_Shell:
return False return False
ComputeKernel.get_instance().add_compute_node(open_ai_node) ComputeKernel.get_instance().add_compute_node(open_ai_node)
if await AIStorage.get_instance().is_feature_enable("llama"): if await AIStorage.get_instance().is_feature_enable("llama"):
llama_ai_node = LocalLlama_ComputeNode() llama_ai_node = LocalLlama_ComputeNode()
if await llama_ai_node.initial() is True: if await llama_ai_node.initial() is True: