| Class |
Description |
| CLlmClient |
Constructor which initializes the current instance of the class. |
| ~CLlmClient |
Destructor which releases resources allocated by the class. |
| Method |
Description |
| AskModel |
Sends a prompt to the specified service provider and model. |
| AttachHandle |
Attaches the specified client handle to this instance of the class. |
| AttachThread |
Attaches the specified client handle to another thread. |
| Cancel |
Cancels the current blocking request. |
| ClearHeaders |
Clears the custom HTTP request headers for the client session. |
| ClearHistory |
Clears the current conversation history for the client. |
| Connect |
Establishes a connection using the specified provider, URL, model, API key, and options. |
| ConnectEx |
Establishes a connection using an existing session structure. |
| ConvertTimestamp |
Converts a message or response timestamp value into a SYSTEMTIME structure. |
| CreateSession |
Creates an internal session object using the specified provider settings. |
| DeleteSession |
Deletes an internal session object and releases its resources. |
| DetachHandle |
Detaches the handle for the current instance of this class. |
| DisableTrace |
Disables logging of network function calls. |
| Disconnect |
Disconnects from the provider and releases the session handle. |
| EnableTrace |
Enables logging of network function calls to a file. |
| EnumModels |
Enumerates the models available for the connected provider. |
| EnumProviders |
Enumerates the supported LLM providers. |
| EstimateTokenCount |
Estimates the number of tokens in a text string for a specific provider. |
| ExportHistory |
Exports the current conversation history to a JSON-formatted file. |
| FindMessage |
Searches the conversation history for a message matching the specified text or flags. |
| FormatTimestamp |
Formats a message timestamp as a ISO 8601 date and time string. |
| GetCacheTime |
Returns the current model or metadata cache lifetime for the client. |
| GetDefaultModelFlags |
Returns the default capability flags for the specified model. |
| GetDefaultModelName |
Returns the default model name for the specified provider. |
| GetDefaultUrl |
Returns the default endpoint URL for the specified provider. |
| GetErrorString |
Returns a text description for the specified error code. |
| GetFirstMessage |
Retrieves the first message in the conversation history. |
| GetHandle |
Returns the client handle used by this instance of the class. |
| GetHeader |
Returns the value of an HTTP header from the server response. |
| GetHistorySize |
Returns the maximum number of messages which can be stored in the conversation history. |
| GetIdleTime |
Returns the current idle timeout period for the client. |
| GetLastError |
Returns the last error code for the current thread. |
| GetMemoryUsage |
Returns the amount of memory currently used for the client session. |
| GetMessage |
Retrieves a specific message prompt and response using the history index. |
| GetMessageById |
Retrieves a specific message prompt and response pair by message ID. |
| GetMessageCount |
Returns the current number of messages in the conversation history. |
| GetModelContextSize |
Returns the context window size for the specified model. |
| GetModelFlags |
Returns the current model behavior flags for the client. |
| GetModelInfo |
Returns detailed information about a specific model. |
| GetModelName |
Returns the name of the current model used with a client session. |
| GetNextMessage |
Retrieves the next message in the conversation history. |
| GetOptions |
Returns the current client option flags. |
| GetProviderFlags |
Returns the capability flags associated with a provider. |
| GetProviderId |
Returns the current provider ID or one based on a provider name, endpoint URL or model name. |
| GetProviderInfo |
Retrieves detailed information about a provider. |
| GetProviderName |
Returns the display name of a provider. |
| GetProviderUrl |
Returns the provider endpoint URL for the current session. |
| GetSession |
Returns a pointer to the current LLM_SESSION structure. |
| GetStatusCode |
Returns the most recent HTTP status code for the client request. |
| GetSystemPrompt |
Returns the current system prompt for the client session. |
| GetTimeout |
Returns the number of seconds until a request times out. |
| GetTokenUsage |
Returns token usage statistics for the client session. |
| GetUserAgent |
Returns the current user-agent string used by the client. |
| ImportHistory |
Imports a conversation history from the specified JSON-formatted file. |
| IsBlocking |
Returns whether the client is currently processing a blocking operation. |
| IsConnected |
Returns whether the client session is valid and connected to a server. |
| IsInitialized |
Determines if the class has been successfully initialized. |
| NormalizeText |
Normalizes message text into a consistent format. |
| ResetSession |
Resets the current client session to its initial state. |
| SendMessage |
Sends a prompt to the model and returns the response as a string. |
| SendMessageEx |
Sends a structured message to the model and returns a structured response. |
| SetCacheTime |
Sets the cache lifetime used by the client for model or provider data. |
| SetHeader |
Sets the value of a custom HTTP header issued with subsequent requests. |
| SetHistorySize |
Sets the maximum number of messages retained in the conversation history. |
| SetIdleTime |
Sets the idle timeout period for the client session. |
| SetLastError |
Sets the last error code for the current thread. |
| SetModelFlags |
Sets model behavior flags for the client session. |
| SetModelName |
Changes the current model for a client session. |
| SetOptions |
Sets the current client option flags. |
| SetSystemPrompt |
Sets the system prompt for the client session. |
| SetTimeout |
Sets the number of seconds until a blocking operation times out. |
| SetUserAgent |
Sets the user-agent string used by the client. |
| ShowError |
Displays a message box with a description of the specified error. |
| TrimHistory |
Removes older messages from the conversation history, optionally constrained by token usage. |
| ValidateModel |
Validates that a model name is recognized or supported by the current provider. |
| ValidateText |
Performs basic validation on message text before it is submitted to a model. |