parseContent ( lenientPart : | string | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; partial ?: boolean ; ref ?: string ; } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } & { content ?: (
| { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; partial ?: boolean ; ref ?: string ; } ; toolResponse ?: undefined ; } | (
{ toolResponse: { name: string; ref?: string | undefined; output?: unknown; } & { content?: ({ text: string; custom?: Record<string, unknown> | undefined; metadata?: Record<string, unknown> | undefined; ... 5 more ...; resource?: undefined; } | ... 6 more ... | { ...; })[] | undefined; }; ... 7 more ...; resource?: ...
)
| { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning : string ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource : { uri : string } ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )
[] ; } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning : string ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource : { uri : string } ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | (
| string | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; partial ?: boolean ; ref ?: string ; } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } & { content ?: (
| { custom ?: (...)
| (...)
; data ?: unknown ; media ?: undefined ; metadata ?: (...)
| (...)
; reasoning ?: undefined ; resource ?: undefined ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: (...)
| (...)
; data ?: unknown ; media : { contentType ?: ...
; url : ...
} ; metadata ?: (...)
| (...)
; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: (...)
| (...)
; data ?: unknown ; media ?: undefined ; metadata ?: (...)
| (...)
; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest : { input ?: ...
; name : ...
; partial ?: ...
; ref ?: ...
} ; toolResponse ?: undefined ; } | (
{ toolResponse: { name: string; ref?: string | undefined; output?: unknown; } & { content?: ({ text: string; custom?: Record<string, unknown> | undefined; metadata?: Record<string, unknown> | undefined; ... 5 more ...; resource?: undefined; } | ... 6 more ... | { ...; })[] | undefined; }; ... 7 more ...; resource?: ...
)
| { custom ?: (...)
| (...)
; data ?: unknown ; media ?: undefined ; metadata ?: (...)
| (...)
; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < (...)
, (...)
> ; data ?: unknown ; media ?: undefined ; metadata ?: (...)
| (...)
; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: (...)
| (...)
; data ?: unknown ; media ?: undefined ; metadata ?: (...)
| (...)
; reasoning : string ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: (...)
| (...)
; data ?: unknown ; media ?: undefined ; metadata ?: (...)
| (...)
; reasoning ?: undefined ; resource : { uri : ...
} ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )
[] ; } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning : string ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource : { uri : string } ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )
[] , ) : (
| { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; partial ?: boolean ; ref ?: string ; } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } & { content ?: ({ text: string; custom?: Record<string, unknown> | undefined; metadata?: Record<string, unknown> | undefined; media?: undefined; toolRequest?: undefined; toolResponse?: undefined; data?: unknown; reasoning?: undefined; resource?: undefined; } | ... 6 more ... | { ...; })[]
; } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning : string ; resource ?: undefined ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; reasoning ?: undefined ; resource : { uri : string } ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )
[]
Message represents a single role's contribution to a generation. Each message can contain multiple parts (for example text and an image), and each generation can contain multiple messages.