mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
AIX: Gemini Interactions: relax
This commit is contained in:
@@ -151,6 +151,9 @@ export function createGeminiInteractionsParserSSE(requestedModelName: string | n
|
||||
if (!deltaParse.success) {
|
||||
// Empty deltas ({}) appear alongside placeholder blocks (e.g. internal tool slots) - silent skip
|
||||
if (event.delta && Object.keys(event.delta).length === 0) break;
|
||||
// Known-but-not-surfaced delta types (mirrors NS parser's INTERNAL_OUTPUT_TYPES policy + spec's document/video variants we don't model) - silent skip
|
||||
const deltaType = (event.delta as { type?: string })?.type;
|
||||
if (deltaType && (GeminiInteractionsWire_API_Interactions.INTERNAL_OUTPUT_TYPES.has(deltaType) || deltaType === 'document' || deltaType === 'video')) break;
|
||||
console.warn('[GeminiInteractions] unknown content.delta shape at index', event.index, event.delta);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ export namespace GeminiInteractionsWire_API_Interactions {
|
||||
// the parser prefers inline and falls back to a URI note when only `uri` is present.
|
||||
data: z.string().optional(), // base64-encoded bytes
|
||||
uri: z.string().optional(),
|
||||
mime_type: z.string(),
|
||||
mime_type: z.string().optional(), // spec: optional - parser still requires it before emitting inline
|
||||
resolution: z.string().optional(), // 'low' | 'medium' | 'high' | 'ultra_high'
|
||||
});
|
||||
|
||||
@@ -176,7 +176,7 @@ export namespace GeminiInteractionsWire_API_Interactions {
|
||||
// Per docs: data or uri, mime_type covers both PCM (audio/l16) and packaged formats (audio/wav, audio/mp3, ...).
|
||||
data: z.string().optional(),
|
||||
uri: z.string().optional(),
|
||||
mime_type: z.string(),
|
||||
mime_type: z.string().optional(), // spec: optional - parser still requires it before emitting inline
|
||||
rate: z.number().optional(), // sample rate, when known
|
||||
channels: z.number().optional(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user