refactor: remove InputWrapper.java

This commit is contained in:
Michael Yang 2024-05-12 18:06:31 +08:00
parent 0082ffb21c
commit 3d59a0c70e
4 changed files with 10 additions and 53 deletions

View File

@ -355,8 +355,16 @@ public abstract class Chain implements Serializable {
public String toString() { public String toString() {
return "Chain{" + return "Chain{" +
"id=" + id + "id=" + id +
", memory=" + memory +
", eventListeners=" + eventListeners +
", inputListeners=" + inputListeners +
", outputListeners=" + outputListeners +
", nodes=" + nodes +
", parent=" + parent +
", children=" + children +
", status=" + status +
", message='" + message + '\'' +
", waitInputParameters=" + waitInputParameters +
'}'; '}';
} }
} }

View File

@ -1,48 +0,0 @@
/*
* Copyright (c) 2023-2025, Agents-Flex (fuhai999@gmail.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.agentsflex.chain;
import com.agentsflex.agent.Parameter;
import com.agentsflex.chain.node.AgentNode;
import java.util.List;
public class InputWrapper {
private AgentNode agentNode;
private List<Parameter> parameters;
public InputWrapper(AgentNode agentNode, List<Parameter> parameters) {
this.agentNode = agentNode;
this.parameters = parameters;
}
public AgentNode getAgentNode() {
return agentNode;
}
public void setAgentNode(AgentNode agentNode) {
this.agentNode = agentNode;
}
public List<Parameter> getParameters() {
return parameters;
}
public void setParameters(List<Parameter> parameters) {
this.parameters = parameters;
}
}

View File

@ -57,8 +57,6 @@ public class LoopChain extends BaseChain {
for (int i = currentIndex; i < nodes.size(); i++) { for (int i = currentIndex; i < nodes.size(); i++) {
try { try {
ChainNode node = nodes.get(i); ChainNode node = nodes.get(i);
Map<String, Object> result = null; Map<String, Object> result = null;
try { try {
notifyEvent(new OnNodeStartEvent(node)); notifyEvent(new OnNodeStartEvent(node));

View File

@ -56,7 +56,6 @@ public class SequentialChain extends BaseChain {
for (int i = currentIndex; i < getNodes().size(); i++) { for (int i = currentIndex; i < getNodes().size(); i++) {
try { try {
ChainNode node = nodes.get(i); ChainNode node = nodes.get(i);
Map<String, Object> result = null; Map<String, Object> result = null;
try { try {
notifyEvent(new OnNodeStartEvent(node)); notifyEvent(new OnNodeStartEvent(node));