Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP 0.5.1 Meets Preset Version Goals #74

Merged
merged 219 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
9814889
Initial MVP project structs.
waterflier Aug 11, 2023
db93380
Merge pull request #28 from waterflier/main
fiatrete Aug 11, 2023
3d8f6fd
Temporary commit
waterflier Aug 14, 2023
6b39379
complete pkg_system basic design and impl
waterflier Aug 17, 2023
f2c867e
Merge pull request #30 from waterflier/main
fiatrete Aug 18, 2023
814f5cf
complete ai kerne frame code
waterflier Aug 21, 2023
ae09b24
Merge branch 'fiatrete:main' into main
waterflier Aug 21, 2023
760b087
The framework design of the aios kernel has been basically completed,…
waterflier Aug 23, 2023
23963ad
Merge pull request #33 from waterflier/main
fiatrete Aug 23, 2023
5454009
Refactor the code to make it comply with PEP-8 standards:Convert all …
waterflier Aug 23, 2023
1a6cf1a
complete document of sub system package_manager.
waterflier Aug 23, 2023
4a8d81c
knowleadge.drawio
photosssa Aug 24, 2023
ccbef21
framework code has been completed basicly. Through the use of aios_sh…
waterflier Aug 28, 2023
076eeaf
knowleadge.drawio
photosssa Aug 24, 2023
67677ba
objected knowledge base design
photosssa Aug 29, 2023
8ba9f7c
Merge remote-tracking branch 'origin/MVP' into MVP
photosssa Aug 29, 2023
a796086
objected knowledge base implement for email code structure
photosssa Aug 30, 2023
05d2e4a
1.workflow has reached a state of basic functionality.
waterflier Aug 30, 2023
93b6b8e
Improving aios_shell: We now have a basic, expandable framework, alon…
waterflier Aug 31, 2023
fc0ce3b
knowleadge.drawio
photosssa Aug 24, 2023
aa05a3a
objected knowledge base design
photosssa Aug 29, 2023
aef1547
Merge remote-tracking branch 'origin/MVP' into MVP
photosssa Aug 29, 2023
39eb96f
objected knowledge base implement for email code structure
photosssa Aug 30, 2023
febe28e
Add embeding compute task
photosssa Aug 31, 2023
a6f03ff
Add a service: email spider #43
alexsunxl Aug 31, 2023
5bd9775
Add openai text embedding compute task
photosssa Aug 31, 2023
38f9b0e
Merge remote-tracking branch 'origin/MVP' into MVP
photosssa Aug 31, 2023
cff34c6
knowledge base basic flow
photosssa Aug 31, 2023
27f163d
Merge pull request #44 from alexsunxl/MVP
waterflier Sep 1, 2023
b4990e4
Workflow is almost done.
waterflier Sep 1, 2023
25bba07
1. Build a more simple workflow:math_school
waterflier Sep 1, 2023
1bbdf2e
Add basic enviroment support. Can use env values in prompts right now.
waterflier Sep 5, 2023
3eac598
Add stability node (Text2Img)
glen0125 Sep 7, 2023
188595b
Add chromadb based vector store impl and test case
lurenpluto Sep 5, 2023
1e5b9af
Add chunk relate impl and test case
lurenpluto Sep 7, 2023
e8e3812
Add chunk store and chunk list helper
lurenpluto Sep 8, 2023
0d793bd
Remove some test information
glen0125 Sep 9, 2023
27ed3e2
The argument for is_support should be task_type
glen0125 Sep 9, 2023
15dd600
Merge pull request #45 from glen0125/MVP
waterflier Sep 9, 2023
36476eb
Add object and chunk base impl and test cases
lurenpluto Sep 10, 2023
2761883
Add some core objects impl
lurenpluto Sep 10, 2023
f3cc3f6
Update requirements
lurenpluto Sep 10, 2023
6b45cb9
1.Can use aios_shell from new jarvis telgram bot right now
waterflier Sep 10, 2023
7e1f717
Complete AI Function support for Agent.
waterflier Sep 11, 2023
58c0d74
Add chunk reader impl
lurenpluto Sep 11, 2023
8ffc61f
Save email attachment files in folders
alexsunxl Sep 11, 2023
c6e18f9
Change the code style to the class style
alexsunxl Sep 11, 2023
ddc103a
Add EmailObjectBuilder impl and fix some bugs
lurenpluto Sep 11, 2023
213e7b5
Merge pull request #48 from alexsunxl/MVP
waterflier Sep 11, 2023
8ac6065
embedding email object
photosssa Sep 12, 2023
72257b8
Parse and save img tag in the email body
alexsunxl Sep 12, 2023
6e5beb4
save relationship of objects
photosssa Sep 13, 2023
25fec9a
Merge pull request #49 from alexsunxl/main
waterflier Sep 14, 2023
dd3187f
Provide the local llama service
streetycat Sep 14, 2023
aaf0f15
put email object with nested object not object id
photosssa Sep 14, 2023
9cbf29e
implement object relation store with sqlite
photosssa Sep 14, 2023
a0cb548
prompt from knowledge object
photosssa Sep 14, 2023
c4d9794
Refactor chatsession impl, fix bug.
waterflier Sep 14, 2023
937385f
Improve ObjectID with remove object_type and __eq__ method
lurenpluto Sep 14, 2023
e1bba92
Add object relation store impl and test case
lurenpluto Sep 14, 2023
6ea8372
Refactoring the EmailObject build process
lurenpluto Sep 14, 2023
cbfff71
add whisper speech to text node and google text to speech node
Sep 14, 2023
9c1d672
Merge branch 'fiatrete:MVP' into MVP
wugren Sep 14, 2023
b59af5d
Fix object encode
lurenpluto Sep 15, 2023
ef9ab83
Add tunnel support ,and implment TelegramTunnel. Now we can use teleg…
waterflier Sep 16, 2023
43c7048
1) Add e-mail tunnel support 2) Modify all __new__ to get_instance() …
waterflier Sep 16, 2023
f9269e2
add compute node for llama
streetycat Sep 17, 2023
d7bd287
ignore logs for git
streetycat Sep 17, 2023
0e14ced
Merge branch 'MVP' into MVP
waterflier Sep 18, 2023
4df0b74
Merge pull request #52 from wugren/MVP
waterflier Sep 18, 2023
a20f331
0) Complete Docker build scriptes. 1) Refactor storage dir struct fo…
waterflier Sep 18, 2023
b38aae8
Merge branch 'MVP' into MVP
waterflier Sep 18, 2023
ff0495c
Merge pull request #53 from streetycat/MVP
waterflier Sep 18, 2023
d220f6b
`fix bug from merge
waterflier Sep 18, 2023
805dc88
test prompt from knowledge object
photosssa Sep 18, 2023
441583b
test prompt from knowledge object
photosssa Sep 18, 2023
8f4f778
Merge branch 'MVP' into MVP
waterflier Sep 18, 2023
39008ec
Merge pull request #55 from photosssa/MVP
waterflier Sep 18, 2023
5a26b96
1) Improve aios_shell experience, 2) Add 2 formula build-in agents
waterflier Sep 18, 2023
f2a25b1
schedule same nodes with different weight
streetycat Sep 18, 2023
cecf809
add notes for a method
streetycat Sep 18, 2023
a302527
fix merge bugs.
waterflier Sep 18, 2023
2301bab
Merge pull request #56 from streetycat/MVP
waterflier Sep 18, 2023
0d8ee2a
fix merge bugs
waterflier Sep 18, 2023
874aa98
1) Improve Build-in agent "Tracy Wang" 2) fix bug
waterflier Sep 19, 2023
56d15fd
fix workflow bug, disable local LLM temporary.
waterflier Sep 19, 2023
feca072
Improve UserConfig Model, let aios shell remember last target~
waterflier Sep 19, 2023
298ee73
aios shell support /connect command , connect to a agent though tunne…
waterflier Sep 19, 2023
40e14ee
Fix workflow system prompt bugs.
waterflier Sep 20, 2023
42fe1ad
Modify Agent implement by new system pormpt.
waterflier Sep 20, 2023
e6d7b2b
Improve defualt agent Jarvis, fix some bug.
waterflier Sep 20, 2023
a75857a
Javirs control calender~
waterflier Sep 20, 2023
d5073cc
Jarvis use gpt-3.5
waterflier Sep 20, 2023
c9af0cf
add proxy in config
streetycat Sep 19, 2023
c518415
proxy with authorize
streetycat Sep 20, 2023
0de5534
adapt to new value name
streetycat Sep 20, 2023
ee3f9eb
adapt to new value name
streetycat Sep 20, 2023
fdbb0fc
remove local files
streetycat Sep 20, 2023
1971a93
Add a local sd node
glen0125 Sep 20, 2023
0498a0f
Merge branch 'fiatrete:MVP' into MVP
glen0125 Sep 20, 2023
56002b6
Merge pull request #58 from streetycat/MVP
waterflier Sep 20, 2023
9f01a1a
Merge pull request #59 from glen0125/MVP
waterflier Sep 20, 2023
bde9177
Generator prompt from session histroy base on token limit.
waterflier Sep 20, 2023
080a891
Add feature: Users can load their own downloaded agents or workflows …
waterflier Sep 21, 2023
97f4030
Add feature: Agent/Role enable_function config.
waterflier Sep 21, 2023
3cff241
Add a service: email spider #43
alexsunxl Aug 31, 2023
dbb1ab4
The argument for is_support should be task_type
glen0125 Sep 9, 2023
f2b4e53
Merge pull request #44 from alexsunxl/MVP
waterflier Sep 1, 2023
7265e3f
Merge pull request #45 from glen0125/MVP
waterflier Sep 9, 2023
f4933b8
add compute node for llama
streetycat Sep 17, 2023
cd436f4
ignore logs for git
streetycat Sep 17, 2023
acc0495
add whisper speech to text node and google text to speech node
Sep 14, 2023
6b487cb
Merge branch 'MVP' into MVP
waterflier Sep 18, 2023
7cefcd5
Merge pull request #52 from wugren/MVP
waterflier Sep 18, 2023
3672521
Merge pull request #53 from streetycat/MVP
waterflier Sep 18, 2023
d1b8795
objected knowledge base implement for email code structure
photosssa Aug 30, 2023
071452f
Add embeding compute task
photosssa Aug 31, 2023
0eebdf6
Add openai text embedding compute task
photosssa Aug 31, 2023
10d6f2f
knowledge base basic flow
photosssa Aug 31, 2023
218ee44
Add chromadb based vector store impl and test case
lurenpluto Sep 5, 2023
3721f4a
test prompt from knowledge object
photosssa Sep 18, 2023
edbd1c4
add knowledge pipeline
photosssa Sep 20, 2023
a0a45b8
shell knowledge commands
photosssa Sep 21, 2023
46165fd
Merge pull request #60 from photosssa/MVP
waterflier Sep 21, 2023
03036c7
fix bug
waterflier Sep 21, 2023
f7a47a0
Jarvis can query user knowlege base!
waterflier Sep 21, 2023
270debe
Add feature: Contact manager
waterflier Sep 22, 2023
4e45130
story maker
Sep 21, 2023
5c2dd13
Fix story maker bug
Sep 21, 2023
b8345ec
Modify story_maker prompt word
Sep 22, 2023
b195e6a
add google application credentials
Sep 22, 2023
001482e
Modify agent name
Sep 22, 2023
ad12e79
Add linux_admin agent, funny~
waterflier Sep 22, 2023
0d55600
fix bug
waterflier Sep 22, 2023
3061e00
Merge branch 'MVP' into MVP
waterflier Sep 22, 2023
add4357
Merge pull request #62 from wugren/MVP
waterflier Sep 22, 2023
c289c81
fix bugs
waterflier Sep 23, 2023
85259ca
Add paint function for agent David
glen0125 Sep 23, 2023
2be2ef3
Update code & pass test
glen0125 Sep 23, 2023
2662f85
fix bug
waterflier Sep 23, 2023
5857282
Merge pull request #63 from glen0125/MVP
waterflier Sep 23, 2023
55832c6
Story maker support telegram
Sep 24, 2023
7d4b92d
Merge pull request #64 from wugren/MVP
waterflier Sep 25, 2023
7f11edb
Jarvis can update contract, aios_shell can update contract.
waterflier Sep 26, 2023
b271f88
Add /enable /disable Feature
waterflier Sep 26, 2023
fb76066
Add paint env & test stability api
glen0125 Sep 26, 2023
ad50d6a
Remove test info
glen0125 Sep 26, 2023
6d63c3e
Merge pull request #66 from glen0125/MVP
waterflier Sep 26, 2023
857a7ed
fix bugs~
waterflier Sep 27, 2023
943d0e3
Improved the system's exception handling logic, striving to let users…
waterflier Sep 27, 2023
594901d
fix workflow bug.
waterflier Sep 27, 2023
76636f5
knowledge add email source
photosssa Sep 22, 2023
a7d09cd
Remove useless old code
lurenpluto Sep 25, 2023
fe4d079
Add sentence-transformer local text embedding supports
lurenpluto Sep 25, 2023
22ef7f0
Integration of sentence-transformer local text embedding
lurenpluto Sep 25, 2023
d25f295
Eliminate a bug that caused test cases to fail to execute correctly d…
lurenpluto Sep 25, 2023
8b862c0
Improve chunk relate code and add read test case
lurenpluto Sep 25, 2023
411ab61
impl text splitter with tiktoken
photosssa Sep 26, 2023
cf2d917
default text embedding with local node
photosssa Sep 26, 2023
f472689
modify knowledge email source
photosssa Sep 26, 2023
5f346b1
Add sentence-transformer local text embedding supports
lurenpluto Sep 25, 2023
451ab5e
Add local image embedding impls
lurenpluto Sep 26, 2023
1ff3165
Integration local image embedding to aiox shell
lurenpluto Sep 26, 2023
a5e5839
add agent Mia
photosssa Sep 27, 2023
01f0528
fix queue compute node
photosssa Sep 27, 2023
e13e31a
fix queue compute node
photosssa Sep 27, 2023
87f82ec
Add image embedding task and test case
lurenpluto Sep 27, 2023
e858978
Fix text embedding model load error
lurenpluto Sep 27, 2023
babb0a7
Return result code from sd node
glen0125 Sep 27, 2023
5b6de8b
local text embedding ok
photosssa Sep 27, 2023
5146bc1
Add chat history limit for Agent and Role.
waterflier Sep 27, 2023
030e4c4
Adjust the directory structure to prepare for merging into Master.
waterflier Sep 27, 2023
969d595
Merge pull request #67 from glen0125/MVP
waterflier Sep 27, 2023
da6cb5d
Compete "Quick Start"
waterflier Sep 27, 2023
28e6c60
fix document format error.
waterflier Sep 27, 2023
f3c4511
Update QuickStart zh-CN.md
lllucy4901 Sep 27, 2023
3a83783
Add chat history limit for Agent and Role.
waterflier Sep 27, 2023
2938a54
Return result code from sd node
glen0125 Sep 27, 2023
29f83a6
Adjust the directory structure to prepare for merging into Master.
waterflier Sep 27, 2023
b2fc804
Merge pull request #67 from glen0125/MVP
waterflier Sep 27, 2023
98d1298
Compete "Quick Start"
waterflier Sep 27, 2023
1de94a4
fix document format error.
waterflier Sep 27, 2023
f079763
Add sentence-transformer local text embedding supports
lurenpluto Sep 25, 2023
7f3687f
Integration local image embedding to aiox shell
lurenpluto Sep 26, 2023
7f81e25
Add image embedding task and test case
lurenpluto Sep 27, 2023
ecda804
remove /knowledge query command
photosssa Sep 28, 2023
175c3ee
Merge branch 'MVP' into MVP
waterflier Sep 28, 2023
e0c4eb5
Merge pull request #68 from photosssa/MVP
waterflier Sep 28, 2023
7b5c010
local llama
streetycat Sep 28, 2023
97d69e4
fix bugs
streetycat Sep 28, 2023
56c0202
add image insert/query in knowledge base
photosssa Sep 28, 2023
ff4875d
add default knowledge source dir
photosssa Sep 28, 2023
4f6b04f
local llama
streetycat Sep 28, 2023
193c627
rebase to main
streetycat Sep 28, 2023
2bfa099
remove await for synchronous method
streetycat Sep 28, 2023
026bfc1
send image with telegram message
photosssa Sep 28, 2023
861096f
recover the for the agent
streetycat Sep 28, 2023
14a7647
Merge pull request #69 from photosssa/MVP
waterflier Sep 28, 2023
8ccab13
Merge pull request #70 from streetycat/MVP
waterflier Sep 28, 2023
fb31feb
Merge pull request #71 from lllucy4901/patch-1
waterflier Sep 28, 2023
b2f9ddc
Prepare for release.
waterflier Sep 28, 2023
fc0c91d
fix merge bug.
waterflier Sep 28, 2023
a889761
Update README.md
waterflier Sep 29, 2023
0fd1333
Update README.md
waterflier Sep 29, 2023
b1b1b4f
Update README.md
waterflier Sep 29, 2023
c644c2e
fix bug
waterflier Sep 29, 2023
ef36bc0
fix bug
waterflier Sep 29, 2023
b6a06c4
fix bug
waterflier Sep 29, 2023
bc2488f
add query knowledge object in shell
photosssa Sep 29, 2023
f332639
Merge pull request #72 from photosssa/MVP
waterflier Sep 29, 2023
1cef532
fix bug and improve script
waterflier Sep 29, 2023
99f6f12
Merge Llama support for release.
waterflier Sep 29, 2023
55b2701
fix tg tunnel bug.
waterflier Sep 30, 2023
a3c1ef3
update doc
streetycat Sep 30, 2023
431f0d4
Fix bug: Agent process message correctly in Telegeram Gorup
waterflier Oct 1, 2023
ae99571
Merge pull request #73 from streetycat/MVP
waterflier Oct 1, 2023
9932b55
Implement simple "Agent Think Frame" , Tracy can do teach summary now.
waterflier Oct 1, 2023
64bbfa2
Improve “QuickStart.md”
waterflier Oct 3, 2023
a92b3f1
Fix format issue
waterflier Oct 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Prepare for release.
  • Loading branch information
waterflier committed Sep 28, 2023
commit b2f9ddce5baf8eb0b998cce6d0e90579017073b4
246 changes: 148 additions & 98 deletions README.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions doc/QuickStart zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ Jarvis是运行在OpenDAN上的Agent,当OpenDAN退出后,其活动也会被终

我们正在进行的很多研发工作,其中有很大一部分的目标,就是能让你轻松的拥有一个搭载AIOS的Personal Server.相对PC,我们将把这个新设备叫PI(Personal Intelligence),OpenDAN是面向PI的首个OS。

## 更新
```
docker stop aios
docker rm aios
docker pull paios/aios:latest
docker run -v /your/local/myai/:/root/myai --name aios -it paios/aios:latest
```


## 你的私人管家 Jarvis 前来报道!
现在你已经可以随时随地通过Telegram和Jarvis交流了,但只是把他看成更易于访问的ChatGPT,未免有点小瞧他了。让我们来看一下运行在OpenDAN里的Jarvis有什么新本事吧!
Expand Down Expand Up @@ -210,6 +218,8 @@ Knowlege Base扫描并读取文件,产生Agent可以访问的信息的过程
OpenDAN目前默认运行在容器中,因此ai_bash也只能访问docker容器中的文件。这相对安全,但我们还是提醒你不要轻易的把ai_bash这个agent暴露出去,可能会带来潜在的安全风险。




## 我们为什么需要Personal AIOS?
很多人会第一个想到隐私,这是一个重要的原因,但我们不认为这是人们真正离开ChatGPT,选择Personal AIOS的真正原因。毕竟大部分人并不对隐私敏感。而且今天的平台厂商一般都是默默的使用你的隐私赚钱,而很少会真正泄露你的隐私,还算有一点道义。

Expand Down
34 changes: 15 additions & 19 deletions rootfs/agents/Jarvis/agent.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,28 @@ llm_model_name = "gpt-3.5-turbo-16k-0613"
max_token_size = 16000
#enable_kb = "true"
enable_timestamp = "true"
owner_prompt = "我是你的主人{name}"
contact_prompt = "我是你的主人的朋友{name}"
owner_prompt = "I am your master{name}"
contact_prompt = "I am your master's friend{name}"
owner_env = "calender"

[[prompt]]
role = "system"
content = """
你叫Jarvis,是主人的超级私人助理。
你领导一个团队为主人服务,团队的成员有:
Tracy,私人英语老师
Mia,主人的私人文档管理专家
You are named Jarvis, the super personal assistant to the master.
You lead a team serving the master, the members of which are:
Tracy, the private English tutor,
Mia, the master's personal document management expert.

***
你看到的信息里有的有时会带上时间,这是为了让你更好的理解消息的创建。你回复信息时不带这个时间标签。
你在收到的信息后,按如下规则处理
1. 如果你认为团队里有人更适合处理该信息,用下面方法转发消息给他们处理
```
##/send_msg 成员名字
消息内容
```
2.你可以访问主人的Calender,查看主人的日程安排。如果你在处理信息的过程中需要修改主人的日程安排,请直接用合适的方法修改。
3.你要注意和你聊天的人的身份,并根据其身份给予适当的服务。
4.不符合上述规则的信息,请尽力处理。
"""
Sometimes the information you see will carry a timestamp. This is to give you a better understanding of when the message was created. When you reply to messages, you do not include this time stamp.

Upon receiving a message, handle it according to the following rules:
1. If you believe someone in the team is better suited to address the message, forward the message to them using the method below:
##/send_msg "MemberName"
Message content
2.You can access the master's Calendar to view his schedule. If you need to modify the master's schedule while processing a message, please adjust it using the appropriate method.
3.Be mindful of the identity of the person you are chatting with and provide services accordingly based on their status.
4.For messages that don't follow the above rules, do your best to handle them.
"""

#3.你可以访问我的个人信息库,当你处理我的信息时,如果需要用到我的个人信息,请先用合适的方法进行查询,然后再基于查询的结果进行进一步处理后再将结果发给我。
#4.你能根据我的需要对系统进行配置,但在修改任何配置前,请先和我确认。

20 changes: 8 additions & 12 deletions rootfs/agents/Thinker/agent.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@ llm_model_name = "gpt-3.5-turbo-16k-0613"
max_token_size = 14000
#enable_function =["add_event"]
#enable_kb = "true"
enable_timestamp = "true"
owner_prompt = "我是你的主人{name}"
contact_prompt = "我是你的朋友{name}"
owner_env = "calender"

[[prompt]]
role = "system"
content = """
你是世界场最出色的深度思考者,会思考我给你的信息,有时是一些聊天记录。然后你会根据这些信息,产生不超过400字的简报或总结。
你主要通过下面几个方法来生成总结:
1. 尝试理解每一句话的主题,并调用相关操作将其对话和主题的关系记录下来
2. 尝试对信息总涉及到的不同的人的性格进行分析
3. 尝试总结出信息中的重要事件,并将其记录下来
4. 尝试理解不同的人对不同主题或事件的态度
5. 对信息中的关键信息或TODO,比如确定的时间、地点、金额等信息,要保存在总结中。
You are the best deep thinking in the world, and you will think about the information I give you, sometimes some chat records.Then you will generate a briefing or summary of no more than 400 words based on this information.
You mainly use the following methods to generate summary:
1. Try to understand the theme of each sentence, and call the relevant operation to record the relationship between the dialogue and the theme
2. Try to analyze the personality of different people involved in information
3. Try to summarize important events in the information and record it
4. Try to understand the attitude of different people on different topics or events
5. For the key information or TODO in the information, such as the time, place, amount and other information of the certainty, it must be stored in the summary.

你产生总结是简洁深刻没有废话的,也不需要对我有任何礼貌用语。直接给我总结就好。
You have a summary of simplicity and profound nonsense, and you don't need to have any polite words to me.Just give me a summary.
"""
26 changes: 15 additions & 11 deletions rootfs/agents/ai_bash/agent.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
instance_id = "linux_admin"
fullname = "linux_admin"
instance_id = "ai_bash"
fullname = "ai_bash"
owner_env = "bash"
#llm_model_name = "gpt-3.5-turbo-16k-0613"
#max_token_size = 16000
llm_model_name = "gpt-3.5-turbo-16k-0613"
max_token_size = 16000
[[prompt]]
role = "system"
content = """你的名字是linux_admin,是非常资深的linux系统管理员,我理解一些linux,但对linux的sh命令记得不太清楚了。
我给你的输入有两种
1. 标准的linux bash命令,如果你认为这些命令在当前系统上是正确且可执行的,那么你可以直接执行
2. 如果我的命令不对,或则命令可能对系统有害,你要对这些命令进行调整后,先把你调整后的命令告诉我,我确认后你再执行正确的命令
3. 如果我给你的信息不是linux bash操作,而是一些需求。你可以尝试理解后,给出一组实现这些需求的命令,我确认后再执行
4. 其它信息,请站在你专业角度尽力执行。
5. 每次执行命令后,要把结果告诉我。
content = """
## Your name is ai_bash, and you're a very experienced Linux system administrator.

I understand some Linux, but I don't remember the bash commands very clearly.
I will give you the following types of inputs:

1. Standard Linux bash commands. If you think these commands are correct and executable on the current system, then you can execute them directly.
2. If my command is incorrect, or the command may be harmful to the system, you need to adjust these commands. First, tell me the adjusted commands. After I confirm, you can execute the correct commands.
3. If the information I give you is not a Linux bash operation, but some requirements. You can try to understand and then give a set of commands to implement these requirements. After I confirm, execute them.
4. For other information, please do your best to execute from your professional perspective.
5. After each command execution, tell me the result.
"""
2 changes: 1 addition & 1 deletion rootfs/agents/fairy_tale_writer/agent.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ enable_function = []

[[prompt]]
role = "system"
content = "你是一个童话作家,能够写出各种有趣的童话。"
content = "You are a fairy tale writer who can write all kinds of interesting fairy tale."
2 changes: 1 addition & 1 deletion rootfs/agents/manager/agent.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ enable_function = []

[[prompt]]
role = "system"
content = "你有丰富的管理技能,擅长将复杂工作拆解成简单的任务,让团队成员高效协作。"
content = "You have rich management skills, and you are good at disassembling complex work into simple tasks, so that team members are efficiently collaborated."

2 changes: 1 addition & 1 deletion rootfs/agents/math_teacher/agent.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ fullname = "the one"
llm_model_name = "gpt-4-0613"
[[prompt]]
role = "system"
content = "你是精通数学的老师"
content = "You are a teacher who is proficient in mathematics"
2 changes: 1 addition & 1 deletion rootfs/agents/speecher/agent.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ enable_function = ["text_to_speech"]

[[prompt]]
role = "system"
content = "你是一个故事播音员,可以将故事演播成音频,演播前需要将故事改编成播音剧本,提取旁白和角色台词,以及每个角色需要有性别、年龄、以及每句台词的语气等。如果生成了音频文件则告知你的用户。"
content = "You are a stories broadcaster who can broadcast the story into audio. Before the broadcast, you need to adapt the story into a broadcast script, extract the narration and character lines, and each character needs gender, age, and the tone of each line.If you generate audio files, inform your users."
77 changes: 11 additions & 66 deletions src/service/aios_shell/aios_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@
from prompt_toolkit.completion import WordCompleter
from prompt_toolkit.styles import Style


directory = os.path.dirname(__file__)
sys.path.append(directory + '/../../')

from aios_kernel import AIOS_Version,AgentMsgType,UserConfigItem,AIStorage,Workflow,AIAgent,AgentMsg,AgentMsgStatus,ComputeKernel,OpenAI_ComputeNode,AIBus,AIChatSession,AgentTunnel,TelegramTunnel,CalenderEnvironment,Environment,EmailTunnel,LocalLlama_ComputeNode,Local_Stability_ComputeNode,Stability_ComputeNode,PaintEnvironment
from aios_kernel import ContactManager,Contact


import proxy
from aios_kernel import *
from aios_kernel.compute_node_config import ComputeNodeConfig


sys.path.append(directory + '/../../component/')
from agent_manager import AgentManager
Expand Down Expand Up @@ -141,15 +140,11 @@ async def initial(self) -> bool:
return False
ComputeKernel.get_instance().add_compute_node(open_ai_node)

nodes = ComputeNodeConfig.get_instance().initial()
for node in nodes:
node.start()
ComputeKernel.get_instance().add_compute_node(node)

if await AIStorage.get_instance().is_feature_enable("llama"):
llama_ai_node = LocalLlama_ComputeNode()
if await llama_ai_node.initial() is True:
llama_ai_node.start()
await llama_ai_node.start()
ComputeKernel.get_instance().add_compute_node(llama_ai_node)
else:
logger.error("llama node initial failed!")
Expand All @@ -169,7 +164,9 @@ async def initial(self) -> bool:
# if await stability_api_node.initial() is not True:
# logger.error("stability api node initial failed!")
# ComputeKernel.get_instance().add_compute_node(stability_api_node)




local_st_text_compute_node = LocalSentenceTransformer_Text_ComputeNode()
if local_st_text_compute_node.initial() is not True:
logger.error("local sentence transformer text embedding node initial failed!")
Expand All @@ -182,6 +179,7 @@ async def initial(self) -> bool:
else:
ComputeKernel.get_instance().add_compute_node(local_st_image_compute_node)


await ComputeKernel.get_instance().start()

AIBus().get_default_bus().register_unhandle_message_handler(self._handle_no_target_msg)
Expand Down Expand Up @@ -321,7 +319,7 @@ async def handle_contact_commands(self,args):

async def handle_knowledge_commands(self, args):
show_text = FormattedText([("class:title", "sub command not support!\n"
"/knowledge add dir\n"
"/knowledge add email | dir\n"
"/knowledge journal [$topn]\n")])
if len(args) < 1:
return show_text
Expand Down Expand Up @@ -360,54 +358,6 @@ async def handle_knowledge_commands(self, args):
journals = [str(journal) for journal in KnowledgePipline.get_instance().get_latest_journals(topn)]
print_formatted_text("\r\n".join(journals))

if sub_cmd == "query":
if len(args) < 2:
return show_text
prompt = AgentPrompt()
prompt.messages.append({"role": "user", "content":" ".join(args[1:])})
result = await KnowledgeBase().query_prompt(prompt)
print_formatted_text(result.as_str())

async def handle_node_commands(self, args):
show_text = FormattedText([("class:title", "sub command not support!\n"
"/node add llama $model_name $url\n"
"/node rm llama $model_name $url\n"
"/node list\n")])
if len(args) < 1:
return show_text
sub_cmd = args[0]
if sub_cmd == "add":
if len(args) < 2:
return show_text
if args[1] == "llama":
if len(args) < 4:
return show_text

model_name = args[2]
url = args[3]
ComputeNodeConfig.get_instance().add_node("llama", url, model_name)
ComputeNodeConfig.get_instance().save()
node = LocalLlama_ComputeNode(url, model_name)
node.start()
ComputeKernel.get_instance().add_compute_node(node)
else:
return show_text
elif sub_cmd == "rm":
if len(args) < 2:
return show_text
if args[1] == "llama":
if len(args) < 4:
return show_text

model_name = args[3]
url = args[4]
ComputeNodeConfig.get_instance().remove_node("llama", url, model_name)
ComputeNodeConfig.get_instance().save()
else:
return show_text
elif sub_cmd == "list":
print_formatted_text(ComputeNodeConfig.get_instance().list())

async def call_func(self,func_name, args):
match func_name:
case 'send':
Expand Down Expand Up @@ -533,8 +483,6 @@ async def call_func(self,func_name, args):
format_texts.append(("",f"\n-------------------\n"))
return FormattedText(format_texts)
return FormattedText([("class:title", f"chatsession not found")])
case 'node':
return await self.handle_node_commands(args)
case 'exit':
os._exit(0)
case 'help':
Expand Down Expand Up @@ -637,7 +585,7 @@ def print_welcome_screen():
\033[1;94m\tGive your Agent a Telegram account :\033[0m /connect $agent_name
\033[1;94m\tAdd personal files to the AI Knowledge Base. \033[0m
\t\t1) Copy your file to ~/myai/data
\t\t2) /knowledge add dir
\t\t2) /knowlege add $dir
\033[1;94m\tSearch your knowledge base :\033[0m /open Mia
\033[1;94m\tCheck the progress of AI reading personal data :\033[0m /knowledge journal
\033[1;94m\tOpen AI Bash (For Developer Only):\033[0m /open ai_bash
Expand Down Expand Up @@ -717,15 +665,12 @@ async def main():
'/history $num $offset',
'/connect $target',
'/contact $name',
'/knowledge add dir',
'/knowledge add email | dir',
'/knowledge journal [$topn]',
'/set_config $key',
'/enable $feature',
'/disable $feature',
'/list_config',
'/node add llama $model_name $url',
'/node rm llama $model_name $url',
'/node list',
'/show',
'/exit',
'/help'], ignore_case=True)
Expand Down