Skip to content

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 ​

PropertyTypeDefaultDescription
ProviderstringstubWhich provider answers: stub, docsearch, claude, openai, gemini or one of yours. A name nobody registered is an error, not a fallback to stub
LanguageTHelpChatLanguagehclAutohclAuto (OS locale), hclEnglish, hclItalian. In JSON: "auto", "en", "it"
Greetingstring(localized)The first bubble of an empty conversation
PoolSizeInteger2Worker threads answering in parallel
MessageMaxLengthInteger4000A longer user message is cut
HistoryMaxMessagesInteger50Messages sent to the provider as context
MaxStoredMessagesInteger200Messages kept in the store; older ones are pruned

Documentation ​

PropertyTypeDefaultDescription
DocIndexFilestringhelp-index.json next to the exeThe documentation index
DocBaseUrlstring(empty)Prepended to the relative URLs of the pages
DocFolderstring(empty)Folder of Markdown pages the panel renders itself; see reading the pages inside the panel

Conversation persistence ​

PropertyTypeDefaultDescription
PersistConversationBooleanTrueSave and restore the conversation between runs
ConversationFilestring%APPDATA%\<App>\helpchatai-conversation.jsonWhere
ConversationMaxAgeDaysInteger30An 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.

PropertyTypeDefaultDescription
ApiKeystring(empty)Empty = the environment variable of that provider
Modelstring(its own)Empty = the default model of that provider
BaseUrlstring(its own)Empty = the official endpoint
MaxTokensInteger1024Maximum length of a reply
GroundingMaxPagesInteger3Documentation pages injected into the system prompt (0 = off)
GroundingMaxCharsInteger2000Characters of page text per page (0 = summary only)
SystemPromptstring(built-in)Replaces the built-in instruction
MaxToolRoundsInteger4Model calls per reply when actions are used
ConnectTimeoutMsInteger15000
ResponseTimeoutMsInteger120000

Defaults per provider:

SectionModelEndpointEnvironment variable
Claudeclaude-haiku-4-5https://api.anthropic.comANTHROPIC_API_KEY
OpenAIgpt-6-lunahttps://api.openai.comOPENAI_API_KEY
Geminigemini-3.8-flashhttps://generativelanguage.googleapis.comGEMINI_API_KEY, then GOOGLE_API_KEY

And what belongs to one of them only:

PropertySectionDefaultDescription
ApiVersionClaude2023-06-01anthropic-version header
OrganizationOpenAI(empty)OpenAI-Organization header; empty = not sent
AzureDeploymentOpenAI(empty)Not empty = Azure OpenAI: deployment in the path, key in the api-key header
AzureApiVersionOpenAI2024-10-21The api-version query parameter of Azure

Remote engine ​

Settings.Remote — JSON object "Remote". See Running the engine on a server.

PropertyTypeDefaultDescription
BaseUrlstring(empty)Root URL of the HelpChatAI server. Empty = the engine runs in this process
AppKeystring(empty)Key identifying this application to the server (not the model key)
UserIdstring(empty)Who is asking, when the application knows: the server keeps one conversation per user
UserTokenstring(empty)Optional credential for UserId, validated by the server's OnAuthenticate
UseHostChannelBooleanTrueOpen the loopback channel so the page can talk to its host (its ✕)
TimeoutMsInteger4000Timeout of the calls the transport makes on the UI thread

The configuration files ​

pascal
THelpChatSettings.SharedUserConfigFile;  // %APPDATA%\HelpChatAI\helpchatai.json
THelpChatSettings.AppConfigFile;         // helpchatai.json next to the executable
THelpChatSettings.UserConfigFile;        // %APPDATA%\<YourApp>\helpchatai.json

They 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 ​

MethodDescription
Assign(Source)Copies every setting (this is how a request gets its private snapshot)
LoadFromJSON(AJson) / SaveToJSONRead and write the JSON form
LoadFromFile(AFileName) / SaveToFile(AFileName)The same, on a file
LoadFromDefaultFilesMerges 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) / ActiveModelThe section of a provider; the one in use, which is the Claude section for stub and docsearch
ResolveDocIndexFileThe index path actually used
ResolveConversationFileThe conversation path actually used
ResolveGreetingGreeting, or the localized default
ActiveModel.ResolveApiKeyThe key actually used (property, then environment variable)
ActiveModel.ResolveModel / NormalizedBaseUrlThe model and endpoint actually used

A complete file ​

json
{
  "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
  }
}

Released under the Apache License 2.0