CLlmClient::ClearHistory Method  
 
BOOL ClearHistory();

The ClearHistory method clears the conversation history for the current client session.

Parameters

None.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The ClearHistory method removes all messages and responses stored in the conversation history for the specified client session. This can be used to begin a new conversation while preserving the current connection, provider settings, model selection, timeout, system prompt and other session options.

This method only clears the local history maintained by the client. It does not reset provider-specific settings, delete cached model information or close the active HTTP connection. It also does not change the current system prompt.

After the history has been cleared, subsequent calls to SendMessage or SendMessageEx will not include any previous messages from the conversation history.

Clearing the conversation history invalidates any string pointers previously returned in LLM_RESPONSE structures or by message history methods. Applications must not use those pointers after this method returns. If the application needs to keep any message or response text, it should make its own copy before clearing the history.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csllmv12.lib

See Also