unit Chilkat.Ai;

{
  Pascal wrapper for Chilkat Ai.
  Auto-generated by PascalWrapperGenerator -- do not edit manually.
}

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

interface

uses
  SysUtils,
  Chilkat.Base;

type

  { TAi wraps CkAi via the C bridge layer. }
  TAi = class(TChilkatBase)
  private
    FOnAbortCheck: TChilkatAbortCheckEvent;
    FOnPercentDone: TChilkatPercentDoneEvent;
    FOnProgressInfo: TChilkatProgressInfoEvent;
    function  GetLastErrorHtml: string;
    function  GetLastErrorText: string;
    function  GetLastErrorXml: string;
    function  GetVersion: string;
    function  GetDebugLogFilePath: string;
    procedure SetDebugLogFilePath(AValue: string);
    function  GetVerboseLogging: Boolean;
    procedure SetVerboseLogging(AValue: Boolean);
    function  GetLastMethodSuccess: Boolean;
    procedure SetLastMethodSuccess(AValue: Boolean);
    function  GetProvider: string;
    procedure SetProvider(AValue: string);
    function  GetSelectedConvo: string;
    procedure SetSelectedConvo(AValue: string);
    function  GetApiKey: string;
    procedure SetApiKey(AValue: string);
    function  GetModel: string;
    procedure SetModel(AValue: string);
    function  GetFullTranscript: Boolean;
    procedure SetFullTranscript(AValue: Boolean);
    function  GetStreaming: Boolean;
    procedure SetStreaming(AValue: Boolean);
    function  GetHeartbeatMs: Integer;
    procedure SetHeartbeatMs(AValue: Integer);
    function  GetHostedConvo: Boolean;
    procedure SetHostedConvo(AValue: Boolean);
    function  GetUncommonOptions: string;
    procedure SetUncommonOptions(AValue: string);
    function  GetIdleTimeoutMs: Integer;
    procedure SetIdleTimeoutMs(AValue: Integer);
    function  GetResponseStatusCode: Integer;
    function  GetApiSpec: string;
    procedure SetApiSpec(AValue: string);
    function  GetBaseUrl: string;
    procedure SetBaseUrl(AValue: string);
    function  GetApiKeyHeader: string;
    procedure SetApiKeyHeader(AValue: string);
    function  GetHasFunctionCalls: Boolean;
    function  GetJsToolTimeout: Integer;
    procedure SetJsToolTimeout(AValue: Integer);
    function  GetEnableSecrets: Boolean;
    procedure SetEnableSecrets(AValue: Boolean);
    function  GetLastResponseRefused: Boolean;
    function  GetRefusalText: string;
    procedure SetOnAbortCheck(AValue: TChilkatAbortCheckEvent);
    procedure SetOnPercentDone(AValue: TChilkatPercentDoneEvent);
    procedure SetOnProgressInfo(AValue: TChilkatProgressInfoEvent);
  public
    constructor Create;
    destructor  Destroy; override;

    property LastErrorHtml: string read GetLastErrorHtml;
    property LastErrorText: string read GetLastErrorText;
    property LastErrorXml: string read GetLastErrorXml;
    property Version: string read GetVersion;
    property DebugLogFilePath: string read GetDebugLogFilePath write SetDebugLogFilePath;
    property VerboseLogging: Boolean read GetVerboseLogging write SetVerboseLogging;
    property LastMethodSuccess: Boolean read GetLastMethodSuccess write SetLastMethodSuccess;
    property Provider: string read GetProvider write SetProvider;
    property SelectedConvo: string read GetSelectedConvo write SetSelectedConvo;
    property ApiKey: string read GetApiKey write SetApiKey;
    property Model: string read GetModel write SetModel;
    property FullTranscript: Boolean read GetFullTranscript write SetFullTranscript;
    property Streaming: Boolean read GetStreaming write SetStreaming;
    property HeartbeatMs: Integer read GetHeartbeatMs write SetHeartbeatMs;
    property HostedConvo: Boolean read GetHostedConvo write SetHostedConvo;
    property UncommonOptions: string read GetUncommonOptions write SetUncommonOptions;
    property IdleTimeoutMs: Integer read GetIdleTimeoutMs write SetIdleTimeoutMs;
    property ResponseStatusCode: Integer read GetResponseStatusCode;
    property ApiSpec: string read GetApiSpec write SetApiSpec;
    property BaseUrl: string read GetBaseUrl write SetBaseUrl;
    property ApiKeyHeader: string read GetApiKeyHeader write SetApiKeyHeader;
    property HasFunctionCalls: Boolean read GetHasFunctionCalls;
    property JsToolTimeout: Integer read GetJsToolTimeout write SetJsToolTimeout;
    property EnableSecrets: Boolean read GetEnableSecrets write SetEnableSecrets;
    property LastResponseRefused: Boolean read GetLastResponseRefused;
    property RefusalText: string read GetRefusalText;

    { Event callbacks.  Return True from OnAbortCheck / OnPercentDone
      to abort the running method.  Callbacks are invoked on the
      thread that called the Chilkat method.  The HeartbeatMs
      property controls the AbortCheck frequency. }
    property OnAbortCheck: TChilkatAbortCheckEvent read FOnAbortCheck write SetOnAbortCheck;
    property OnPercentDone: TChilkatPercentDoneEvent read FOnPercentDone write SetOnPercentDone;
    property OnProgressInfo: TChilkatProgressInfoEvent read FOnProgressInfo write SetOnProgressInfo;

    function  NewConvo(const name: string; const sysMsg: string; const devMsg: string): Boolean;
    function  ExportConvo(const name: string; json: TChilkatBase): Boolean;
    function  ImportConvo(const name: string; json: TChilkatBase): Boolean;
    function  ListConvos(st: TChilkatBase): Boolean;
    function  DeleteConvo(const name: string): Boolean;
    function  SetConnectionSettings(sock: TChilkatBase): Boolean;
    function  Ask(const outputType: string): Boolean;
    procedure GetLastJsonData(json: TChilkatBase);
    function  GetModels(st: TChilkatBase): Boolean;
    function  InputAddText(const text: string): Boolean;
    function  GetOutputText: string;
    function  GetOutputTextSb(sb: TChilkatBase): Boolean;
    procedure InputClear;
    function  InputAddTextSb(sb: TChilkatBase): Boolean;
    function  InputAddImageData(bd: TChilkatBase; const summary: string): Boolean;
    function  InputAddImageUrl(const url: string; const summary: string): Boolean;
    function  InputAddFileData(const filename: string; bd: TChilkatBase; const summary: string): Boolean;
    function  InputAddFileUrl(const url: string; const summary: string): Boolean;
    function  PollAi(abort: Boolean): Integer;
    function  NextAiEvent(maxWaitMs: Integer; sbName: TChilkatBase; sbDelta: TChilkatBase): Boolean;
    procedure SleepMs(millisec: Integer);
    function  SetProviderParams(json: TChilkatBase): Boolean;
    function  SetAskParams(json: TChilkatBase): Boolean;
    function  RegisterManualTools(json: TChilkatBase): Boolean;
    function  GetFunctionCalls(json: TChilkatBase): Boolean;
    function  GetSearchResults(json: TChilkatBase): Boolean;
    function  UseMcp(cMcp: TChilkatBase; const namePrefix: string): Boolean;
    function  SetOutputSchema(const name: string; schema: TChilkatBase; strict: Boolean): Boolean;
    function  GetOutputJson(json: TChilkatBase): Boolean;
    function  InputAddFnResult(const call_id: string; const fnResult: string): Boolean;
    function  RegisterJsTools(sb: TChilkatBase; evalOnly: Boolean; allowAllKeyword: Boolean): Boolean;
    function  StreamingJsToolCall(sb: TChilkatBase): Boolean;
    function  InputAddFileId(const file_id: string; const mime_type: string): Boolean;
    function  GetOutputBd(bd: TChilkatBase): Boolean;
    function  UploadFile(const path: string; const mimeType: string): string;
    function  UploadFileBd(bd: TChilkatBase; const filename: string; const mimeType: string): string;
    function  UploadFileSb(sb: TChilkatBase; const filename: string; const mimeType: string): string;
    function  InputAddImageFileId(const file_id: string; const mime_type: string): Boolean;
  end;

implementation

uses
  CkDllLoader,
  Chilkat.Utils;

{ ---- C bridge function pointer types ---- }
type
  TCkAi_Create  = function(): Pointer; cdecl;
  TCkAi_Dispose = procedure(handle: Pointer); cdecl;
  TCkBridgeAbortCheckCb   = function(userData: Pointer): Integer; cdecl;
  TCkBridgePercentDoneCb  = function(pctDone: Integer; userData: Pointer): Integer; cdecl;
  TCkBridgeProgressInfoCb = procedure(name: PAnsiChar; value: PAnsiChar; userData: Pointer); cdecl;
  TCkAi_SetAbortCheckCallback   = procedure(handle: Pointer; cb: TCkBridgeAbortCheckCb; userData: Pointer); cdecl;
  TCkAi_SetPercentDoneCallback  = procedure(handle: Pointer; cb: TCkBridgePercentDoneCb; userData: Pointer); cdecl;
  TCkAi_SetProgressInfoCallback = procedure(handle: Pointer; cb: TCkBridgeProgressInfoCb; userData: Pointer); cdecl;
  TCkAi_get_LastErrorHtml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_get_LastErrorText = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_get_LastErrorXml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_get_Version = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_get_DebugLogFilePath = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_put_DebugLogFilePath = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkAi_get_VerboseLogging = function(handle: Pointer): LongBool; cdecl;
  TCkAi_put_VerboseLogging = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkAi_get_LastMethodSuccess = function(handle: Pointer): LongBool; cdecl;
  TCkAi_put_LastMethodSuccess = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkAi_get_Provider = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_put_Provider = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkAi_get_SelectedConvo = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_put_SelectedConvo = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkAi_get_ApiKey = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_put_ApiKey = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkAi_get_Model = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_put_Model = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkAi_get_FullTranscript = function(handle: Pointer): LongBool; cdecl;
  TCkAi_put_FullTranscript = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkAi_get_Streaming = function(handle: Pointer): LongBool; cdecl;
  TCkAi_put_Streaming = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkAi_get_HeartbeatMs = function(handle: Pointer): Integer; cdecl;
  TCkAi_put_HeartbeatMs = procedure(handle: Pointer; value: Integer); cdecl;
  TCkAi_get_HostedConvo = function(handle: Pointer): LongBool; cdecl;
  TCkAi_put_HostedConvo = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkAi_get_UncommonOptions = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_put_UncommonOptions = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkAi_get_IdleTimeoutMs = function(handle: Pointer): Integer; cdecl;
  TCkAi_put_IdleTimeoutMs = procedure(handle: Pointer; value: Integer); cdecl;
  TCkAi_get_ResponseStatusCode = function(handle: Pointer): Integer; cdecl;
  TCkAi_get_ApiSpec = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_put_ApiSpec = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkAi_get_BaseUrl = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_put_BaseUrl = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkAi_get_ApiKeyHeader = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_put_ApiKeyHeader = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkAi_get_HasFunctionCalls = function(handle: Pointer): LongBool; cdecl;
  TCkAi_get_JsToolTimeout = function(handle: Pointer): Integer; cdecl;
  TCkAi_put_JsToolTimeout = procedure(handle: Pointer; value: Integer); cdecl;
  TCkAi_get_EnableSecrets = function(handle: Pointer): LongBool; cdecl;
  TCkAi_put_EnableSecrets = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkAi_get_LastResponseRefused = function(handle: Pointer): LongBool; cdecl;
  TCkAi_get_RefusalText = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_NewConvo = function(handle: Pointer; name: PAnsiChar; sysMsg: PAnsiChar; devMsg: PAnsiChar): LongBool; cdecl;
  TCkAi_ExportConvo = function(handle: Pointer; name: PAnsiChar; json: Pointer): LongBool; cdecl;
  TCkAi_ImportConvo = function(handle: Pointer; name: PAnsiChar; json: Pointer): LongBool; cdecl;
  TCkAi_ListConvos = function(handle: Pointer; st: Pointer): LongBool; cdecl;
  TCkAi_DeleteConvo = function(handle: Pointer; name: PAnsiChar): LongBool; cdecl;
  TCkAi_SetConnectionSettings = function(handle: Pointer; sock: Pointer): LongBool; cdecl;
  TCkAi_Ask = function(handle: Pointer; outputType: PAnsiChar): LongBool; cdecl;
  TCkAi_GetLastJsonData = procedure(handle: Pointer; json: Pointer); cdecl;
  TCkAi_GetModels = function(handle: Pointer; st: Pointer): LongBool; cdecl;
  TCkAi_InputAddText = function(handle: Pointer; text: PAnsiChar): LongBool; cdecl;
  TCkAi_GetOutputText = function(handle: Pointer): PAnsiChar; cdecl;
  TCkAi_GetOutputTextSb = function(handle: Pointer; sb: Pointer): LongBool; cdecl;
  TCkAi_InputClear = procedure(handle: Pointer); cdecl;
  TCkAi_InputAddTextSb = function(handle: Pointer; sb: Pointer): LongBool; cdecl;
  TCkAi_InputAddImageData = function(handle: Pointer; bd: Pointer; summary: PAnsiChar): LongBool; cdecl;
  TCkAi_InputAddImageUrl = function(handle: Pointer; url: PAnsiChar; summary: PAnsiChar): LongBool; cdecl;
  TCkAi_InputAddFileData = function(handle: Pointer; filename: PAnsiChar; bd: Pointer; summary: PAnsiChar): LongBool; cdecl;
  TCkAi_InputAddFileUrl = function(handle: Pointer; url: PAnsiChar; summary: PAnsiChar): LongBool; cdecl;
  TCkAi_PollAi = function(handle: Pointer; abort: LongBool): Integer; cdecl;
  TCkAi_NextAiEvent = function(handle: Pointer; maxWaitMs: Integer; sbName: Pointer; sbDelta: Pointer): LongBool; cdecl;
  TCkAi_SleepMs = procedure(handle: Pointer; millisec: Integer); cdecl;
  TCkAi_SetProviderParams = function(handle: Pointer; json: Pointer): LongBool; cdecl;
  TCkAi_SetAskParams = function(handle: Pointer; json: Pointer): LongBool; cdecl;
  TCkAi_RegisterManualTools = function(handle: Pointer; json: Pointer): LongBool; cdecl;
  TCkAi_GetFunctionCalls = function(handle: Pointer; json: Pointer): LongBool; cdecl;
  TCkAi_GetSearchResults = function(handle: Pointer; json: Pointer): LongBool; cdecl;
  TCkAi_UseMcp = function(handle: Pointer; cMcp: Pointer; namePrefix: PAnsiChar): LongBool; cdecl;
  TCkAi_SetOutputSchema = function(handle: Pointer; name: PAnsiChar; schema: Pointer; strict: LongBool): LongBool; cdecl;
  TCkAi_GetOutputJson = function(handle: Pointer; json: Pointer): LongBool; cdecl;
  TCkAi_InputAddFnResult = function(handle: Pointer; call_id: PAnsiChar; fnResult: PAnsiChar): LongBool; cdecl;
  TCkAi_RegisterJsTools = function(handle: Pointer; sb: Pointer; evalOnly: LongBool; allowAllKeyword: LongBool): LongBool; cdecl;
  TCkAi_StreamingJsToolCall = function(handle: Pointer; sb: Pointer): LongBool; cdecl;
  TCkAi_InputAddFileId = function(handle: Pointer; file_id: PAnsiChar; mime_type: PAnsiChar): LongBool; cdecl;
  TCkAi_GetOutputBd = function(handle: Pointer; bd: Pointer): LongBool; cdecl;
  TCkAi_UploadFile = function(handle: Pointer; path: PAnsiChar; mimeType: PAnsiChar): PAnsiChar; cdecl;
  TCkAi_UploadFileBd = function(handle: Pointer; bd: Pointer; filename: PAnsiChar; mimeType: PAnsiChar): PAnsiChar; cdecl;
  TCkAi_UploadFileSb = function(handle: Pointer; sb: Pointer; filename: PAnsiChar; mimeType: PAnsiChar): PAnsiChar; cdecl;
  TCkAi_InputAddImageFileId = function(handle: Pointer; file_id: PAnsiChar; mime_type: PAnsiChar): LongBool; cdecl;

{ ---- C bridge function pointer variables ---- }
var
  CkAi_Create:  TCkAi_Create  = nil;
  CkAi_Dispose: TCkAi_Dispose = nil;
  CkAi_SetAbortCheckCallback:   TCkAi_SetAbortCheckCallback   = nil;
  CkAi_SetPercentDoneCallback:  TCkAi_SetPercentDoneCallback  = nil;
  CkAi_SetProgressInfoCallback: TCkAi_SetProgressInfoCallback = nil;
  CkAi_get_LastErrorHtml: TCkAi_get_LastErrorHtml = nil;
  CkAi_get_LastErrorText: TCkAi_get_LastErrorText = nil;
  CkAi_get_LastErrorXml: TCkAi_get_LastErrorXml = nil;
  CkAi_get_Version: TCkAi_get_Version = nil;
  CkAi_get_DebugLogFilePath: TCkAi_get_DebugLogFilePath = nil;
  CkAi_put_DebugLogFilePath: TCkAi_put_DebugLogFilePath = nil;
  CkAi_get_VerboseLogging: TCkAi_get_VerboseLogging = nil;
  CkAi_put_VerboseLogging: TCkAi_put_VerboseLogging = nil;
  CkAi_get_LastMethodSuccess: TCkAi_get_LastMethodSuccess = nil;
  CkAi_put_LastMethodSuccess: TCkAi_put_LastMethodSuccess = nil;
  CkAi_get_Provider: TCkAi_get_Provider = nil;
  CkAi_put_Provider: TCkAi_put_Provider = nil;
  CkAi_get_SelectedConvo: TCkAi_get_SelectedConvo = nil;
  CkAi_put_SelectedConvo: TCkAi_put_SelectedConvo = nil;
  CkAi_get_ApiKey: TCkAi_get_ApiKey = nil;
  CkAi_put_ApiKey: TCkAi_put_ApiKey = nil;
  CkAi_get_Model: TCkAi_get_Model = nil;
  CkAi_put_Model: TCkAi_put_Model = nil;
  CkAi_get_FullTranscript: TCkAi_get_FullTranscript = nil;
  CkAi_put_FullTranscript: TCkAi_put_FullTranscript = nil;
  CkAi_get_Streaming: TCkAi_get_Streaming = nil;
  CkAi_put_Streaming: TCkAi_put_Streaming = nil;
  CkAi_get_HeartbeatMs: TCkAi_get_HeartbeatMs = nil;
  CkAi_put_HeartbeatMs: TCkAi_put_HeartbeatMs = nil;
  CkAi_get_HostedConvo: TCkAi_get_HostedConvo = nil;
  CkAi_put_HostedConvo: TCkAi_put_HostedConvo = nil;
  CkAi_get_UncommonOptions: TCkAi_get_UncommonOptions = nil;
  CkAi_put_UncommonOptions: TCkAi_put_UncommonOptions = nil;
  CkAi_get_IdleTimeoutMs: TCkAi_get_IdleTimeoutMs = nil;
  CkAi_put_IdleTimeoutMs: TCkAi_put_IdleTimeoutMs = nil;
  CkAi_get_ResponseStatusCode: TCkAi_get_ResponseStatusCode = nil;
  CkAi_get_ApiSpec: TCkAi_get_ApiSpec = nil;
  CkAi_put_ApiSpec: TCkAi_put_ApiSpec = nil;
  CkAi_get_BaseUrl: TCkAi_get_BaseUrl = nil;
  CkAi_put_BaseUrl: TCkAi_put_BaseUrl = nil;
  CkAi_get_ApiKeyHeader: TCkAi_get_ApiKeyHeader = nil;
  CkAi_put_ApiKeyHeader: TCkAi_put_ApiKeyHeader = nil;
  CkAi_get_HasFunctionCalls: TCkAi_get_HasFunctionCalls = nil;
  CkAi_get_JsToolTimeout: TCkAi_get_JsToolTimeout = nil;
  CkAi_put_JsToolTimeout: TCkAi_put_JsToolTimeout = nil;
  CkAi_get_EnableSecrets: TCkAi_get_EnableSecrets = nil;
  CkAi_put_EnableSecrets: TCkAi_put_EnableSecrets = nil;
  CkAi_get_LastResponseRefused: TCkAi_get_LastResponseRefused = nil;
  CkAi_get_RefusalText: TCkAi_get_RefusalText = nil;
  CkAi_NewConvo: TCkAi_NewConvo = nil;
  CkAi_ExportConvo: TCkAi_ExportConvo = nil;
  CkAi_ImportConvo: TCkAi_ImportConvo = nil;
  CkAi_ListConvos: TCkAi_ListConvos = nil;
  CkAi_DeleteConvo: TCkAi_DeleteConvo = nil;
  CkAi_SetConnectionSettings: TCkAi_SetConnectionSettings = nil;
  CkAi_Ask: TCkAi_Ask = nil;
  CkAi_GetLastJsonData: TCkAi_GetLastJsonData = nil;
  CkAi_GetModels: TCkAi_GetModels = nil;
  CkAi_InputAddText: TCkAi_InputAddText = nil;
  CkAi_GetOutputText: TCkAi_GetOutputText = nil;
  CkAi_GetOutputTextSb: TCkAi_GetOutputTextSb = nil;
  CkAi_InputClear: TCkAi_InputClear = nil;
  CkAi_InputAddTextSb: TCkAi_InputAddTextSb = nil;
  CkAi_InputAddImageData: TCkAi_InputAddImageData = nil;
  CkAi_InputAddImageUrl: TCkAi_InputAddImageUrl = nil;
  CkAi_InputAddFileData: TCkAi_InputAddFileData = nil;
  CkAi_InputAddFileUrl: TCkAi_InputAddFileUrl = nil;
  CkAi_PollAi: TCkAi_PollAi = nil;
  CkAi_NextAiEvent: TCkAi_NextAiEvent = nil;
  CkAi_SleepMs: TCkAi_SleepMs = nil;
  CkAi_SetProviderParams: TCkAi_SetProviderParams = nil;
  CkAi_SetAskParams: TCkAi_SetAskParams = nil;
  CkAi_RegisterManualTools: TCkAi_RegisterManualTools = nil;
  CkAi_GetFunctionCalls: TCkAi_GetFunctionCalls = nil;
  CkAi_GetSearchResults: TCkAi_GetSearchResults = nil;
  CkAi_UseMcp: TCkAi_UseMcp = nil;
  CkAi_SetOutputSchema: TCkAi_SetOutputSchema = nil;
  CkAi_GetOutputJson: TCkAi_GetOutputJson = nil;
  CkAi_InputAddFnResult: TCkAi_InputAddFnResult = nil;
  CkAi_RegisterJsTools: TCkAi_RegisterJsTools = nil;
  CkAi_StreamingJsToolCall: TCkAi_StreamingJsToolCall = nil;
  CkAi_InputAddFileId: TCkAi_InputAddFileId = nil;
  CkAi_GetOutputBd: TCkAi_GetOutputBd = nil;
  CkAi_UploadFile: TCkAi_UploadFile = nil;
  CkAi_UploadFileBd: TCkAi_UploadFileBd = nil;
  CkAi_UploadFileSb: TCkAi_UploadFileSb = nil;
  CkAi_InputAddImageFileId: TCkAi_InputAddImageFileId = nil;

constructor TAi.Create;
begin
  inherited Create;
  FHandle := CkAi_Create();
end;

destructor TAi.Destroy;
begin
  if FHandle <> nil then
    CkAi_Dispose(FHandle);
  FHandle := nil;
  inherited;
end;

{ ---- Event callback thunks ---- }
{ Standalone cdecl functions registered with the C bridge.  The bridge
  passes back the userData pointer, which carries the Pascal object
  instance.  A non-zero return value aborts the running method. }

function TAi_AbortCheckThunk(userData: Pointer): Integer; cdecl;
var
  obj: TAi;
begin
  Result := 0;
  obj := TAi(userData);
  if Assigned(obj) and Assigned(obj.FOnAbortCheck) then
    if obj.FOnAbortCheck(obj) then Result := 1;
end;

function TAi_PercentDoneThunk(pctDone: Integer; userData: Pointer): Integer; cdecl;
var
  obj: TAi;
begin
  Result := 0;
  obj := TAi(userData);
  if Assigned(obj) and Assigned(obj.FOnPercentDone) then
    if obj.FOnPercentDone(obj, pctDone) then Result := 1;
end;

procedure TAi_ProgressInfoThunk(name: PAnsiChar; value: PAnsiChar; userData: Pointer); cdecl;
var
  obj: TAi;
begin
  obj := TAi(userData);
  if Assigned(obj) and Assigned(obj.FOnProgressInfo) then
    obj.FOnProgressInfo(obj, CkToStr(name), CkToStr(value));
end;

procedure TAi.SetOnAbortCheck(AValue: TChilkatAbortCheckEvent);
begin
  FOnAbortCheck := AValue;
  if Assigned(AValue) then
    CkAi_SetAbortCheckCallback(FHandle, @TAi_AbortCheckThunk, Self)
  else
    CkAi_SetAbortCheckCallback(FHandle, nil, nil);
end;

procedure TAi.SetOnPercentDone(AValue: TChilkatPercentDoneEvent);
begin
  FOnPercentDone := AValue;
  if Assigned(AValue) then
    CkAi_SetPercentDoneCallback(FHandle, @TAi_PercentDoneThunk, Self)
  else
    CkAi_SetPercentDoneCallback(FHandle, nil, nil);
end;

procedure TAi.SetOnProgressInfo(AValue: TChilkatProgressInfoEvent);
begin
  FOnProgressInfo := AValue;
  if Assigned(AValue) then
    CkAi_SetProgressInfoCallback(FHandle, @TAi_ProgressInfoThunk, Self)
  else
    CkAi_SetProgressInfoCallback(FHandle, nil, nil);
end;

function TAi.GetLastErrorHtml: string;
begin
  Result := CkToStr(CkAi_get_LastErrorHtml(FHandle));
end;

function TAi.GetLastErrorText: string;
begin
  Result := CkToStr(CkAi_get_LastErrorText(FHandle));
end;

function TAi.GetLastErrorXml: string;
begin
  Result := CkToStr(CkAi_get_LastErrorXml(FHandle));
end;

function TAi.GetVersion: string;
begin
  Result := CkToStr(CkAi_get_Version(FHandle));
end;

function TAi.GetDebugLogFilePath: string;
begin
  Result := CkToStr(CkAi_get_DebugLogFilePath(FHandle));
end;

procedure TAi.SetDebugLogFilePath(AValue: string);
begin
  CkAi_put_DebugLogFilePath(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TAi.GetVerboseLogging: Boolean;
begin
  Result := Boolean(CkAi_get_VerboseLogging(FHandle));
end;

procedure TAi.SetVerboseLogging(AValue: Boolean);
begin
  CkAi_put_VerboseLogging(FHandle, LongBool(AValue));
end;

function TAi.GetLastMethodSuccess: Boolean;
begin
  Result := Boolean(CkAi_get_LastMethodSuccess(FHandle));
end;

procedure TAi.SetLastMethodSuccess(AValue: Boolean);
begin
  CkAi_put_LastMethodSuccess(FHandle, LongBool(AValue));
end;

function TAi.GetProvider: string;
begin
  Result := CkToStr(CkAi_get_Provider(FHandle));
end;

procedure TAi.SetProvider(AValue: string);
begin
  CkAi_put_Provider(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TAi.GetSelectedConvo: string;
begin
  Result := CkToStr(CkAi_get_SelectedConvo(FHandle));
end;

procedure TAi.SetSelectedConvo(AValue: string);
begin
  CkAi_put_SelectedConvo(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TAi.GetApiKey: string;
begin
  Result := CkToStr(CkAi_get_ApiKey(FHandle));
end;

procedure TAi.SetApiKey(AValue: string);
begin
  CkAi_put_ApiKey(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TAi.GetModel: string;
begin
  Result := CkToStr(CkAi_get_Model(FHandle));
end;

procedure TAi.SetModel(AValue: string);
begin
  CkAi_put_Model(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TAi.GetFullTranscript: Boolean;
begin
  Result := Boolean(CkAi_get_FullTranscript(FHandle));
end;

procedure TAi.SetFullTranscript(AValue: Boolean);
begin
  CkAi_put_FullTranscript(FHandle, LongBool(AValue));
end;

function TAi.GetStreaming: Boolean;
begin
  Result := Boolean(CkAi_get_Streaming(FHandle));
end;

procedure TAi.SetStreaming(AValue: Boolean);
begin
  CkAi_put_Streaming(FHandle, LongBool(AValue));
end;

function TAi.GetHeartbeatMs: Integer;
begin
  Result := CkAi_get_HeartbeatMs(FHandle);
end;

procedure TAi.SetHeartbeatMs(AValue: Integer);
begin
  CkAi_put_HeartbeatMs(FHandle, AValue);
end;

function TAi.GetHostedConvo: Boolean;
begin
  Result := Boolean(CkAi_get_HostedConvo(FHandle));
end;

procedure TAi.SetHostedConvo(AValue: Boolean);
begin
  CkAi_put_HostedConvo(FHandle, LongBool(AValue));
end;

function TAi.GetUncommonOptions: string;
begin
  Result := CkToStr(CkAi_get_UncommonOptions(FHandle));
end;

procedure TAi.SetUncommonOptions(AValue: string);
begin
  CkAi_put_UncommonOptions(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TAi.GetIdleTimeoutMs: Integer;
begin
  Result := CkAi_get_IdleTimeoutMs(FHandle);
end;

procedure TAi.SetIdleTimeoutMs(AValue: Integer);
begin
  CkAi_put_IdleTimeoutMs(FHandle, AValue);
end;

function TAi.GetResponseStatusCode: Integer;
begin
  Result := CkAi_get_ResponseStatusCode(FHandle);
end;

function TAi.GetApiSpec: string;
begin
  Result := CkToStr(CkAi_get_ApiSpec(FHandle));
end;

procedure TAi.SetApiSpec(AValue: string);
begin
  CkAi_put_ApiSpec(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TAi.GetBaseUrl: string;
begin
  Result := CkToStr(CkAi_get_BaseUrl(FHandle));
end;

procedure TAi.SetBaseUrl(AValue: string);
begin
  CkAi_put_BaseUrl(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TAi.GetApiKeyHeader: string;
begin
  Result := CkToStr(CkAi_get_ApiKeyHeader(FHandle));
end;

procedure TAi.SetApiKeyHeader(AValue: string);
begin
  CkAi_put_ApiKeyHeader(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TAi.GetHasFunctionCalls: Boolean;
begin
  Result := Boolean(CkAi_get_HasFunctionCalls(FHandle));
end;

function TAi.GetJsToolTimeout: Integer;
begin
  Result := CkAi_get_JsToolTimeout(FHandle);
end;

procedure TAi.SetJsToolTimeout(AValue: Integer);
begin
  CkAi_put_JsToolTimeout(FHandle, AValue);
end;

function TAi.GetEnableSecrets: Boolean;
begin
  Result := Boolean(CkAi_get_EnableSecrets(FHandle));
end;

procedure TAi.SetEnableSecrets(AValue: Boolean);
begin
  CkAi_put_EnableSecrets(FHandle, LongBool(AValue));
end;

function TAi.GetLastResponseRefused: Boolean;
begin
  Result := Boolean(CkAi_get_LastResponseRefused(FHandle));
end;

function TAi.GetRefusalText: string;
begin
  Result := CkToStr(CkAi_get_RefusalText(FHandle));
end;

function TAi.NewConvo(const name: string; const sysMsg: string; const devMsg: string): Boolean;
begin
  Result := Boolean(CkAi_NewConvo(FHandle, PAnsiChar(StrToCk(name)), PAnsiChar(StrToCk(sysMsg)), PAnsiChar(StrToCk(devMsg))));
end;

function TAi.ExportConvo(const name: string; json: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_ExportConvo(FHandle, PAnsiChar(StrToCk(name)), json.Handle));
end;

function TAi.ImportConvo(const name: string; json: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_ImportConvo(FHandle, PAnsiChar(StrToCk(name)), json.Handle));
end;

function TAi.ListConvos(st: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_ListConvos(FHandle, st.Handle));
end;

function TAi.DeleteConvo(const name: string): Boolean;
begin
  Result := Boolean(CkAi_DeleteConvo(FHandle, PAnsiChar(StrToCk(name))));
end;

function TAi.SetConnectionSettings(sock: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_SetConnectionSettings(FHandle, sock.Handle));
end;

function TAi.Ask(const outputType: string): Boolean;
begin
  Result := Boolean(CkAi_Ask(FHandle, PAnsiChar(StrToCk(outputType))));
end;

procedure TAi.GetLastJsonData(json: TChilkatBase);
begin
  CkAi_GetLastJsonData(FHandle, json.Handle);
end;

function TAi.GetModels(st: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_GetModels(FHandle, st.Handle));
end;

function TAi.InputAddText(const text: string): Boolean;
begin
  Result := Boolean(CkAi_InputAddText(FHandle, PAnsiChar(StrToCk(text))));
end;

function TAi.GetOutputText: string;
begin
  Result := CkToStr(CkAi_GetOutputText(FHandle));
end;

function TAi.GetOutputTextSb(sb: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_GetOutputTextSb(FHandle, sb.Handle));
end;

procedure TAi.InputClear;
begin
  CkAi_InputClear(FHandle);
end;

function TAi.InputAddTextSb(sb: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_InputAddTextSb(FHandle, sb.Handle));
end;

function TAi.InputAddImageData(bd: TChilkatBase; const summary: string): Boolean;
begin
  Result := Boolean(CkAi_InputAddImageData(FHandle, bd.Handle, PAnsiChar(StrToCk(summary))));
end;

function TAi.InputAddImageUrl(const url: string; const summary: string): Boolean;
begin
  Result := Boolean(CkAi_InputAddImageUrl(FHandle, PAnsiChar(StrToCk(url)), PAnsiChar(StrToCk(summary))));
end;

function TAi.InputAddFileData(const filename: string; bd: TChilkatBase; const summary: string): Boolean;
begin
  Result := Boolean(CkAi_InputAddFileData(FHandle, PAnsiChar(StrToCk(filename)), bd.Handle, PAnsiChar(StrToCk(summary))));
end;

function TAi.InputAddFileUrl(const url: string; const summary: string): Boolean;
begin
  Result := Boolean(CkAi_InputAddFileUrl(FHandle, PAnsiChar(StrToCk(url)), PAnsiChar(StrToCk(summary))));
end;

function TAi.PollAi(abort: Boolean): Integer;
begin
  Result := CkAi_PollAi(FHandle, LongBool(abort));
end;

function TAi.NextAiEvent(maxWaitMs: Integer; sbName: TChilkatBase; sbDelta: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_NextAiEvent(FHandle, maxWaitMs, sbName.Handle, sbDelta.Handle));
end;

procedure TAi.SleepMs(millisec: Integer);
begin
  CkAi_SleepMs(FHandle, millisec);
end;

function TAi.SetProviderParams(json: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_SetProviderParams(FHandle, json.Handle));
end;

function TAi.SetAskParams(json: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_SetAskParams(FHandle, json.Handle));
end;

function TAi.RegisterManualTools(json: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_RegisterManualTools(FHandle, json.Handle));
end;

function TAi.GetFunctionCalls(json: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_GetFunctionCalls(FHandle, json.Handle));
end;

function TAi.GetSearchResults(json: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_GetSearchResults(FHandle, json.Handle));
end;

function TAi.UseMcp(cMcp: TChilkatBase; const namePrefix: string): Boolean;
begin
  Result := Boolean(CkAi_UseMcp(FHandle, cMcp.Handle, PAnsiChar(StrToCk(namePrefix))));
end;

function TAi.SetOutputSchema(const name: string; schema: TChilkatBase; strict: Boolean): Boolean;
begin
  Result := Boolean(CkAi_SetOutputSchema(FHandle, PAnsiChar(StrToCk(name)), schema.Handle, LongBool(strict)));
end;

function TAi.GetOutputJson(json: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_GetOutputJson(FHandle, json.Handle));
end;

function TAi.InputAddFnResult(const call_id: string; const fnResult: string): Boolean;
begin
  Result := Boolean(CkAi_InputAddFnResult(FHandle, PAnsiChar(StrToCk(call_id)), PAnsiChar(StrToCk(fnResult))));
end;

function TAi.RegisterJsTools(sb: TChilkatBase; evalOnly: Boolean; allowAllKeyword: Boolean): Boolean;
begin
  Result := Boolean(CkAi_RegisterJsTools(FHandle, sb.Handle, LongBool(evalOnly), LongBool(allowAllKeyword)));
end;

function TAi.StreamingJsToolCall(sb: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_StreamingJsToolCall(FHandle, sb.Handle));
end;

function TAi.InputAddFileId(const file_id: string; const mime_type: string): Boolean;
begin
  Result := Boolean(CkAi_InputAddFileId(FHandle, PAnsiChar(StrToCk(file_id)), PAnsiChar(StrToCk(mime_type))));
end;

function TAi.GetOutputBd(bd: TChilkatBase): Boolean;
begin
  Result := Boolean(CkAi_GetOutputBd(FHandle, bd.Handle));
end;

function TAi.UploadFile(const path: string; const mimeType: string): string;
begin
  Result := CkToStr(CkAi_UploadFile(FHandle, PAnsiChar(StrToCk(path)), PAnsiChar(StrToCk(mimeType))));
end;

function TAi.UploadFileBd(bd: TChilkatBase; const filename: string; const mimeType: string): string;
begin
  Result := CkToStr(CkAi_UploadFileBd(FHandle, bd.Handle, PAnsiChar(StrToCk(filename)), PAnsiChar(StrToCk(mimeType))));
end;

function TAi.UploadFileSb(sb: TChilkatBase; const filename: string; const mimeType: string): string;
begin
  Result := CkToStr(CkAi_UploadFileSb(FHandle, sb.Handle, PAnsiChar(StrToCk(filename)), PAnsiChar(StrToCk(mimeType))));
end;

function TAi.InputAddImageFileId(const file_id: string; const mime_type: string): Boolean;
begin
  Result := Boolean(CkAi_InputAddImageFileId(FHandle, PAnsiChar(StrToCk(file_id)), PAnsiChar(StrToCk(mime_type))));
end;

initialization
  Chilkat_GetProcedureAddress(CkAi_Create,  'CkAi_Create');
  Chilkat_GetProcedureAddress(CkAi_Dispose, 'CkAi_Dispose');
  Chilkat_GetProcedureAddress(CkAi_SetAbortCheckCallback, 'CkAi_SetAbortCheckCallback');
  Chilkat_GetProcedureAddress(CkAi_SetPercentDoneCallback, 'CkAi_SetPercentDoneCallback');
  Chilkat_GetProcedureAddress(CkAi_SetProgressInfoCallback, 'CkAi_SetProgressInfoCallback');
  Chilkat_GetProcedureAddress(CkAi_get_LastErrorHtml, 'CkAi_get_LastErrorHtml');
  Chilkat_GetProcedureAddress(CkAi_get_LastErrorText, 'CkAi_get_LastErrorText');
  Chilkat_GetProcedureAddress(CkAi_get_LastErrorXml, 'CkAi_get_LastErrorXml');
  Chilkat_GetProcedureAddress(CkAi_get_Version, 'CkAi_get_Version');
  Chilkat_GetProcedureAddress(CkAi_get_DebugLogFilePath, 'CkAi_get_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkAi_put_DebugLogFilePath, 'CkAi_put_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkAi_get_VerboseLogging, 'CkAi_get_VerboseLogging');
  Chilkat_GetProcedureAddress(CkAi_put_VerboseLogging, 'CkAi_put_VerboseLogging');
  Chilkat_GetProcedureAddress(CkAi_get_LastMethodSuccess, 'CkAi_get_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkAi_put_LastMethodSuccess, 'CkAi_put_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkAi_get_Provider, 'CkAi_get_Provider');
  Chilkat_GetProcedureAddress(CkAi_put_Provider, 'CkAi_put_Provider');
  Chilkat_GetProcedureAddress(CkAi_get_SelectedConvo, 'CkAi_get_SelectedConvo');
  Chilkat_GetProcedureAddress(CkAi_put_SelectedConvo, 'CkAi_put_SelectedConvo');
  Chilkat_GetProcedureAddress(CkAi_get_ApiKey, 'CkAi_get_ApiKey');
  Chilkat_GetProcedureAddress(CkAi_put_ApiKey, 'CkAi_put_ApiKey');
  Chilkat_GetProcedureAddress(CkAi_get_Model, 'CkAi_get_Model');
  Chilkat_GetProcedureAddress(CkAi_put_Model, 'CkAi_put_Model');
  Chilkat_GetProcedureAddress(CkAi_get_FullTranscript, 'CkAi_get_FullTranscript');
  Chilkat_GetProcedureAddress(CkAi_put_FullTranscript, 'CkAi_put_FullTranscript');
  Chilkat_GetProcedureAddress(CkAi_get_Streaming, 'CkAi_get_Streaming');
  Chilkat_GetProcedureAddress(CkAi_put_Streaming, 'CkAi_put_Streaming');
  Chilkat_GetProcedureAddress(CkAi_get_HeartbeatMs, 'CkAi_get_HeartbeatMs');
  Chilkat_GetProcedureAddress(CkAi_put_HeartbeatMs, 'CkAi_put_HeartbeatMs');
  Chilkat_GetProcedureAddress(CkAi_get_HostedConvo, 'CkAi_get_HostedConvo');
  Chilkat_GetProcedureAddress(CkAi_put_HostedConvo, 'CkAi_put_HostedConvo');
  Chilkat_GetProcedureAddress(CkAi_get_UncommonOptions, 'CkAi_get_UncommonOptions');
  Chilkat_GetProcedureAddress(CkAi_put_UncommonOptions, 'CkAi_put_UncommonOptions');
  Chilkat_GetProcedureAddress(CkAi_get_IdleTimeoutMs, 'CkAi_get_IdleTimeoutMs');
  Chilkat_GetProcedureAddress(CkAi_put_IdleTimeoutMs, 'CkAi_put_IdleTimeoutMs');
  Chilkat_GetProcedureAddress(CkAi_get_ResponseStatusCode, 'CkAi_get_ResponseStatusCode');
  Chilkat_GetProcedureAddress(CkAi_get_ApiSpec, 'CkAi_get_ApiSpec');
  Chilkat_GetProcedureAddress(CkAi_put_ApiSpec, 'CkAi_put_ApiSpec');
  Chilkat_GetProcedureAddress(CkAi_get_BaseUrl, 'CkAi_get_BaseUrl');
  Chilkat_GetProcedureAddress(CkAi_put_BaseUrl, 'CkAi_put_BaseUrl');
  Chilkat_GetProcedureAddress(CkAi_get_ApiKeyHeader, 'CkAi_get_ApiKeyHeader');
  Chilkat_GetProcedureAddress(CkAi_put_ApiKeyHeader, 'CkAi_put_ApiKeyHeader');
  Chilkat_GetProcedureAddress(CkAi_get_HasFunctionCalls, 'CkAi_get_HasFunctionCalls');
  Chilkat_GetProcedureAddress(CkAi_get_JsToolTimeout, 'CkAi_get_JsToolTimeout');
  Chilkat_GetProcedureAddress(CkAi_put_JsToolTimeout, 'CkAi_put_JsToolTimeout');
  Chilkat_GetProcedureAddress(CkAi_get_EnableSecrets, 'CkAi_get_EnableSecrets');
  Chilkat_GetProcedureAddress(CkAi_put_EnableSecrets, 'CkAi_put_EnableSecrets');
  Chilkat_GetProcedureAddress(CkAi_get_LastResponseRefused, 'CkAi_get_LastResponseRefused');
  Chilkat_GetProcedureAddress(CkAi_get_RefusalText, 'CkAi_get_RefusalText');
  Chilkat_GetProcedureAddress(CkAi_NewConvo, 'CkAi_NewConvo');
  Chilkat_GetProcedureAddress(CkAi_ExportConvo, 'CkAi_ExportConvo');
  Chilkat_GetProcedureAddress(CkAi_ImportConvo, 'CkAi_ImportConvo');
  Chilkat_GetProcedureAddress(CkAi_ListConvos, 'CkAi_ListConvos');
  Chilkat_GetProcedureAddress(CkAi_DeleteConvo, 'CkAi_DeleteConvo');
  Chilkat_GetProcedureAddress(CkAi_SetConnectionSettings, 'CkAi_SetConnectionSettings');
  Chilkat_GetProcedureAddress(CkAi_Ask, 'CkAi_Ask');
  Chilkat_GetProcedureAddress(CkAi_GetLastJsonData, 'CkAi_GetLastJsonData');
  Chilkat_GetProcedureAddress(CkAi_GetModels, 'CkAi_GetModels');
  Chilkat_GetProcedureAddress(CkAi_InputAddText, 'CkAi_InputAddText');
  Chilkat_GetProcedureAddress(CkAi_GetOutputText, 'CkAi_GetOutputText');
  Chilkat_GetProcedureAddress(CkAi_GetOutputTextSb, 'CkAi_GetOutputTextSb');
  Chilkat_GetProcedureAddress(CkAi_InputClear, 'CkAi_InputClear');
  Chilkat_GetProcedureAddress(CkAi_InputAddTextSb, 'CkAi_InputAddTextSb');
  Chilkat_GetProcedureAddress(CkAi_InputAddImageData, 'CkAi_InputAddImageData');
  Chilkat_GetProcedureAddress(CkAi_InputAddImageUrl, 'CkAi_InputAddImageUrl');
  Chilkat_GetProcedureAddress(CkAi_InputAddFileData, 'CkAi_InputAddFileData');
  Chilkat_GetProcedureAddress(CkAi_InputAddFileUrl, 'CkAi_InputAddFileUrl');
  Chilkat_GetProcedureAddress(CkAi_PollAi, 'CkAi_PollAi');
  Chilkat_GetProcedureAddress(CkAi_NextAiEvent, 'CkAi_NextAiEvent');
  Chilkat_GetProcedureAddress(CkAi_SleepMs, 'CkAi_SleepMs');
  Chilkat_GetProcedureAddress(CkAi_SetProviderParams, 'CkAi_SetProviderParams');
  Chilkat_GetProcedureAddress(CkAi_SetAskParams, 'CkAi_SetAskParams');
  Chilkat_GetProcedureAddress(CkAi_RegisterManualTools, 'CkAi_RegisterManualTools');
  Chilkat_GetProcedureAddress(CkAi_GetFunctionCalls, 'CkAi_GetFunctionCalls');
  Chilkat_GetProcedureAddress(CkAi_GetSearchResults, 'CkAi_GetSearchResults');
  Chilkat_GetProcedureAddress(CkAi_UseMcp, 'CkAi_UseMcp');
  Chilkat_GetProcedureAddress(CkAi_SetOutputSchema, 'CkAi_SetOutputSchema');
  Chilkat_GetProcedureAddress(CkAi_GetOutputJson, 'CkAi_GetOutputJson');
  Chilkat_GetProcedureAddress(CkAi_InputAddFnResult, 'CkAi_InputAddFnResult');
  Chilkat_GetProcedureAddress(CkAi_RegisterJsTools, 'CkAi_RegisterJsTools');
  Chilkat_GetProcedureAddress(CkAi_StreamingJsToolCall, 'CkAi_StreamingJsToolCall');
  Chilkat_GetProcedureAddress(CkAi_InputAddFileId, 'CkAi_InputAddFileId');
  Chilkat_GetProcedureAddress(CkAi_GetOutputBd, 'CkAi_GetOutputBd');
  Chilkat_GetProcedureAddress(CkAi_UploadFile, 'CkAi_UploadFile');
  Chilkat_GetProcedureAddress(CkAi_UploadFileBd, 'CkAi_UploadFileBd');
  Chilkat_GetProcedureAddress(CkAi_UploadFileSb, 'CkAi_UploadFileSb');
  Chilkat_GetProcedureAddress(CkAi_InputAddImageFileId, 'CkAi_InputAddImageFileId');

end.
