mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
feature(ActionExecutor): complete CorrectorInput
This commit is contained in:
@@ -18,7 +18,6 @@ import work.slhaf.partner.module.modules.action.dispatcher.executor.entity.*;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Phaser;
|
import java.util.concurrent.Phaser;
|
||||||
|
|
||||||
@@ -92,8 +91,8 @@ public class ActionExecutor extends AgentRunningSubModule<ActionExecutorInput, V
|
|||||||
}
|
}
|
||||||
phaser.awaitAdvance(phase);
|
phaser.awaitAdvance(phase);
|
||||||
|
|
||||||
// TODO 进行行动链修正
|
// 针对行动链进行修正,修正需要传入执行历史、行动目标等内容
|
||||||
val correctorInput = assemblyHelper.buildCorrectorInput();
|
val correctorInput = assemblyHelper.buildCorrectorInput(actionData, userId);
|
||||||
actionCorrector.execute(correctorInput);
|
actionCorrector.execute(correctorInput);
|
||||||
} while (actionChain.size() > ++stageCount);
|
} while (actionChain.size() > ++stageCount);
|
||||||
|
|
||||||
@@ -194,8 +193,17 @@ public class ActionExecutor extends AgentRunningSubModule<ActionExecutorInput, V
|
|||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
private CorrectorInput buildCorrectorInput() {
|
private CorrectorInput buildCorrectorInput(ImmediateActionData actionData, String userId) {
|
||||||
return null;
|
return CorrectorInput.builder()
|
||||||
|
.tendency(actionData.getTendency())
|
||||||
|
.source(actionData.getSource())
|
||||||
|
.reason(actionData.getReason())
|
||||||
|
.description(actionData.getDescription())
|
||||||
|
.history(actionData.getHistory().get(actionData.getExecutingStage()))
|
||||||
|
.status(actionData.getStatus())
|
||||||
|
.recentMessages(cognationCapability.getChatMessages())
|
||||||
|
.activatedSlices(memoryCapability.getActivatedSlices(userId))
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,24 @@
|
|||||||
package work.slhaf.partner.module.modules.action.dispatcher.executor.entity;
|
package work.slhaf.partner.module.modules.action.dispatcher.executor.entity;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import work.slhaf.partner.api.chat.pojo.Message;
|
||||||
|
import work.slhaf.partner.core.action.entity.ActionData;
|
||||||
|
import work.slhaf.partner.core.memory.pojo.EvaluatedSlice;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@Builder
|
||||||
public class CorrectorInput {
|
public class CorrectorInput {
|
||||||
|
private String tendency;
|
||||||
|
private String source;
|
||||||
|
private String reason;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
private List<HistoryAction> history;
|
||||||
|
private ActionData.ActionStatus status;
|
||||||
|
|
||||||
|
private List<Message> recentMessages;
|
||||||
|
private List<EvaluatedSlice> activatedSlices;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user