chore/ 删除无用文件

This commit is contained in:
Kevin
2026-03-19 14:36:14 +08:00
parent 2f60858c9c
commit c6e07ce5ca
135 changed files with 2111 additions and 4510 deletions

View File

@@ -2,6 +2,7 @@
回忆录整理 Agent基于传记结构将口语改写为书面语归类到章节
支持异步调用
"""
import json
from typing import Dict, List, Optional
@@ -40,7 +41,9 @@ class MemoryAgent:
try:
prompt = get_chapter_classification_prompt(segments_text)
response = await self.llm.ainvoke(prompt)
content = response.content if hasattr(response, "content") else str(response)
content = (
response.content if hasattr(response, "content") else str(response)
)
category = content.strip().lower()
if category in CHAPTER_CATEGORIES:
return category
@@ -70,7 +73,9 @@ class MemoryAgent:
max_tokens=4096,
)
response = await json_llm.ainvoke(prompt)
content = response.content if hasattr(response, "content") else str(response)
content = (
response.content if hasattr(response, "content") else str(response)
)
content = content.strip()
result = json.loads(extract_json_payload(content))
result["content"] = inject_image_placeholder_template(