MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / stopWhenReachingTokensLimit

Method stopWhenReachingTokensLimit

lib/ai.js:220–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

218 }
219
220 stopWhenReachingTokensLimit() {
221 if (this.numTokens < this.config.maxTokens) return
222
223 output.print(`AI assistant has reached the limit of ${this.config.maxTokens} tokens in this session. It will be disabled now`)
224 this.disable()
225 }
226
227 async writeSteps(input) {
228 if (!this.isEnabled) return

Callers 2

createCompletionMethod · 0.95
ai_test.jsFile · 0.80

Calls 1

disableMethod · 0.95

Tested by

no test coverage detected