|
1 | 1 | import { Agent } from '@mastra/core/agent' |
2 | 2 |
|
3 | | -import { BatchPartsProcessor, UnicodeNormalizer } from '@mastra/core/processors' |
| 3 | +import { BatchPartsProcessor, TokenLimiterProcessor, UnicodeNormalizer } from '@mastra/core/processors' |
4 | 4 | import type { RequestContext } from '@mastra/core/request-context' |
5 | 5 | import { createAnswerRelevancyScorer, createToxicityScorer } from '@mastra/evals/scorers/prebuilt' |
6 | 6 | import type { GoogleGenerativeAIProviderOptions } from '@ai-sdk/google'; |
@@ -128,8 +128,7 @@ Always consider maintainability, scalability, and testability in your recommenda |
128 | 128 | inputProcessors: [ |
129 | 129 | new UnicodeNormalizer({ stripControlChars: true, collapseWhitespace: true }), |
130 | 130 | ], |
131 | | - outputProcessors: [ |
132 | | - ], |
| 131 | + outputProcessors: [new TokenLimiterProcessor(1048576)] |
133 | 132 | }) |
134 | 133 |
|
135 | 134 | //log.info('Cached tokens:', providerMetadata.google?.usageMetadata); |
@@ -239,6 +238,7 @@ Be constructive and educational in feedback.`, |
239 | 238 | inputProcessors: [ |
240 | 239 | new UnicodeNormalizer({ stripControlChars: true, collapseWhitespace: true }), |
241 | 240 | ], |
| 241 | + outputProcessors: [new TokenLimiterProcessor(1048576)] |
242 | 242 | }) |
243 | 243 |
|
244 | 244 | /** |
@@ -340,7 +340,7 @@ Always use Vitest syntax: describe, it, expect, vi.mock, vi.fn.`, |
340 | 340 | inputProcessors: [ |
341 | 341 | new UnicodeNormalizer({ stripControlChars: true, collapseWhitespace: true }), |
342 | 342 | ], |
343 | | - |
| 343 | + outputProcessors: [new TokenLimiterProcessor(1048576)] |
344 | 344 | }) |
345 | 345 |
|
346 | 346 | /** |
@@ -448,7 +448,7 @@ For each refactoring: |
448 | 448 | inputProcessors: [ |
449 | 449 | new UnicodeNormalizer({ stripControlChars: true, collapseWhitespace: true }), |
450 | 450 | ], |
451 | | - |
| 451 | + outputProcessors: [new TokenLimiterProcessor(1048576)] |
452 | 452 | }) |
453 | 453 |
|
454 | 454 | log.info('Coding Team Agents initialized: codeArchitectAgent, codeReviewerAgent, testEngineerAgent, refactoringAgent') |
0 commit comments