get messages () : { 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 ; } | { 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 ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text : ...; toolRequest ?: ...; toolResponse ?: ...; } | { custom ?: ...; data ?: ...; media : ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text ?: ...; toolRequest ?: ...; toolResponse ?: ...; } | { custom ?: ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text ?: ...; toolRequest : ...; toolResponse ?: ...; } | { custom ?: ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text ?: ...; toolRequest ?: ...; toolResponse : ...; } | { custom ?: ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text ?: ...; toolRequest ?: ...; toolResponse ?: ...; } | { custom : ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text ?: ...; toolRequest ?: ...; toolResponse ?: ...; } | { custom ?: ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning : ...; resource ?: ...; text ?: ...; toolRequest ?: ...; toolResponse ?: ...; } | { custom ?: ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource : ...; text ?: ...; toolRequest ?: ...; toolResponse ?: ...; } )[] ; } ; } | { 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 ; } )[] ; metadata ?: Record < string , unknown > ; role : "user" | "model" | "tool" | "system" ; } []
Returns { 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 ; } | { 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 ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text : ...; toolRequest ?: ...; toolResponse ?: ...; } | { custom ?: ...; data ?: ...; media : ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text ?: ...; toolRequest ?: ...; toolResponse ?: ...; } | { custom ?: ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text ?: ...; toolRequest : ...; toolResponse ?: ...; } | { custom ?: ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text ?: ...; toolRequest ?: ...; toolResponse : ...; } | { custom ?: ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text ?: ...; toolRequest ?: ...; toolResponse ?: ...; } | { custom : ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource ?: ...; text ?: ...; toolRequest ?: ...; toolResponse ?: ...; } | { custom ?: ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning : ...; resource ?: ...; text ?: ...; toolRequest ?: ...; toolResponse ?: ...; } | { custom ?: ...; data ?: ...; media ?: ...; metadata ?: ...; reasoning ?: ...; resource : ...; text ?: ...; toolRequest ?: ...; toolResponse ?: ...; } )[] ; } ; } | { 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 ; } )[] ; metadata ?: Record < string , unknown > ; role : "user" | "model" | "tool" | "system" ; } [] Defined in ai/lib/session.d.ts:216
Chat encapsulates a statful execution environment for chat. Chat session executed within a session in this environment will have acesss to session convesation history.