TsgcAIChat › Methods › ClearHistory

ClearHistory Method

Removes every message stored in the conversation history.

Syntax

procedure ClearHistory;

Remarks

Discards all user and assistant messages kept in the internal history so the next Chat or ChatStream request starts a fresh conversation. SystemMessage, ChatOptions and Provider are left untouched. Call it between independent sessions or whenever the context window should be reset.

Example

oChat.ClearHistory;

Back to Methods