mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Support uploading files when running agent #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -150,13 +150,22 @@ function buildAgentTools(edges: Edge[], nodes: Node[], nodeId: string) {
|
||||
|
||||
(params as IAgentForm).tools = (params as IAgentForm).tools.concat(
|
||||
bottomSubAgentEdges.map((x) => {
|
||||
const formData = buildAgentTools(edges, nodes, x.target);
|
||||
const {
|
||||
params: formData,
|
||||
id,
|
||||
name,
|
||||
} = buildAgentTools(edges, nodes, x.target);
|
||||
|
||||
return { component_name: Operator.Agent, params: { ...formData } };
|
||||
return {
|
||||
component_name: Operator.Agent,
|
||||
id,
|
||||
name,
|
||||
params: { ...formData },
|
||||
};
|
||||
}),
|
||||
);
|
||||
}
|
||||
return params;
|
||||
return { params, name: node?.data.name, id: node?.id };
|
||||
}
|
||||
|
||||
function filterTargetsBySourceHandleId(edges: Edge[], handleId: string) {
|
||||
@ -221,9 +230,11 @@ export const buildDslComponentsByGraph = (
|
||||
let params = x?.data.form ?? {};
|
||||
|
||||
switch (operatorName) {
|
||||
case Operator.Agent:
|
||||
params = buildAgentTools(edges, nodes, id);
|
||||
case Operator.Agent: {
|
||||
const { params: formData } = buildAgentTools(edges, nodes, id);
|
||||
params = formData;
|
||||
break;
|
||||
}
|
||||
case Operator.Categorize:
|
||||
params = buildCategorizeTos(edges, nodes, id);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user