Add paint function for agent David

This commit is contained in:
Song
2023-09-23 10:44:57 +08:00
parent c289c811ee
commit 85259ca408
8 changed files with 120 additions and 17 deletions
+11
View File
@@ -23,6 +23,7 @@ directory = os.path.dirname(__file__)
sys.path.append(directory + '/../../')
from aios_kernel import AIOS_Version,UserConfigItem,AIStorage,Workflow,AIAgent,AgentMsg,AgentMsgStatus,ComputeKernel,OpenAI_ComputeNode,AIBus,AIChatSession,AgentTunnel,TelegramTunnel,CalenderEnvironment,Environment,EmailTunnel,LocalLlama_ComputeNode,Local_Stability_ComputeNode
import proxy
from aios_kernel import *
@@ -85,6 +86,10 @@ class AIOS_Shell:
return False
async def initial(self) -> bool:
os.environ["LOCAL_STABILITY_URL"] = "http://192.168.100.79:7866"
os.environ["TEXT2IMG_DEFAULT_MODEL"] = "v1-5-pruned-emaonly"
os.environ["TEXT2IMG_OUTPUT_DIR"] = "./"
cal_env = CalenderEnvironment("calender")
await cal_env.start()
Environment.set_env_by_id("calender",cal_env)
@@ -114,6 +119,12 @@ class AIOS_Shell:
await llama_ai_node.start()
# ComputeKernel.get_instance().add_compute_node(llama_ai_node)
local_sd_node = Local_Stability_ComputeNode.get_instance()
if await local_sd_node.initial() is not True:
logger.error("local stability node initial failed!")
return False
ComputeKernel.get_instance().add_compute_node(local_sd_node)
await ComputeKernel.get_instance().start()
AIBus().get_default_bus().register_unhandle_message_handler(self._handle_no_target_msg)