mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
推进 Action 模块语义缓存机制
- 完善缓存命中部分; - 调整 ActionExtractor 以适配缓存逻辑 - 缓存更新大致框架待填充具体更新逻辑;
This commit is contained in:
@@ -25,11 +25,7 @@ public class AgentRunningFlow<C extends RunningFlowContext> {
|
||||
List<MetaModule> moduleList = entry.getValue();
|
||||
for (MetaModule module : moduleList) {
|
||||
Future<?> future = executor.submit(() -> {
|
||||
try {
|
||||
module.getInstance().execute(interactionContext);
|
||||
} catch (Exception e) {
|
||||
throw new AgentRuntimeException("模块执行出错: " + module.getName(), e);
|
||||
}
|
||||
module.getInstance().execute(interactionContext);
|
||||
});
|
||||
futures.add(future);
|
||||
}
|
||||
|
||||
@@ -7,14 +7,12 @@ import work.slhaf.partner.api.agent.factory.module.annotation.BeforeExecute;
|
||||
import work.slhaf.partner.api.agent.factory.module.annotation.CoreModule;
|
||||
import work.slhaf.partner.api.agent.runtime.interaction.flow.entity.RunningFlowContext;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 流程执行模块基类
|
||||
*/
|
||||
@Slf4j
|
||||
public abstract class AgentRunningModule<C extends RunningFlowContext> extends Module {
|
||||
public abstract void execute(C context) throws IOException, ClassNotFoundException;
|
||||
public abstract void execute(C context);
|
||||
|
||||
@BeforeExecute
|
||||
private void beforeLog() {
|
||||
|
||||
Reference in New Issue
Block a user