Defined in ai/lib/chat-SNUjxW75.d.ts:195 Constructorsconstructor new Chat ( session : Session < any > , requestBase : Promise < BaseGenerateOptions < ZodTypeAny , ZodTypeAny > > , options : { id : string ; messages ?: { content : ( | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; ref ?: string } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )[] ; metadata ?: Record < string , unknown > ; role : "user" | "model" | "tool" | "system" ; } [] ; thread : string ; } , ) : Chat Parameters session : Session < any > requestBase : Promise < BaseGenerateOptions < ZodTypeAny , ZodTypeAny > > options : { id : string ; messages ?: { content : ( | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; ref ?: string } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )[] ; metadata ?: Record < string , unknown > ; role : "user" | "model" | "tool" | "system" ; } [] ; thread : string ; } Defined in ai/lib/chat-SNUjxW75.d.ts:201 PropertiesReadonly
session Defined in ai/lib/chat-SNUjxW75.d.ts:196 Readonly
session Id sessionId : string
Defined in ai/lib/chat-SNUjxW75.d.ts:198 Accessorsmessages get messages () : { content : ( | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; ref ?: string } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; 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 > ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; ref ?: string } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )[] ; metadata ?: Record < string , unknown > ; role : "user" | "model" | "tool" | "system" ; } [] Defined in ai/lib/chat-SNUjxW75.d.ts:208 Methodssend send < O extends ZodType < any , any , any , O > = ZodTypeAny , CustomOptions extends ZodType < any , any , any , CustomOptions > = ZodObject < { maxOutputTokens : ZodOptional < ZodNumber > ; stopSequences : ZodOptional < ZodArray < ZodString , "many" > > ; temperature : ZodOptional < ZodNumber > ; topK : ZodOptional < ZodNumber > ; topP : ZodOptional < ZodNumber > ; version : ZodOptional < ZodString > ; } , "strip" , ZodTypeAny , { maxOutputTokens ?: number ; stopSequences ?: string [] ; temperature ?: number ; topK ?: number ; topP ?: number ; version ?: string ; } , { maxOutputTokens ?: number ; stopSequences ?: string [] ; temperature ?: number ; topK ?: number ; topP ?: number ; version ?: string ; } , > , > ( options : | string | ( | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; ref ?: string } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )[] | ChatGenerateOptions < O , CustomOptions > , ) : Promise < GenerateResponse < TypeOf < O > > > Type Parameters O extends ZodType < any , any , any , O > = ZodTypeAny CustomOptions extends ZodType < any , any , any , CustomOptions > = ZodObject < { maxOutputTokens : ZodOptional < ZodNumber > ; stopSequences : ZodOptional < ZodArray < ZodString , "many" > > ; temperature : ZodOptional < ZodNumber > ; topK : ZodOptional < ZodNumber > ; topP : ZodOptional < ZodNumber > ; version : ZodOptional < ZodString > ; } , "strip" , ZodTypeAny , { maxOutputTokens ?: number ; stopSequences ?: string [] ; temperature ?: number ; topK ?: number ; topP ?: number ; version ?: string ; } , { maxOutputTokens ?: number ; stopSequences ?: string [] ; temperature ?: number ; topK ?: number ; topP ?: number ; version ?: string ; } , > Parameters options : | string | ( | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; ref ?: string } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )[] | ChatGenerateOptions < O , CustomOptions > Defined in ai/lib/chat-SNUjxW75.d.ts:206 send Stream sendStream < O extends ZodType < any , any , any , O > = ZodTypeAny , CustomOptions extends ZodType < any , any , any , CustomOptions > = ZodObject < { maxOutputTokens : ZodOptional < ZodNumber > ; stopSequences : ZodOptional < ZodArray < ZodString , "many" > > ; temperature : ZodOptional < ZodNumber > ; topK : ZodOptional < ZodNumber > ; topP : ZodOptional < ZodNumber > ; version : ZodOptional < ZodString > ; } , "strip" , ZodTypeAny , { maxOutputTokens ?: number ; stopSequences ?: string [] ; temperature ?: number ; topK ?: number ; topP ?: number ; version ?: string ; } , { maxOutputTokens ?: number ; stopSequences ?: string [] ; temperature ?: number ; topK ?: number ; topP ?: number ; version ?: string ; } , > , > ( options : | string | ( | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; ref ?: string } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )[] | GenerateStreamOptions < O , CustomOptions > , ) : Promise < GenerateStreamResponse < TypeOf < O > > > Type Parameters O extends ZodType < any , any , any , O > = ZodTypeAny CustomOptions extends ZodType < any , any , any , CustomOptions > = ZodObject < { maxOutputTokens : ZodOptional < ZodNumber > ; stopSequences : ZodOptional < ZodArray < ZodString , "many" > > ; temperature : ZodOptional < ZodNumber > ; topK : ZodOptional < ZodNumber > ; topP : ZodOptional < ZodNumber > ; version : ZodOptional < ZodString > ; } , "strip" , ZodTypeAny , { maxOutputTokens ?: number ; stopSequences ?: string [] ; temperature ?: number ; topK ?: number ; topP ?: number ; version ?: string ; } , { maxOutputTokens ?: number ; stopSequences ?: string [] ; temperature ?: number ; topK ?: number ; topP ?: number ; version ?: string ; } , > Parameters options : | string | ( | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text : string ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media : { contentType ?: string ; url : string } ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest : { input ?: unknown ; name : string ; ref ?: string } ; toolResponse ?: undefined ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse : { name : string ; output ?: unknown ; ref ?: string } ; } | { custom ?: Record < string , unknown > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } | { custom : Record < string , any > ; data ?: unknown ; media ?: undefined ; metadata ?: Record < string , unknown > ; text ?: undefined ; toolRequest ?: undefined ; toolResponse ?: undefined ; } )[] | GenerateStreamOptions < O , CustomOptions > Defined in ai/lib/chat-SNUjxW75.d.ts:207
Chat encapsulates a statful execution environment for chat. Chat session executed within a session in this environment will have acesss to session convesation history.