Skip to content

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

Function: convertPartsToAPIFormatBatch()

convertPartsToAPIFormatBatch(parts, support?, context?, debugLog?, options?): Promise<(Part | null)[]>

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

Convert multiple parts to API format in parallel while maintaining order. Optimized for IMAGE_ONLY mode with parallel file downloads.

Parameters

parts

GeminiMessagePart[]

Array of parts to convert

support?

GeminiPartTypeSupport = GeminiPartTypeSupport.ALL

Which part types to allow (whitelist mode)

context?

ExecutionContext

Optional execution context for debug logging

debugLog?

(ctx, msg) => Promise<void>

Optional debug logging function

options?

Optional configuration for concurrency and timeout

maxConcurrency?

number

timeout?

number

Returns

Promise<(Part | null)[]>

Promise<Array<Part | null>> with results in same order as input

Licensed under BUSL-1.1