sshiv012 commented on code in PR #9593:
URL: https://github.com/apache/texera/pull/9593#discussion_r4685775939


##########
agent-service/src/agent/texera-agent.ts:
##########
@@ -75,6 +75,18 @@ export interface AgentMessageResult {
 
 type ReActStepCallback = (step: ReActStep) => void;
 
+/**
+ * What the agent says when the step limit ends a turn. Such a turn stops on a 
tool call, with no
+ * closing answer from the model, so without this the chat would only go quiet.
+ */
+function stepLimitNotice(maxSteps: number): string {
+  const limit = maxSteps === 1 ? "1 step" : `${maxSteps} steps`;
+  return (
+    `I stopped because I reached the limit of ${limit} for one message, so the 
task may be unfinished. ` +
+    "Send another message to continue, or raise the limit in the agent's 
settings."

Review Comment:
   Small follow-up now that this is in: the notice says "raise the limit", but 
the dialog and now the API stop at 50 and for a looping agent "send another 
message" just gives it another full budget. Do you think we can say something 
like "rephrase or break the task down" instead?



-- 
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