Function downloadRequestMedia
- downloadRequestMedia(
options?: {
filter?: (
part: {
custom?: Record<string, unknown>;
data?: unknown;
media: { contentType?: string; url: string };
metadata?: Record<string, unknown>;
text?: undefined;
toolRequest?: undefined;
toolResponse?: undefined;
},
) => boolean;
maxBytes?: number;
},
): ModelMiddleware Parameters
Optional
options: {
filter?: (
part: {
custom?: Record<string, unknown>;
data?: unknown;
media: { contentType?: string; url: string };
metadata?: Record<string, unknown>;
text?: undefined;
toolRequest?: undefined;
toolResponse?: undefined;
},
) => boolean;
maxBytes?: number;
}
Preprocess a GenerateRequest to download referenced http(s) media URLs and inline them as data URIs.