If the function succeeds, the return value is the length of the
header value in characters, not including the terminating null character.
If the header is undefined or the function fails, the return value is
zero. To get extended error information, call LlmGetLastError.
If the header field does not exist, the error code will be
ST_ERROR_HEADER_NOT_FOUND.
The LlmGetResponseHeader function returns the value of a response
header from the last request made to the service provider.
This function is intended for applications that need lower-level access to
provider-specific response headers. Most applications do not need to
call this function. Standard response information, such as the HTTP
status code, response text, token usage, model name, and elapsed time,
is available through the API.
The headers returned by a service provider can vary depending on the
provider, model, endpoint, account configuration, and the specific request
being made. Applications should not assume that a particular header will
always be present unless it is documented by the service provider.
If the header field specified by lpszHeaderName was not
returned by the server, this function will return zero. If the
lpszHeaderValue parameter is not NULL, it will contain an empty
string when the function returns. The response headers are only
available after a request has been sent to the server.