perf: 优化中断续聊表现,被中断的回复仍可以进入上下文中,保证记忆连续性
- 续聊逻辑优化
This commit is contained in:
@@ -7,6 +7,7 @@ import com.easyagents.agent.runtime.model.AgentModelSpec;
|
||||
import com.easyagents.agent.runtime.persistence.AgentPersistencePolicy;
|
||||
import com.easyagents.agent.runtime.skill.AgentSkillBoxSpec;
|
||||
import com.easyagents.agent.runtime.tool.AgentToolSpec;
|
||||
import com.easyagents.agent.runtime.tool.operate.AgentOperateToolSpec;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -27,6 +28,7 @@ public class AgentDefinition {
|
||||
private AgentGenerationOptions generationOptions = new AgentGenerationOptions();
|
||||
private AgentExecutionOptions executionOptions = new AgentExecutionOptions();
|
||||
private List<AgentToolSpec> toolSpecs = new ArrayList<>();
|
||||
private List<AgentOperateToolSpec> operateToolSpecs = new ArrayList<>();
|
||||
private List<AgentKnowledgeSpec> knowledgeSpecs = new ArrayList<>();
|
||||
private AgentMemoryPolicy memoryPolicy = AgentMemoryPolicy.autoContext();
|
||||
private AgentPersistencePolicy persistencePolicy = AgentPersistencePolicy.disabled();
|
||||
@@ -177,6 +179,24 @@ public class AgentDefinition {
|
||||
this.toolSpecs = toolSpecs == null ? new ArrayList<>() : new ArrayList<>(toolSpecs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取操作类工具定义。
|
||||
*
|
||||
* @return 操作类工具定义
|
||||
*/
|
||||
public List<AgentOperateToolSpec> getOperateToolSpecs() {
|
||||
return operateToolSpecs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置操作类工具定义。
|
||||
*
|
||||
* @param operateToolSpecs 操作类工具定义
|
||||
*/
|
||||
public void setOperateToolSpecs(List<AgentOperateToolSpec> operateToolSpecs) {
|
||||
this.operateToolSpecs = operateToolSpecs == null ? new ArrayList<>() : new ArrayList<>(operateToolSpecs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取知识库定义。
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user