Add linux_admin agent, funny~

This commit is contained in:
Liu Zhicong
2023-09-21 23:18:52 -07:00
parent 270debef67
commit ad12e795c5
10 changed files with 208 additions and 18 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import unittest
import os
import toml
import os
import sys
directory = os.path.dirname(__file__)
+22 -4
View File
@@ -1,9 +1,22 @@
import os
import sys
import asyncio
directory = os.path.dirname(__file__)
sys.path.append(directory + '/../src')
from aios_kernel import WorkspaceEnvironment
def test_workflow():
async def test_workflow():
env = WorkspaceEnvironment("test")
test_code ="""
import toml
print("hello world")
print(100+23)
toml.dump({"abc":"123"},open("test.toml","w"))
"""
await env.run_code(test_code)
pass
async def _test_llm_parser():
@@ -39,4 +52,9 @@ sfsadfasdf
llm_result = Workflow.prase_llm_result(test_llm_result)
assert len(llm_result.calls) == 1
assert len(llm_result.send_msgs) == 1
print(llm_result)
print(llm_result)
if __name__ == "__main__":
asyncio.run(test_workflow())
print("OK!")