PersistentAI API Documentation / @persistent-ai/fireflow-nodes / convertPartToAPIFormat
Function: convertPartToAPIFormat()
convertPartToAPIFormat(
part,support?,context?,debugLog?,timeout?,vfsResolver?):Promise<Part|null>
Defined in: packages/fireflow-nodes/src/nodes/ai/gemini/gemini-part-converters.ts:71
Convert GeminiMessagePart to Gemini API Part format. Handles type conversions, whitelisting based on model support, VFS resolution, and thought field validation.
Parameters
part
The GeminiMessagePart to convert
support?
GeminiPartTypeSupport = GeminiPartTypeSupport.ALL
Which part types to allow (whitelist mode)
context?
Optional execution context for debug logging
debugLog?
(ctx, msg) => Promise<void>
Optional debug logging function
timeout?
number = 30000
Optional timeout for file downloads (default: 30000ms)
vfsResolver?
Optional resolver for VFS file references (ff:// URIs)
Returns
Promise<Part | null>
Promise<Part | null> for API or null if filtered out by whitelist