ChatSessionHistory Property

Gets or sets the history of the current chat session, representing a collection of user and model interactions recorded throughout the session. Updates to this property will reset both LastRequestContent and LastResponseContent.

Definition

Namespace: GenerativeAI
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public List<Content> History { get; set; }

Property Value

ListContent

Remarks

Assigning a new value to this property effectively resets the session, clearing any previously tracked request or response content. The history contains instances of Content that represent messages exchanged between the user and the model.

See Also