agentskit.js

normalizeContent

Auto-generated API reference for normalizeContent.

Function: normalizeContent()

normalizeContent(content, parts): object

Defined in: packages/core/src/types/content.ts:106

Normalize any of (string | ContentPart[] | undefined) into \{ text, parts \}. Callers that have both the legacy content string and the new parts array use this to pick the right one.

#Parameters

#content

string | undefined

#parts

ContentPart[] | undefined

#Returns

object

#parts

parts: ContentPart[]

#text

text: string

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page