mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +08:00
fix(server): empty mimetype attachments fallback (#11869)
This commit is contained in:
@@ -138,7 +138,15 @@ export class FalProvider
|
||||
);
|
||||
return {
|
||||
model_name: options.modelName || undefined,
|
||||
image_url: attachments?.[0],
|
||||
image_url: attachments
|
||||
?.map(v =>
|
||||
typeof v === 'string'
|
||||
? v
|
||||
: v.mimeType.startsWith('image/')
|
||||
? v.attachment
|
||||
: undefined
|
||||
)
|
||||
.filter(v => !!v)[0],
|
||||
prompt: content.trim(),
|
||||
loras: lora.length ? lora : undefined,
|
||||
controlnets: controlnets.length ? controlnets : undefined,
|
||||
|
||||
Reference in New Issue
Block a user