TsgcAIChat › Properties › Provider

Provider Property

Selects the AI backend used by the component.

Syntax

property Provider: TsgcAIChatProvider read FProvider write SetProvider;

Default Value

—

Remarks

TsgcAIChatProvider enumeration that picks which AI backend receives chat requests. Accepted values are aicpOpenAI, aicpAnthropic, aicpGemini, aicpDeepSeek, aicpOllama, aicpGrok and aicpMistral. Changing the value frees any cached underlying provider instance so the next call rebuilds it with the current ChatOptions. The default is aicpOpenAI. Switching providers usually requires updating ChatOptions.ApiKey and ChatOptions.Model to match the new backend.

Example

oChat.Provider := aicpAnthropic;
oChat.ChatOptions.ApiKey := 'ANTHROPIC_KEY';
oChat.ChatOptions.Model := 'claude-sonnet-4-20250514';

Back to Properties