Skip to content

PersistentAI API Documentation / @persistentai/fireflow-nodes / convertAPIPartToMessagePart

Function: convertAPIPartToMessagePart()

convertAPIPartToMessagePart(part): GeminiMessagePart

Defined in: packages/fireflow-nodes/src/nodes/ai/gemini/gemini-part-converters.ts:331

Convert Gemini API Part to GeminiMessagePart format. Preserves ALL fields EXACTLY as returned from the API for proper multi-turn continuity.

CRITICAL: Only copies thought if TRUE, never sets thought: false. This function is identical across all Gemini nodes - no whitelisting needed on API→FireFlow conversion.

Parameters

part

Part

The API Part to convert

Returns

GeminiMessagePart

GeminiMessagePart with all fields preserved

Licensed under BUSL-1.1