PersistentAI API Documentation / @persistentai/fireflow-nodes / convertPartToAPIFormat
Function: convertPartToAPIFormat()
convertPartToAPIFormat(
part,support?,context?,debugLog?,timeout?):Promise<Part|null>
Defined in: packages/fireflow-nodes/src/nodes/ai/gemini/gemini-part-converters.ts:57
Convert GeminiMessagePart to Gemini API Part format. Handles type conversions, whitelisting based on model support, 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)
Returns
Promise<Part | null>
Promise<Part | null> for API or null if filtered out by whitelist