eemario commented on code in PR #1397:
URL: https://github.com/apache/flink-agents/pull/1397#discussion_r4676493677


##########
api/src/main/java/org/apache/flink/agents/api/agents/ReActAgent.java:
##########
@@ -119,10 +119,20 @@ public ReActAgent(
             @Nullable Prompt prompt,
             @Nullable Object outputSchema,
             @Nullable List<String> skills) {
+        this(descriptor, prompt, outputSchema, skills, null);
+    }
+
+    public ReActAgent(

Review Comment:
   Done in 813f5ff79. Added ReActAgent.builder(), moved budget construction 
behind private constructors, and updated the documented example. Existing 
public constructors remain unchanged; tests cover optional arguments and skill 
configuration.



##########
plan/src/main/java/org/apache/flink/agents/plan/actions/ChatModelAction.java:
##########
@@ -460,6 +495,9 @@ static Object generateStructuredOutputWithReport(
 
     private static void processChatRequest(ChatRequestEvent event, 
RunnerContext ctx)
             throws Exception {
+        ReActLoopBudgetUtils.initialize(ctx, event);
+        String reason = 
ReActLoopBudgetUtils.tryStartTurn(ctx.getSensoryMemory(), event.getId());

Review Comment:
   Done in 813f5ff79 for Java and Python. Time-budget admission now records a 
durable timestamp, so recovery replays the same turn's admission and a new turn 
checks a fresh time. Added controlled-clock recovery tests, including real Java 
continuation-based async execution on JDK 21.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to