You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Define a kernel function for the selection strategy
KernelFunctionTerminationStrategy terminationStrategy =
new(selectionFunction, kernel)
{
// Only the reviewer may give approval.
Agents = [reviewerAgent],
// Parse the function response.
ResultParser = (result) =>
result.GetValue()?.Contains("yes", StringComparison.OrdinalIgnoreCase) ?? false,
// The prompt variable name for the history argument.
HistoryVariableName = "history",
// Save tokens by not including the entire history in the prompt
HistoryReducer = new ChatHistoryTruncationReducer(1),
// Limit total number of turns no matter what
MaximumIterations = 10,
};
Arent we supposed to use termination strategy (1) and terminationFunction (2) in the constructor ?
Screenshots
Platform
Language: C#
Additional context
I may be wrong, sorry if that's the case !
Still learning tho.
The text was updated successfully, but these errors were encountered:
Describe the bug
In the documentation, a code example is incorrect.
To Reproduce
Expected behavior
In the following code example:
new(selectionFunction, kernel)
{
// Only the reviewer may give approval.
Agents = [reviewerAgent],
// Parse the function response.
ResultParser = (result) =>
result.GetValue()?.Contains("yes", StringComparison.OrdinalIgnoreCase) ?? false,
// The prompt variable name for the history argument.
HistoryVariableName = "history",
// Save tokens by not including the entire history in the prompt
HistoryReducer = new ChatHistoryTruncationReducer(1),
// Limit total number of turns no matter what
MaximumIterations = 10,
};
Arent we supposed to use termination strategy (1) and terminationFunction (2) in the constructor ?
Screenshots

Platform
Additional context
I may be wrong, sorry if that's the case !
Still learning tho.
The text was updated successfully, but these errors were encountered: