From c289c811eefab63c03ad333177fee145b62e1435 Mon Sep 17 00:00:00 2001 From: Liu Zhicong Date: Fri, 22 Sep 2023 20:11:27 -0700 Subject: [PATCH] fix bugs --- rootfs/agents/linux_admin/agent.toml | 2 ++ src/aios_kernel/agent.py | 7 +++---- src/knowledge/store.py | 2 +- src/requirements.txt | 13 +++++++++---- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/rootfs/agents/linux_admin/agent.toml b/rootfs/agents/linux_admin/agent.toml index 9eaef70..a984d30 100644 --- a/rootfs/agents/linux_admin/agent.toml +++ b/rootfs/agents/linux_admin/agent.toml @@ -1,6 +1,8 @@ instance_id = "linux_admin" fullname = "linux_admin" owner_env = "bash" +#llm_model_name = "gpt-3.5-turbo-16k-0613" +#max_token_size = 16000 [[prompt]] role = "system" content = """你的名字是linux_admin,是非常资深的linux系统管理员,我理解一些linux,但对linux的sh命令记得不太清楚了。 diff --git a/src/aios_kernel/agent.py b/src/aios_kernel/agent.py index c21e6d8..7681798 100644 --- a/src/aios_kernel/agent.py +++ b/src/aios_kernel/agent.py @@ -280,11 +280,11 @@ class AIAgent: def _get_inner_functions(self) -> dict: if self.owner_env is None: - return None + return None,0 all_inner_function = self.owner_env.get_all_ai_functions() if all_inner_function is None: - return None + return None,0 result_func = [] result_len = 0 @@ -295,8 +295,7 @@ class AIAgent: if func_name not in self.enable_function_list: logger.debug(f"ageint {self.agent_id} ignore inner func:{func_name}") continue - else: - continue + this_func = {} this_func["name"] = func_name this_func["description"] = inner_func.get_description() diff --git a/src/knowledge/store.py b/src/knowledge/store.py index 56ec64b..adcc85a 100644 --- a/src/knowledge/store.py +++ b/src/knowledge/store.py @@ -60,5 +60,5 @@ class KnowledgeStore: def get_vector_store(self, model_name: str) -> VectorBase: if model_name not in self.vector_store: - self.vector_store[model_name] = ChromaVectorStore(self.root, model_name) + self.vector_store[model_name] = ChromaVectorStore(model_name) return self.vector_store[model_name] diff --git a/src/requirements.txt b/src/requirements.txt index 753ce51..e96eb07 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -30,8 +30,8 @@ google-auth==2.23.0 google-cloud==0.34.0 google-cloud-texttospeech==2.14.1 googleapis-common-protos==1.60.0 -grpcio==1.58.0 -grpcio-status==1.58.0 +grpcio +grpcio-status h11==0.14.0 httpcore==0.17.3 httptools==0.6.0 @@ -58,7 +58,7 @@ posthog==3.0.2 proglog==0.1.10 prompt-toolkit==3.0.39 proto-plus==1.22.3 -protobuf==4.24.3 +protobuf pulsar-client==3.3.0 pyasn1==0.5.0 pyasn1-modules==0.3.0 @@ -81,4 +81,9 @@ sympy==1.12 telegram==0.0.1 tokenizers==0.14.0 toml==0.10.0 -chardet \ No newline at end of file +pysocks +chardet +pydub +aiosqlite +python-telegram-bot +pydub \ No newline at end of file