Skip to content

Commit eb10850

Browse files
authored
[repo] fix: add stop command docs/comments for tools augmentation compatibility (#2127)
## Linked issues closes: #2126 ## Details Context: #2126 Adding comments to communicate that the `StopCommand` is not compatible with the `tools` augmentation.
1 parent bc67f11 commit eb10850

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/AIConstants.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public static class AIConstants
2424
/// <summary>
2525
/// The type of command that will stop the running.
2626
/// </summary>
27+
/// <remarks>
28+
/// This command is incompatible and should not be used with `tools` augmentation
29+
/// </remarks>
2730
public const string StopCommand = "STOP";
2831

2932
/// <summary>

getting-started/CONCEPTS/ACTIONS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ An action handler is a callback function that is called when an action is trigge
107107

108108
- If the result is a non-empty string, that string is included as the output of the action to the plan. The last output can be accessed in the next triggered action via the state object: `state.temp.lastOutput`.
109109
- If the action handler returns `AI.StopCommandName`, the `run` method will terminate execution.
110+
> **Note:** `AI.StopCommandName` does not work with `tools` augmentation!
110111
- If the result is an empty string and there is a list of predicted commands, the next command in the plan is executed.
111112
- In sequence augmentation, the returned string is appended to the prompt at runtime (see Sequence [Augmentations](./AUGMENTATIONS.md)). This is then used to generate the plan object using defined actions.
112113
- In monologue augmentation, the returned string is used as inner monologue to perform chain-of-thought reasoning by appending instructions to the prompt during runtime (see Monologue [Augmentation](./AUGMENTATIONS.md)). This is for predicing the next action to execute.

js/packages/teams-ai/src/AI.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ export class AI<TState extends TurnState = TurnState> {
120120
/**
121121
* A text string that can be returned from an action to stop the AI system from continuing
122122
* to execute the current plan.
123+
* @remarks
124+
* This command is incompatible and should not be used with `tools` augmentation
123125
*/
124126
public static readonly StopCommandName = actions.StopCommandName;
125127

python/packages/ai/teams/ai/actions/action_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
class ActionTypes(str, Enum):
1212
STOP = "STOP"
13+
"This command is incompatible and should not be used with `tools` augmentation"
14+
1315
UNKNOWN_ACTION = "___UnknownAction___"
1416
FLAGGED_INPUT = "___FlaggedInput___"
1517
FLAGGED_OUTPUT = "___FlaggedOutput___"

0 commit comments

Comments
 (0)