mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: restrict classification operators cannot be connected to Answer and other classification #918 (#1294)
### What problem does this PR solve? feat: restrict classification operators cannot be connected to Answer and other classification #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -97,3 +97,27 @@ export const CategorizeAnchorPointPositions = [
|
||||
{ top: 91, right: 20 },
|
||||
{ top: 98, right: 34 },
|
||||
];
|
||||
|
||||
// key is the source of the edge, value is the target of the edge
|
||||
// no connection lines are allowed between key and value
|
||||
export const RestrictedUpstreamMap = {
|
||||
[Operator.Begin]: [
|
||||
Operator.Begin,
|
||||
Operator.Answer,
|
||||
Operator.Categorize,
|
||||
Operator.Generate,
|
||||
Operator.Retrieval,
|
||||
],
|
||||
[Operator.Categorize]: [Operator.Begin, Operator.Categorize, Operator.Answer],
|
||||
[Operator.Answer]: [],
|
||||
[Operator.Retrieval]: [],
|
||||
[Operator.Generate]: [],
|
||||
};
|
||||
|
||||
export const NodeMap = {
|
||||
[Operator.Begin]: 'beginNode',
|
||||
[Operator.Categorize]: 'categorizeNode',
|
||||
[Operator.Retrieval]: 'ragNode',
|
||||
[Operator.Generate]: 'ragNode',
|
||||
[Operator.Answer]: 'ragNode',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user