Skip to content

Commit ed78b5a

Browse files
committed
[fel] clean code
1 parent 707cbf0 commit ed78b5a

File tree

3 files changed

+15
-0
lines changed
  • framework
    • fel/java/fel-flow/src
    • waterflow/java/waterflow-core/src/main/java/modelengine/fit/waterflow/domain/stream/nodes

3 files changed

+15
-0
lines changed

framework/fel/java/fel-flow/src/main/java/modelengine/fel/engine/activities/AiWhenHappen.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ public class AiWhenHappen<O, D, I, RF extends Flow<D>, F extends AiFlow<D, RF>>
3030

3131
private final F flow;
3232

33+
/**
34+
* Creates a new AI flow matching generator that handles conditional branching.
35+
* This constructor initializes a stateful processor for when/then style pattern matching
36+
* within AI workflows.
37+
*
38+
* @param matchHappen The core matching generator that evaluates conditions
39+
* @param flow The parent AI flow
40+
* @throws NullPointerException If either parameter is null
41+
*/
3342
public AiWhenHappen(WhenHappen<O, D, I, RF> matchHappen, F flow) {
3443
this.matchHappen = Validation.notNull(matchHappen, "WhenHappen cannot be null.");
3544
this.flow = Validation.notNull(flow, "Flow cannot be null.");

framework/fel/java/fel-flow/src/test/java/modelengine/fel/engine/AiFlowCaseTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import modelengine.fitframework.flowable.Choir;
2222

2323
import org.junit.jupiter.api.Assertions;
24+
import org.junit.jupiter.api.DisplayName;
2425
import org.junit.jupiter.api.Nested;
2526
import org.junit.jupiter.api.Test;
2627

@@ -35,6 +36,7 @@
3536
*/
3637
public class AiFlowCaseTest {
3738
private static final int SPEED = 1;
39+
3840
@Nested
3941
class DesensitizeCase {
4042
private final ChatFlowModel model = new ChatFlowModel((prompt, chatOption) -> Choir.create(emitter -> {
@@ -69,6 +71,7 @@ class DesensitizeCase {
6971
.close();
7072

7173
@Test
74+
@DisplayName("DesensitizeCase")
7275
void run() {
7376
AtomicInteger counter = new AtomicInteger(0);
7477
long startTime = System.currentTimeMillis();
@@ -148,6 +151,7 @@ class BackPressureCase {
148151
.close();
149152

150153
@Test
154+
@DisplayName("BackPressureCase")
151155
void run() {
152156
AtomicInteger counter = new AtomicInteger(0);
153157
long startTime = System.currentTimeMillis();
@@ -199,6 +203,7 @@ class ConcurrencyCase {
199203
.close();
200204

201205
@Test
206+
@DisplayName("ConcurrencyCase")
202207
void run() {
203208
AtomicInteger counter = new AtomicInteger(0);
204209
long startTime = System.currentTimeMillis();

framework/waterflow/java/waterflow-core/src/main/java/modelengine/fit/waterflow/domain/stream/nodes/To.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ public class To<I, O> extends IdGenerator implements Subscriber<I, O> {
161161
private Operators.Produce<FlowContext<I>, O> produce;
162162

163163
private volatile int maxConcurrency = MAX_CONCURRENCY;
164+
164165
/**
165166
* 当前并发度,已经提交的批次
166167
*/

0 commit comments

Comments
 (0)