mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 08:43:02 +08:00
新增配置加载功能并优化模型设置
- 新增 ConfigLoaderFactory 和 ModelConfigFactory 以及对应的默认实现用于加载模型配置和提示词列表 - 重构 ActivateModel 接口,支持基本提示和特定提示的加载,具体逻辑待实现,可通过ModelConfigFactory加载 - 优化模块注册和能力注入相关逻辑 - 添加了必要注释
This commit is contained in:
@@ -14,7 +14,7 @@ public class ResourcesUtil {
|
||||
private static final ClassLoader classloader = Agent.class.getClassLoader();
|
||||
|
||||
public static class Prompt {
|
||||
private static final String SELF_AWARENESS_PATH = "prompt/self_awareness.json";
|
||||
private static final String SELF_AWARENESS_PATH = "prompt/basic_prompt.json";
|
||||
private static final String MODULE_PROMPT_PREFIX_PATH = "prompt/module/";
|
||||
|
||||
public static List<Message> loadPromptWithSelfAwareness(String modelKey, String promptType) {
|
||||
|
||||
@@ -69,7 +69,7 @@ public class CoreModel extends CoreModule implements ActivateModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withAwareness() {
|
||||
public boolean withBasicPrompt() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ public class SliceSelectEvaluator extends AgentInteractionSubModule<EvaluatorInp
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withAwareness() {
|
||||
public boolean withBasicPrompt() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public class MemorySelectExtractor extends AgentInteractionSubModule<Interaction
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withAwareness() {
|
||||
public boolean withBasicPrompt() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class MultiSummarizer extends AgentInteractionSubModule<SummarizeInput, S
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withAwareness() {
|
||||
public boolean withBasicPrompt() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ public class SingleSummarizer extends AgentInteractionSubModule<List<Message>,Vo
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withAwareness() {
|
||||
public boolean withBasicPrompt() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class TotalSummarizer extends AgentInteractionSubModule<HashMap<String, S
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withAwareness() {
|
||||
public boolean withBasicPrompt() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public class RelationExtractor extends AgentInteractionSubModule<InteractionCont
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withAwareness() {
|
||||
public boolean withBasicPrompt() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class StaticMemoryExtractor extends AgentInteractionSubModule<Interaction
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean withAwareness() {
|
||||
public boolean withBasicPrompt() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user