If the function succeeds, the return value is the number of
characters copied into the string buffer, not including the
terminating null character. If the function fails, the return
value is zero. To get extended error information, call
LlmGetLastError.
The LlmGetSystemPrompt function retrieves the system prompt
associated with the specified client session. The system prompt provides
initial instructions to the model and influences how responses are
generated for subsequent requests.
To retrieve the system prompt, an application can first call this
function with a NULL buffer to determine the required length, then allocate
a buffer of sufficient size and call the function again to retrieve the
prompt.
If a system prompt has not been defined for the session, the function
returns zero and the last error code is set to NO_ERROR. This condition
indicates that no prompt is currently set and should not be treated as a
failure.
The system prompt may be specified when creating a session using
LlmConnectEx and the LLM_SESSION structure, or modified at runtime
using LlmSetSystemPrompt.