UNPKG

@microsoft/teams-ai

Version:

SDK focused on building AI based applications for Microsoft Teams.

23 lines 754 B
"use strict"; /** * @module teams-ai */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.tooManySteps = tooManySteps; /** * @private * @returns {Function} A function that checks if the AI system has exceeded the maximum number of steps or time allowed. */ function tooManySteps() { return async (_context, _state, data) => { if (data.step_count > data.max_steps) { throw new Error(`The AI system has exceeded the maximum number of steps allowed.`); } throw new Error(`The AI system has exceeded the maximum amount of time allowed.`); }; } //# sourceMappingURL=TooManySteps.js.map