add knowledge pipeline manager

This commit is contained in:
tsukasa
2023-10-19 10:47:45 +08:00
parent ce033c2381
commit f80ec04272
9 changed files with 17 additions and 26 deletions
+1 -3
View File
@@ -16,7 +16,6 @@ from .compute_task import ComputeTaskResult,ComputeTaskResultCode
from .ai_function import AIFunction
from .environment import Environment
from .contact_manager import ContactManager,Contact,FamilyMember
from .knowledge_base import KnowledgeBase
from .compute_kernel import ComputeKernel
from .bus import AIBus
@@ -550,8 +549,7 @@ class AIAgent:
def parser_learn_llm_result(self,llm_result:str):
pass
async def _llm_read_article(self,kb:KnowledgeBase,item:KnowledgeObject) -> ComputeTaskResult:
#kb_env = KnowledgeBaseFileSystemEnvironment()
async def _llm_read_article(self,item:KnowledgeObject) -> ComputeTaskResult:
full_content = item.get_article_full_content()
full_content_len = ComputeKernel.llm_num_tokens_from_text(full_content,self.get_llm_model_name())
if full_content_len < self.get_llm_learn_token_limit():