Refactor multimodal and add claude-3 vision support

This commit is contained in:
kwaroran
2024-03-17 23:48:24 +09:00
parent 859069f112
commit dbe1a45317
4 changed files with 180 additions and 79 deletions

View File

@@ -87,6 +87,7 @@ export async function getInlayImage(id: string){
export function supportsInlayImage(){
const db = get(DataBase)
return db.aiModel.startsWith('gptv') || (db.aiModel === 'reverse_proxy' && db.proxyRequestModel?.startsWith('gptv')) || db.aiModel === 'gemini-pro-vision'
|| db.aiModel.startsWith('claude-3') || db.proxyRequestModel?.startsWith('claude-3')
}
export async function reencodeImage(img:Uint8Array){