(value)
| 588 | } |
| 589 | |
| 590 | /** |
| 591 | * 规范化 OpenAI 风格尺寸参数 |
| 592 | * @param {string} size - 原始尺寸 |
| 593 | * @returns {string|undefined} 规范化后的尺寸 |
| 594 | */ |
| 595 | const normalizeOpenAIImageVideoSize = (size) => { |
| 596 | if (!size) { |
| 597 | return undefined |
| 598 | } |
| 599 | |
| 600 | const normalizedSizeMap = { |
| 601 | '1024x1024': '1:1', |
| 602 | '1536x1024': '4:3', |
| 603 | '1024x1536': '3:4', |
| 604 | '1792x1024': '16:9', |
| 605 | '1024x1792': '9:16' |
| 606 | } |
| 607 | |
| 608 | return normalizedSizeMap[size] || size |
no outgoing calls
no test coverage detected