update:发布0.6.3前的准备工作,changlog,readme,配置文件修改
This commit is contained in:
@@ -132,7 +132,7 @@ class BotConfig:
|
||||
# llm_reasoning_minor: Dict[str, str]
|
||||
llm_normal: Dict[str, str] # LLM普通
|
||||
llm_topic_judge: Dict[str, str] # LLM话题判断
|
||||
llm_summary_by_topic: Dict[str, str] # LLM话题总结
|
||||
llm_summary: Dict[str, str] # LLM话题总结
|
||||
llm_emotion_judge: Dict[str, str] # LLM情感判断
|
||||
embedding: Dict[str, str] # 嵌入
|
||||
vlm: Dict[str, str] # VLM
|
||||
|
||||
@@ -279,8 +279,7 @@ class BotConfig:
|
||||
# llm_reasoning_minor: Dict[str, str] = field(default_factory=lambda: {})
|
||||
llm_normal: Dict[str, str] = field(default_factory=lambda: {})
|
||||
llm_topic_judge: Dict[str, str] = field(default_factory=lambda: {})
|
||||
llm_summary_by_topic: Dict[str, str] = field(default_factory=lambda: {})
|
||||
llm_emotion_judge: Dict[str, str] = field(default_factory=lambda: {})
|
||||
llm_summary: Dict[str, str] = field(default_factory=lambda: {})
|
||||
embedding: Dict[str, str] = field(default_factory=lambda: {})
|
||||
vlm: Dict[str, str] = field(default_factory=lambda: {})
|
||||
moderation: Dict[str, str] = field(default_factory=lambda: {})
|
||||
@@ -481,8 +480,7 @@ class BotConfig:
|
||||
# "llm_reasoning_minor",
|
||||
"llm_normal",
|
||||
"llm_topic_judge",
|
||||
"llm_summary_by_topic",
|
||||
"llm_emotion_judge",
|
||||
"llm_summary",
|
||||
"vlm",
|
||||
"embedding",
|
||||
"llm_tool_use",
|
||||
|
||||
@@ -14,7 +14,7 @@ class SearchKnowledgeFromLPMMTool(BaseTool):
|
||||
"""从LPMM知识库中搜索相关信息的工具"""
|
||||
|
||||
name = "lpmm_search_knowledge"
|
||||
description = "从知识库中搜索相关信息"
|
||||
description = "从知识库中搜索相关信息,如果你需要知识,就使用这个工具"
|
||||
parameters = {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -81,4 +81,14 @@
|
||||
- **基于人格生成预设知识:**
|
||||
- 开发利用 LLM 和人格配置生成背景知识的功能。
|
||||
- 这些知识应符合角色的行为风格和可能的经历。
|
||||
- 作为一种"冷启动"或丰富角色深度的方式。
|
||||
- 作为一种"冷启动"或丰富角色深度的方式。
|
||||
|
||||
|
||||
## 开发计划TODO:LIST
|
||||
|
||||
- 人格功能:WIP
|
||||
- 对特定对象的侧写功能
|
||||
- 图片发送,转发功能:WIP
|
||||
- 幽默和meme功能:WIP
|
||||
- 小程序转发链接解析
|
||||
- 自动生成的回复逻辑,例如自生成的回复方向,回复风格
|
||||
@@ -29,7 +29,7 @@ class NormalChatGenerator:
|
||||
)
|
||||
|
||||
self.model_sum = LLMRequest(
|
||||
model=global_config.llm_summary_by_topic, temperature=0.7, max_tokens=3000, request_type="relation"
|
||||
model=global_config.llm_summary, temperature=0.7, max_tokens=3000, request_type="relation"
|
||||
)
|
||||
self.current_model_type = "r1" # 默认使用 R1
|
||||
self.current_model_name = "unknown model"
|
||||
|
||||
@@ -189,7 +189,7 @@ class Hippocampus:
|
||||
def __init__(self):
|
||||
self.memory_graph = MemoryGraph()
|
||||
self.llm_topic_judge = None
|
||||
self.llm_summary_by_topic = None
|
||||
self.llm_summary = None
|
||||
self.entorhinal_cortex = None
|
||||
self.parahippocampal_gyrus = None
|
||||
self.config = None
|
||||
@@ -203,7 +203,7 @@ class Hippocampus:
|
||||
# 从数据库加载记忆图
|
||||
self.entorhinal_cortex.sync_memory_from_db()
|
||||
self.llm_topic_judge = LLMRequest(self.config.llm_topic_judge, request_type="memory")
|
||||
self.llm_summary_by_topic = LLMRequest(self.config.llm_summary_by_topic, request_type="memory")
|
||||
self.llm_summary = LLMRequest(self.config.llm_summary, request_type="memory")
|
||||
|
||||
def get_all_node_names(self) -> list:
|
||||
"""获取记忆图中所有节点的名字列表"""
|
||||
@@ -1169,7 +1169,7 @@ class ParahippocampalGyrus:
|
||||
# 调用修改后的 topic_what,不再需要 time_info
|
||||
topic_what_prompt = self.hippocampus.topic_what(input_text, topic)
|
||||
try:
|
||||
task = self.hippocampus.llm_summary_by_topic.generate_response_async(topic_what_prompt)
|
||||
task = self.hippocampus.llm_summary.generate_response_async(topic_what_prompt)
|
||||
tasks.append((topic.strip(), task))
|
||||
except Exception as e:
|
||||
logger.error(f"生成话题 '{topic}' 的摘要时发生错误: {e}")
|
||||
|
||||
@@ -24,7 +24,7 @@ class MemoryConfig:
|
||||
consolidate_memory_interval: int # 记忆整合间隔
|
||||
|
||||
llm_topic_judge: str # 话题判断模型
|
||||
llm_summary_by_topic: str # 话题总结模型
|
||||
llm_summary: str # 话题总结模型
|
||||
|
||||
@classmethod
|
||||
def from_global_config(cls, global_config):
|
||||
@@ -44,7 +44,7 @@ class MemoryConfig:
|
||||
consolidate_memory_percentage=getattr(global_config, "consolidate_memory_percentage", 0.01),
|
||||
consolidate_memory_interval=getattr(global_config, "consolidate_memory_interval", 1000),
|
||||
llm_topic_judge=getattr(global_config, "llm_topic_judge", "default_judge_model"), # 添加默认模型名
|
||||
llm_summary_by_topic=getattr(
|
||||
global_config, "llm_summary_by_topic", "default_summary_model"
|
||||
llm_summary=getattr(
|
||||
global_config, "llm_summary", "default_summary_model"
|
||||
), # 添加默认模型名
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user