|
|
@@ -59,6 +59,12 @@ async function* parseSSEStream(reader: ReadableStreamDefaultReader<Uint8Array>):
|
|
|
yield { type: 'token', text: parsed.content ?? parsed.text }
|
|
|
} else if (eventType === 'done') {
|
|
|
yield { type: 'done', isComplete: parsed.isComplete }
|
|
|
+ } else if (eventType === 'image') {
|
|
|
+ yield {
|
|
|
+ type: 'image',
|
|
|
+ url: parsed.url,
|
|
|
+ round: parsed.round,
|
|
|
+ }
|
|
|
} else if (eventType === 'error') {
|
|
|
yield { type: 'error', message: parsed.message }
|
|
|
}
|
|
|
@@ -242,6 +248,8 @@ export class RealDialogueAPI implements DialogueAPI {
|
|
|
roleId: config.roleId,
|
|
|
configId: config.configId ?? null,
|
|
|
userId: config.userId ?? null,
|
|
|
+ mode: config.mode ?? 'normal',
|
|
|
+ selectedVideo: config.selectedVideo ?? null,
|
|
|
}),
|
|
|
})
|
|
|
if (!res.ok) {
|