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

Method generatePageObject

lib/ai.js:210–218  ·  view source on GitHub ↗

* * @param {*} extraPrompt * @param {*} locator * @returns

(extraPrompt = null, locator = null)

Source from the content-addressed store, hash-verified

208 * @returns
209 */
210 async generatePageObject(extraPrompt = null, locator = null) {
211 if (!this.isEnabled) return []
212 if (!this.minifiedHtml) throw new Error('No HTML context provided')
213
214 const response = await this.createCompletion(this.prompts.generatePageObject(this.minifiedHtml, locator, extraPrompt))
215 if (!response) return []
216
217 return this.config.response(response)
218 }
219
220 stopWhenReachingTokensLimit() {
221 if (this.numTokens < this.config.maxTokens) return

Callers

nothing calls this directly

Calls 1

createCompletionMethod · 0.95

Tested by

no test coverage detected