Talk to a model, or let one talk back
TsgcAIChat is the unified client. Set Provider, set ChatOptions.ApiKey and ChatOptions.Model, call Chat. Token streaming arrives on OnChatStream with a Cancel flag, and ChatAsync returns a future on Delphi 2010 and later so the UI thread never blocks. TsgcAIDocumentExtractor turns a PDF or an image into JSON validated against your schema, with a confidence per field. TsgcAIVoiceAgent is a realtime voice agent over OpenAI Realtime or Gemini Live that listens, talks back, lets the user interrupt and calls your tools. TsgcAIVoiceTranslator translates speech in realtime over OpenAI gpt-realtime-translate, with live transcripts in both languages. The other three wrap complete conversation loops, including the voice ones. TsgcAIAgent runs the tool loop for you with your own tools and the tools of your MCP servers, asks approval for tools that change data and stops on the answer, MaxSteps, the token limit or Cancel. TsgcAIGuardrails redacts personal data before a request, allows or denies tools by name and validates structured answers against a JSON schema. TsgcAIUsageMeter prices every request, keeps totals per user and session, enforces daily or monthly budgets and exports to CSV, a TDataSet or OpenTelemetry. On TsgcAIChat, tool calling works on all seven providers, model aliases name models by role, and Fallbacks move a request to the next provider when one fails.