进行 Partner 本体对于框架的适配,以及框架层的部分调整

框架:

- 调整 ActivateModel 中模型初始化设置的 initHook 权重为-1(最优先)
- 为 AgentGateway 中 receive 操作提供模板方法,子类需实现发送逻辑并提供适配器
- 取消了 AgentInteractionAdapter 的单例配置
- 调整 RunningFlow 的异常处理,并在RunningFlowContext中提供错误码进行判断
- 调整模块基类
-

本体:
- 新增配置加载异常,继承自Agent启动异常
- 修改 GlobalExceptionData 获取逻辑
- 移除 MessageSender 等交互接口,适配框架的交互逻辑
- 异常处理已适配
- 配置加载逻辑已适配
- Gateway 已适配
- CoreModel 已适配
This commit is contained in:
2025-09-09 20:42:28 +08:00
parent 10fb689c83
commit 47684c78e0
94 changed files with 591 additions and 869 deletions

View File

@@ -1,6 +1,6 @@
import org.junit.jupiter.api.Test;
import work.slhaf.partner.core.cognation.common.pojo.MemoryResult;
import work.slhaf.partner.core.cognation.submodule.memory.MemoryCapability;
import work.slhaf.partner.core.common.pojo.MemoryResult;
import work.slhaf.partner.core.submodule.memory.MemoryCapability;
import java.lang.reflect.Proxy;
import java.util.function.Function;

View File

@@ -4,7 +4,6 @@ import work.slhaf.partner.api.chat.ChatClient;
import work.slhaf.partner.api.chat.constant.ChatConstant;
import work.slhaf.partner.api.chat.pojo.ChatResponse;
import work.slhaf.partner.api.chat.pojo.Message;
import work.slhaf.partner.common.config.ModelConfig;
import work.slhaf.partner.common.util.ResourcesUtil;
import work.slhaf.partner.module.common.model.ModelConstant;
import work.slhaf.partner.module.modules.memory.selector.extractor.data.ExtractorInput;
@@ -67,10 +66,9 @@ public class SelfAwarenessTest {
private static ChatClient getChatClient(String modelKey) {
ModelConfig coreModel = ModelConfig.load(modelKey);
String model = coreModel.getModel();
String baseUrl = coreModel.getBaseUrl();
String apikey = coreModel.getApikey();
String model = "";
String baseUrl = "";
String apikey = "";
ChatClient chatClient = new ChatClient(baseUrl, apikey, model);
chatClient.setTop_p(0.7);
chatClient.setTemperature(0.35);