MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / generateContent

Method generateContent

scripts/update-template.js:526–541  ·  view source on GitHub ↗

* 生成内容 * @param {string} prompt * @returns {Promise }

(prompt)

Source from the content-addressed store, hash-verified

524 * @returns {Promise<Object>}
525 */
526 async generateContent(prompt) {
527 // 验证输入
528 if (!Validator.validatePrompt(prompt)) {
529 return {
530 success: false,
531 error: 'Invalid prompt',
532 type: ErrorTypes.API_ERROR
533 };
534 }
535
536 // 清理输入
537 const sanitizedPrompt = Validator.sanitizeInput(prompt);
538
539 // 执行 API 调用
540 return this.executeWithRetry(sanitizedPrompt);
541 }
542}
543
544/**

Callers 1

callGeminiAPIFunction · 0.95

Calls 3

executeWithRetryMethod · 0.95
validatePromptMethod · 0.80
sanitizeInputMethod · 0.80

Tested by

no test coverage detected