refactor: 提取script_dir为模块级变量,清理procmem_sop涉敏感代码
This commit is contained in:
1 parent
eb3fa0041f
commit
c82df6e347
3 files changed
+1
-51
No files matched your search
@@ -41,7 +41,6 @@ def get_system_prompt():
|
||||
|
||||
class GeneraticAgent:
|
||||
def __init__(self):
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
os.makedirs(os.path.join(script_dir, 'temp'), exist_ok=True)
|
||||
self.lock = threading.Lock()
|
||||
self.task_dir = None
|
||||
@@ -137,7 +136,6 @@ class GeneraticAgent:
|
||||
self.history.append(f"[USER]: {rquery}")
|
||||
|
||||
sys_prompt = get_system_prompt() + getattr(self.llmclient.backend, 'extra_sys_prompt', '')
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
handler = GenericAgentHandler(self, self.history, os.path.join(script_dir, 'temp'))
|
||||
if self.handler and 'key_info' in self.handler.working:
|
||||
ki = re.sub(r'\n\[SYSTEM\] 此为.*?工作记忆[。\n]*', '', self.handler.working['key_info']) # 去旧
|
||||
|
||||
Reference in new issue
Block a user