LlmClearHistory Function  
 
BOOL WINAPI LlmClearHistory(
  HCLIENT hClient  
);

The LlmClearHistory function clears the conversation history for the current client session.

Parameters

hClient
A handle to the client session.

Return Value

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

Remarks

The LlmClearHistory function 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 function 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 LlmSendMessage or LlmSendMessageEx 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 functions. Applications must not use those pointers after this function 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

LlmGetHistorySize, LlmSetHistorySize, LlmGetFirstMessage, LlmGetNextMessage, LlmResetSession, LlmTrimHistory