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

Function normalizeOpenAIImageVideoSize

src/controllers/chat.image.video.js:627–641  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

625 }
626 })
627}
628
629/**
630 * 下载资源并转换为 Base64
631 * @param {string} contentUrl - 资源链接
632 * @returns {Promise<string>} Base64 内容
633 */
634const downloadAssetAsBase64 = async (contentUrl, account) => {
635 const proxyAgent = getProxyAgent(account)
636 const requestConfig = {
637 responseType: 'arraybuffer',
638 timeout: 1000 * 60 * 2
639 }
640
641 if (proxyAgent) {
642 requestConfig.httpsAgent = proxyAgent
643 requestConfig.proxy = false
644 }

Callers 3

handleOpenAIImagesEditFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected