TsgcAIOpenAIChatBot › Properties › OpenAIOptions
OpenAI API credentials and logging (ApiKey, Organization, LogOptions) shared by Whisper, ChatCompletion and Embeddings calls.
property OpenAIOptions: TsgcHTTPOpenAI_Options read FOpenAIOptions write SetOpenAIOptions;
—
Holds the credentials and log settings used for every REST call made by the ChatBot. ApiKey is mandatory; Organization is optional. When LogOptions.Enabled is true every request/response is appended to LogOptions.FileName, which helps diagnose Whisper, ChatCompletion and Embeddings calls without extra plumbing.
sgcChatBot.OpenAIOptions.ApiKey := 'sk-...';
sgcChatBot.OpenAIOptions.Organization := 'org-...';
sgcChatBot.OpenAIOptions.LogOptions.Enabled := True;
sgcChatBot.OpenAIOptions.LogOptions.FileName := 'chatbot.log';