Open Agent Loops
API Reference

ContentPart

@open-agent-loops/core


type ContentPart = 
  | TextPart
  | ImagePart
  | AudioPart
  | FilePart;

Defined in: types/content-part.ts:115

One part of a multimodal UserMessage content array — text, image, audio, or file — discriminated on type.

Remarks

The shapes mirror OpenAI's ChatCompletionContentPart members exactly so the array passes straight through egress. A user turn's content is either a plain string (the common case) or a ContentPart[].

On this page