object Form26: TForm26
  Left = 0
  Top = 0
  Caption = 'Demo 013 - Ollama ChatTools'
  ClientHeight = 728
  ClientWidth = 1222
  FormFactor.Width = 320
  FormFactor.Height = 480
  FormFactor.Devices = [Desktop]
  OnCreate = FormCreate
  OnDestroy = FormDestroy
  DesignerMasterStyle = 0
  object Layout1: TLayout
    Align = Client
    Size.Width = 1222.000000000000000000
    Size.Height = 728.000000000000000000
    Size.PlatformDefault = False
    TabOrder = 6
    object Layout2: TLayout
      Align = Top
      Size.Width = 1222.000000000000000000
      Size.Height = 50.000000000000000000
      Size.PlatformDefault = False
      TabOrder = 9
      object BtnEnviar: TButton
        Align = Right
        Margins.Left = 3.000000000000000000
        Margins.Top = 6.000000000000000000
        Margins.Right = 8.000000000000000000
        Margins.Bottom = 6.000000000000000000
        Position.X = 1120.000000000000000000
        Position.Y = 6.000000000000000000
        Size.Width = 94.000000000000000000
        Size.Height = 38.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 0
        Text = 'Enviar'
        TextSettings.Trimming = None
        OnClick = BtnEnviarClick
      end
      object BtnLimpiar: TButton
        Align = Right
        Margins.Left = 3.000000000000000000
        Margins.Top = 6.000000000000000000
        Margins.Right = 3.000000000000000000
        Margins.Bottom = 6.000000000000000000
        Position.X = 1032.000000000000000000
        Position.Y = 6.000000000000000000
        Size.Width = 82.000000000000000000
        Size.Height = 38.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 1
        Text = 'Limpiar'
        TextSettings.Trimming = None
        OnClick = BtnLimpiarClick
      end
      object BtnAdjuntar: TButton
        Align = Right
        Margins.Left = 3.000000000000000000
        Margins.Top = 6.000000000000000000
        Margins.Right = 3.000000000000000000
        Margins.Bottom = 6.000000000000000000
        Position.X = 921.000000000000000000
        Position.Y = 6.000000000000000000
        Size.Width = 105.000000000000000000
        Size.Height = 38.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 2
        Text = 'Adjuntar...'
        TextSettings.Trimming = None
        OnClick = BtnAdjuntarClick
      end
      object ComboModo: TComboBox
        Align = Right
        Items.Strings = (
          '0: Chat + Funciones'
          '1: Vision'
          '2: Web Search'
          '3: PDF'
          '4: Generar Imagen'
          '5: TTS (Texto a Voz)')
        Margins.Left = 3.000000000000000000
        Margins.Top = 8.000000000000000000
        Margins.Right = 3.000000000000000000
        Margins.Bottom = 8.000000000000000000
        Position.X = 688.000000000000000000
        Position.Y = 8.000000000000000000
        Size.Width = 227.000000000000000000
        Size.Height = 34.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 3
        OnChange = ComboModoChange
      end
      object LblEstado: TLabel
        Align = Client
        Margins.Left = 8.000000000000000000
        Margins.Right = 5.000000000000000000
        Size.Width = 672.000000000000000000
        Size.Height = 50.000000000000000000
        Size.PlatformDefault = False
        Text = 'Listo'
        TabOrder = 4
      end
    end
    object Layout3: TLayout
      Align = Client
      Size.Width = 1222.000000000000000000
      Size.Height = 437.000000000000000000
      Size.PlatformDefault = False
      TabOrder = 8
      object Layout5: TLayout
        Align = Client
        Size.Width = 641.000000000000000000
        Size.Height = 437.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 8
        object MemoChatList: TMemo
          Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]
          DataDetectorTypes = []
          ReadOnly = True
          TextSettings.WordWrap = True
          Align = Client
          Margins.Left = 3.000000000000000000
          Margins.Top = 3.000000000000000000
          Margins.Right = 3.000000000000000000
          Margins.Bottom = 3.000000000000000000
          Size.Width = 635.000000000000000000
          Size.Height = 408.000000000000000000
          Size.PlatformDefault = False
          TabOrder = 0
          Viewport.Width = 631.000000000000000000
          Viewport.Height = 404.000000000000000000
        end
        object Label1: TLabel
          Align = Top
          Margins.Left = 3.000000000000000000
          Margins.Top = 3.000000000000000000
          Margins.Right = 3.000000000000000000
          Margins.Bottom = 3.000000000000000000
          Position.X = 3.000000000000000000
          Position.Y = 3.000000000000000000
          Size.Width = 635.000000000000000000
          Size.Height = 17.000000000000000000
          Size.PlatformDefault = False
          Text = 'Historial de Chat'
          TabOrder = 1
        end
      end
      object Layout6: TLayout
        Align = Right
        Position.X = 648.000000000000000000
        Size.Width = 574.000000000000000000
        Size.Height = 437.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 7
        object TabControl1: TTabControl
          Align = Client
          Size.Width = 574.000000000000000000
          Size.Height = 437.000000000000000000
          Size.PlatformDefault = False
          TabIndex = 0
          TabOrder = 0
          TabPosition = PlatformDefault
          Sizes = (
            574s
            411s
            574s
            411s
            574s
            411s
            574s
            411s)
          object TabWebItem: TTabItem
            CustomIcon = <
              item
              end>
            TextSettings.Trimming = None
            IsSelected = True
            Size.Width = 45.000000000000000000
            Size.Height = 26.000000000000000000
            Size.PlatformDefault = False
            StyleLookup = ''
            TabOrder = 0
            Text = 'Web'
            ExplicitSize.cx = 87.000000000000000000
            ExplicitSize.cy = 26.000000000000000000
            object WebBrowser1: TWebBrowser
              Align = Client
              Size.Width = 574.000000000000000000
              Size.Height = 411.000000000000000000
              Size.PlatformDefault = False
              WindowsEngine = IEOnly
            end
          end
          object TImageItem: TTabItem
            CustomIcon = <
              item
              end>
            TextSettings.Trimming = None
            IsSelected = False
            Size.Width = 60.000000000000000000
            Size.Height = 26.000000000000000000
            Size.PlatformDefault = False
            StyleLookup = ''
            TabOrder = 0
            Text = 'Imagen'
            ExplicitSize.cx = 84.000000000000000000
            ExplicitSize.cy = 26.000000000000000000
            object Image1: TImage
              MultiResBitmap = <
                item
                end>
              Align = Client
              Size.Width = 574.000000000000000000
              Size.Height = 411.000000000000000000
              Size.PlatformDefault = False
            end
          end
          object TabTexto: TTabItem
            CustomIcon = <
              item
              end>
            TextSettings.Trimming = None
            IsSelected = False
            Size.Width = 74.000000000000000000
            Size.Height = 26.000000000000000000
            Size.PlatformDefault = False
            StyleLookup = ''
            TabOrder = 0
            Text = 'Respuesta'
            ExplicitSize.cx = 67.000000000000000000
            ExplicitSize.cy = 26.000000000000000000
            object MemoTexto: TMemo
              Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]
              DataDetectorTypes = []
              ReadOnly = True
              TextSettings.WordWrap = True
              Align = Client
              Size.Width = 574.000000000000000000
              Size.Height = 411.000000000000000000
              Size.PlatformDefault = False
              TabOrder = 0
              Viewport.Width = 570.000000000000000000
              Viewport.Height = 407.000000000000000000
            end
          end
          object TabThinking: TTabItem
            CustomIcon = <
              item
              end>
            TextSettings.Trimming = None
            IsSelected = False
            Size.Width = 66.000000000000000000
            Size.Height = 26.000000000000000000
            Size.PlatformDefault = False
            StyleLookup = ''
            TabOrder = 0
            Text = 'Thinking'
            ExplicitSize.cx = 70.000000000000000000
            ExplicitSize.cy = 26.000000000000000000
            object MemoThinking: TMemo
              Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]
              DataDetectorTypes = []
              ReadOnly = True
              TextSettings.FontColor = claGray
              TextSettings.WordWrap = True
              Align = Client
              Size.Width = 574.000000000000000000
              Size.Height = 411.000000000000000000
              Size.PlatformDefault = False
              TabOrder = 0
              Viewport.Width = 570.000000000000000000
              Viewport.Height = 407.000000000000000000
            end
          end
        end
      end
      object Splitter1: TSplitter
        Align = Right
        Cursor = crHSplit
        MinSize = 20.000000000000000000
        Position.X = 641.000000000000000000
        Size.Width = 7.000000000000000000
        Size.Height = 437.000000000000000000
        Size.PlatformDefault = False
      end
    end
    object Layout4: TLayout
      Align = Bottom
      Position.Y = 496.000000000000000000
      Size.Width = 1222.000000000000000000
      Size.Height = 232.000000000000000000
      Size.PlatformDefault = False
      TabOrder = 7
      object MemoPrompt: TMemo
        Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]
        DataDetectorTypes = []
        TextSettings.WordWrap = True
        Align = Client
        Margins.Left = 3.000000000000000000
        Margins.Top = 3.000000000000000000
        Margins.Right = 3.000000000000000000
        Margins.Bottom = 3.000000000000000000
        Size.Width = 1216.000000000000000000
        Size.Height = 203.000000000000000000
        Size.PlatformDefault = False
        TabOrder = 0
        Viewport.Width = 1212.000000000000000000
        Viewport.Height = 199.000000000000000000
      end
      object Label2: TLabel
        Align = Top
        Margins.Left = 3.000000000000000000
        Margins.Top = 3.000000000000000000
        Margins.Right = 3.000000000000000000
        Margins.Bottom = 3.000000000000000000
        Position.X = 3.000000000000000000
        Position.Y = 3.000000000000000000
        Size.Width = 1216.000000000000000000
        Size.Height = 17.000000000000000000
        Size.PlatformDefault = False
        Text = 'Prompt'
        TabOrder = 1
      end
    end
    object Splitter2: TSplitter
      Align = Bottom
      Cursor = crVSplit
      MinSize = 20.000000000000000000
      Position.Y = 487.000000000000000000
      Size.Width = 1222.000000000000000000
      Size.Height = 9.000000000000000000
      Size.PlatformDefault = False
    end
  end
  object OpenDialog1: TOpenDialog
    Left = 176
    Top = 440
  end
  object AiOllamaChat1: TAiOllamaChat
    ApiKey = '@OLLAMA_API_KEY'
    Model = 'gemma3:4b'
    Max_tokens = 4000
    Response_format = tiaChatRfText
    Asynchronous = True
    K = 0
    Tool_choice = 'auto'
    Tool_Active = False
    User = 'user'
    SystemPrompt.Strings = (
      
        'Eres un asistente util y servicial. Responde siempre en el mismo' +
        ' idioma que el usuario.')
    Completion_tokens = 0
    OnReceiveThinking = AiOllamaChat1ReceiveThinking
    OnReceiveData = AiOllamaChat1ReceiveData
    OnReceiveDataEnd = AiOllamaChat1ReceiveDataEnd
    OnCallToolFunction = AiOllamaChat1CallToolFunction
    Url = 'http://localhost:11434/'
    ResponseTimeOut = 120000
    ChatTools.SpeechTool = AiGeminiSpeechTool1
    ChatTools.ImageTool = AiDalleImageTool1
    ChatTools.VideoTool = AiSoraVideoTool1
    ChatTools.WebSearchTool = AiGeminiWebSearchTool1
    ChatTools.PdfTool = AiOllamaPdfTool1
    Stream_Usage = False
    OnError = AiOllamaChat1Error
    ThinkingLevel = tlDefault
    MediaResolution = mrDefault
    OnStateChange = AiOllamaChat1StateChange
    ModelCaps = []
    SessionCaps = []
    keep_alive = '5m'
    Left = 176
    Top = 360
  end
  object AiGeminiWebSearchTool1: TAiGeminiWebSearchTool
    ApiKey = '@GEMINI_API_KEY'
    Model = 'gemini-2.0-flash'
    Url = 'https://generativelanguage.googleapis.com/v1beta/'
    Left = 360
    Top = 264
  end
  object AiGeminiSpeechTool1: TAiGeminiSpeechTool
    ApiKey = '@GEMINI_API_KEY'
    Model = 'gemini-2.5-flash-preview-tts'
    Url = 'https://generativelanguage.googleapis.com/v1beta/'
    Voice = 'Puck'
    Completion_tokens = 0
    Left = 368
    Top = 336
  end
  object AiOllamaPdfTool1: TAiOllamaOcrTool
    Url = 'http://localhost:11434/'
    Model = 'deepseek-ocr'
    Prompt = 'extract all'
    GhostscriptPath = 'gswin64c.exe'
    TimeOut = 30000
    Left = 568
    Top = 400
  end
  object AiDalleImageTool1: TAiDalleImageTool
    Left = 568
    Top = 472
  end
  object AiSoraVideoTool1: TAiSoraVideoTool
    ApiKey = '@OPENAI_API_KEY'
    Left = 528
    Top = 320
  end
end
