MCPcopy Create free account
hub / github.com/Rfym21/Qwen2API / sendOpenAIErrorResponse

Function sendOpenAIErrorResponse

src/controllers/chat.image.video.js:649–659  ·  view source on GitHub ↗
(res, error)

Source from the content-addressed store, hash-verified

647 * 构造 OpenAI 图像响应项
648 * @param {string} contentUrl - 图片链接
649 * @param {string} responseFormat - 输出格式
650 * @returns {Promise<object>} 图像响应项
651 */
652const buildOpenAIImageResultItem = async (contentUrl, responseFormat) => {
653 if (responseFormat === 'b64_json') {
654 return {
655 b64_json: await downloadAssetAsBase64(contentUrl)
656 }
657 }
658
659 return {
660 url: contentUrl
661 }
662}

Callers 3

handleOpenAIImagesEditFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected