Settings reference
THelpChatSettings (unit HelpChatAI.Settings) is the Settings property of both components and what helpchatai.json fills. Every property below has the same name as its JSON key.
Engine
| Property | Type | Default | Description |
|---|---|---|---|
Provider | string | stub | Which provider answers: stub, docsearch, claude, openai, gemini or one of yours. A name nobody registered is an error, not a fallback to stub |
Language | THelpChatLanguage | hclAuto | hclAuto (OS locale), hclEnglish, hclItalian. In JSON: "auto", "en", "it" |
Greeting | string | (localized) | The first bubble of an empty conversation |
PoolSize | Integer | 2 | Worker threads answering in parallel |
MessageMaxLength | Integer | 4000 | A longer user message is cut |
HistoryMaxMessages | Integer | 50 | Messages sent to the provider as context |
MaxStoredMessages | Integer | 200 | Messages kept in the store; older ones are pruned |
Documentation
| Property | Type | Default | Description |
|---|---|---|---|
DocIndexFile | string | help-index.json next to the exe | The documentation index |
DocBaseUrl | string | (empty) | Prepended to the relative URLs of the pages |
DocFolder | string | (empty) | Folder of Markdown pages the panel renders itself; see reading the pages inside the panel |
Conversation persistence
| Property | Type | Default | Description |
|---|---|---|---|
PersistConversation | Boolean | True | Save and restore the conversation between runs |
ConversationFile | string | %APPDATA%\<App>\helpchatai-conversation.json | Where |
ConversationMaxAgeDays | Integer | 30 | An older saved conversation is discarded |
The model providers
Settings.Claude, Settings.OpenAI and Settings.Gemini — JSON objects "Claude", "OpenAI" and "Gemini". They are the same shape, and only the one named by Provider is read. Settings.ActiveModel is that section, whichever it is.
| Property | Type | Default | Description |
|---|---|---|---|
ApiKey | string | (empty) | Empty = the environment variable of that provider |
Model | string | (its own) | Empty = the default model of that provider |
BaseUrl | string | (its own) | Empty = the official endpoint |
MaxTokens | Integer | 1024 | Maximum length of a reply |
GroundingMaxPages | Integer | 3 | Documentation pages injected into the system prompt (0 = off) |
GroundingMaxChars | Integer | 2000 | Characters of page text per page (0 = summary only) |
SystemPrompt | string | (built-in) | Replaces the built-in instruction |
MaxToolRounds | Integer | 4 | Model calls per reply when actions are used |
ConnectTimeoutMs | Integer | 15000 | |
ResponseTimeoutMs | Integer | 120000 |
Defaults per provider:
| Section | Model | Endpoint | Environment variable |
|---|---|---|---|
Claude | claude-haiku-4-5 | https://api.anthropic.com | ANTHROPIC_API_KEY |
OpenAI | gpt-6-luna | https://api.openai.com | OPENAI_API_KEY |
Gemini | gemini-3.8-flash | https://generativelanguage.googleapis.com | GEMINI_API_KEY, then GOOGLE_API_KEY |
And what belongs to one of them only:
| Property | Section | Default | Description |
|---|---|---|---|
ApiVersion | Claude | 2023-06-01 | anthropic-version header |
Organization | OpenAI | (empty) | OpenAI-Organization header; empty = not sent |
AzureDeployment | OpenAI | (empty) | Not empty = Azure OpenAI: deployment in the path, key in the api-key header |
AzureApiVersion | OpenAI | 2024-10-21 | The api-version query parameter of Azure |
Remote engine
Settings.Remote — JSON object "Remote". See Running the engine on a server.
| Property | Type | Default | Description |
|---|---|---|---|
BaseUrl | string | (empty) | Root URL of the HelpChatAI server. Empty = the engine runs in this process |
AppKey | string | (empty) | Key identifying this application to the server (not the model key) |
UserId | string | (empty) | Who is asking, when the application knows: the server keeps one conversation per user |
UserToken | string | (empty) | Optional credential for UserId, validated by the server's OnAuthenticate |
UseHostChannel | Boolean | True | Open the loopback channel so the page can talk to its host (its ✕) |
TimeoutMs | Integer | 4000 | Timeout of the calls the transport makes on the UI thread |
The configuration files
THelpChatSettings.SharedUserConfigFile; // %APPDATA%\HelpChatAI\helpchatai.json
THelpChatSettings.AppConfigFile; // helpchatai.json next to the executable
THelpChatSettings.UserConfigFile; // %APPDATA%\<YourApp>\helpchatai.jsonThey are merged in that order on activation when the component's ConfigFileName is empty — only the keys present in each file are applied. With a file named there, that one is read instead, and nothing else; if it is not found, activation raises EHelpChatConfigError. See Configuration.
Methods
| Method | Description |
|---|---|
Assign(Source) | Copies every setting (this is how a request gets its private snapshot) |
LoadFromJSON(AJson) / SaveToJSON | Read and write the JSON form |
LoadFromFile(AFileName) / SaveToFile(AFileName) | The same, on a file |
LoadFromDefaultFiles | Merges the three standard files; returns the ones it read |
LoadConfiguration(AFileName) | That file alone when named (raising if it is not there), else the three standard ones |
ModelFor(AProvider) / ActiveModel | The section of a provider; the one in use, which is the Claude section for stub and docsearch |
ResolveDocIndexFile | The index path actually used |
ResolveConversationFile | The conversation path actually used |
ResolveGreeting | Greeting, or the localized default |
ActiveModel.ResolveApiKey | The key actually used (property, then environment variable) |
ActiveModel.ResolveModel / NormalizedBaseUrl | The model and endpoint actually used |
A complete file
{
"Provider": "claude",
"Language": "it",
"Greeting": "",
"DocIndexFile": "help-index.json",
"DocBaseUrl": "https://help.mycompany.com/myapp/",
"DocFolder": "Help",
"PoolSize": 2,
"MessageMaxLength": 4000,
"HistoryMaxMessages": 50,
"MaxStoredMessages": 200,
"PersistConversation": true,
"ConversationFile": "",
"ConversationMaxAgeDays": 30,
"Claude": {
"ApiKey": "",
"Model": "claude-haiku-4-5",
"MaxTokens": 1024,
"GroundingMaxPages": 3,
"GroundingMaxChars": 2000,
"SystemPrompt": "",
"MaxToolRounds": 4,
"BaseUrl": "https://api.anthropic.com",
"ApiVersion": "2023-06-01",
"ConnectTimeoutMs": 15000,
"ResponseTimeoutMs": 120000
},
"OpenAI": {
"ApiKey": "",
"Model": "gpt-6-luna",
"BaseUrl": "",
"Organization": "",
"AzureDeployment": "",
"AzureApiVersion": "2024-10-21",
"MaxTokens": 1024,
"GroundingMaxPages": 3,
"GroundingMaxChars": 2000,
"SystemPrompt": "",
"MaxToolRounds": 4,
"ConnectTimeoutMs": 15000,
"ResponseTimeoutMs": 120000
},
"Gemini": {
"ApiKey": "",
"Model": "gemini-3.8-flash",
"BaseUrl": "",
"MaxTokens": 1024,
"GroundingMaxPages": 3,
"GroundingMaxChars": 2000,
"SystemPrompt": "",
"MaxToolRounds": 4,
"ConnectTimeoutMs": 15000,
"ResponseTimeoutMs": 120000
},
"Remote": {
"BaseUrl": "",
"AppKey": "",
"UserId": "",
"UserToken": "",
"UseHostChannel": true,
"TimeoutMs": 4000
}
}