修改通用MIME

This commit is contained in:
Clivia
2024-02-15 13:55:36 +08:00
committed by GitHub
parent 6c19482ef6
commit c1c45eb46e

View File

@@ -113,6 +113,7 @@ export class ChatGPTApi implements LLMApi {
const extensionToMIME: MIMEMap = { const extensionToMIME: MIMEMap = {
'png': 'image/png', 'png': 'image/png',
'jpeg': 'image/jpeg',
'jpg': 'image/jpeg', 'jpg': 'image/jpeg',
'webp': 'image/webp', 'webp': 'image/webp',
'gif': 'image/gif', 'gif': 'image/gif',
@@ -186,7 +187,7 @@ export class ChatGPTApi implements LLMApi {
} }
} catch (error) { } catch (error) {
// 使用通用的MIME类型 // 使用通用的MIME类型
mimeType = 'text/plain'; mimeType = 'application/octet-stream';
} }
message.content.push({ message.content.push({
type: "image_url", type: "image_url",