Do not change any code. This is a new model.  https://darkness.ashlynn.workers.dev/chat/?prompt=hey&model=claude-3-haiku-20240307
{"Join":"https://t.me/Ashlynn_Repository","Successful":"success","status":200,"response":"My knowledge cutoff is December 2023.","model":"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo"}
                                                                                                 Models available const MODELS = ['gpt-4o-mini', 'claude-3-haiku-20240307', 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo', 'mistralai/Mixtral-8x7B-Instruct-v0.1']; Add the model to this code.  require "import"
import "android.widget.*"
import "com.androlua.*"
import "android.view.View"
import "org.json.JSONObject"

-- Function to generate AI response
function generateAIResponse(mode, question, callback)
  local apiUrl
  if mode == "AI Search" then
    apiUrl = "https://ai-search.ashlynn.workers.dev/?query=" .. question
  elseif mode == "Bing" or mode == "Blackbox" or mode == "Llama" or mode == "Qwen" or mode == "Gemini" then
    apiUrl = "https://lord-apis.ashlynn.workers.dev/?question=" .. question .. "&mode=" .. mode
  elseif mode == "ChatGPT API 1" then
    apiUrl = "https://ashlynn.serv00.net/ashlynngptapi.php/?question=" .. question
  elseif mode == "ChatGPT API 2" then
    apiUrl = "https://ashlynn.serv00.net/ashlynngptapi.php/?question=" .. question
  elseif mode == "AI Girlfriend" then
    apiUrl = "https://chatgpt.darkhacker7301.workers.dev/?question=" .. question .. "&state=girlfriend"
  elseif mode:find("Advanced ChatGPT") then
    local state = mode:match("Advanced ChatGPT %((.+)%)")
    apiUrl = "https://lord.ashlynn.workers.dev/?question=" .. question .. "&state=" .. state
  elseif mode == "Jarvis" then
    apiUrl = "https://jarvis.darkhacker7301.workers.dev/?question=" .. question .. "&state=jarvis"
  elseif mode == "Zenith AI" then
    apiUrl = "https://ashlynn.darkhacker7301.workers.dev/?question=" .. question .. "&state=Zenith"
  elseif mode == "Advanced Image Generator" then
    apiUrl = "https://image.darkhacker7301.workers.dev/?prompt=" .. question .. "&image=1"
  elseif mode == "Generate Images with Prompts" then
    apiUrl = "https://magicimage.darkhacker7301.workers.dev/?search=" .. question
  else
    apiUrl = "https://chatgpt.ashlynn.workers.dev/?question=" .. question .. "&model=" .. mode
  end

  Http.get(apiUrl, nil, function(code, content)
    if code == 200 then
      local json = JSONObject(content)
      local status, message, model

      if mode == "AI Search" then
        status = true
        message = json.optString("data", "")
        model = "AI Search"
      elseif mode == "Bing" or mode == "Blackbox" or mode == "Llama" or mode == "Qwen" or mode == "Gemini" then
        status = json.optBoolean("status", false)
        message = json.optString("message", "")
        model = json.optString("model", "")
      elseif mode == "ChatGPT API 1" or mode == "ChatGPT API 2" or mode == "AI Girlfriend" or mode:find("Advanced ChatGPT") or mode == "Jarvis" or mode == "Zenith AI" then
        status = true
        message = json.optString("answer", "")
        model = mode
      elseif mode == "Advanced Image Generator" then
        status = true
        local images = json.optJSONArray("images")
        message = images and images.getString(0) or ""
        model = "Advanced Image Generator"
      elseif mode == "Generate Images with Prompts" then
        status = true
        local images = json.optJSONArray("images")
        message = "Generated " .. images.length() .. " images:\n\n"
        for i = 0, images.length() - 1 do
          message = message .. (i + 1) .. ". " .. images.getString(i) .. "\n"
        end
        model = "Generate Images with Prompts"
      else
        status = json.optBoolean("status", false)
        message = json.optString("gpt", "")
        model = json.optString("model", "")
      end

      if status and message ~= "" then
        callback(message, model, nil)
      else
        callback(nil, nil, "Invalid API response")
      end
    else
      callback(nil, nil, "Error generating response. Status code: " .. code)
    end
  end)
end

-- Create main layout
layout = {
  LinearLayout,
  orientation = "vertical",
  layout_width = "fill",
  layout_height = "fill",
  padding = "16dp",
  {
    TextView,
    text = "multi AI",
    textSize = "18sp",
    layout_width = "fill",
    layout_height = "wrap_content",
    gravity = "center",
    layout_marginBottom = "16dp",
  },
  {
    Button,
    id = "exitButton",
    text = "Exit Application", 
    layout_width = "fill",
    layout_height = "wrap_content",
  },
  {
    Spinner,
    id = "modelSpinner",
    layout_width = "fill",
    layout_height = "wrap_content",
  },
  {
    EditText,
    id = "questionInput",
    hint = "Enter your question",
    layout_width = "fill",
    layout_height = "wrap_content",
    padding = "10dp",
    inputType = "textMultiLine",
    gravity = "top",
    lines = 5,
  },
  {
    Button,
    id = "generateResponseButton",
    text = "Generate AI Response",
    layout_width = "fill",
    layout_height = "wrap_content",
  },
  {
    ScrollView,
    layout_width = "fill",
    layout_height = "wrap_content",
    {
      TextView,
      id = "resultText",
      text = "",
      layout_width = "fill",
      layout_height = "wrap_content",
      padding = "10dp",
    },
  },
  {
    TextView,
    text = "Join our channel for more content.\nhttps://t.me/jcftbs",
    layout_width = "fill",
    layout_height = "wrap_content",
    padding = "10dp",
    gravity = "center",
  }
}

-- Create dialog
dlg = LuaDialog(this)
dlg.setTitle("multi AI")
dlg.setView(loadlayout(layout))

-- Populate model spinner
local models = {"Bing", "Blackbox", "Llama", "Qwen", "Gemini", "AI Search", "ChatGPT API 1", "ChatGPT API 2", "AI Girlfriend", 
                "Advanced ChatGPT (Stylist)", "Advanced ChatGPT (Chef)", "Advanced ChatGPT (Prompt)", 
                "Advanced ChatGPT (Mental)", "Advanced ChatGPT (Poet)", "Advanced ChatGPT (Doctor)", 
                "Advanced ChatGPT (Generator)", "Jarvis", "Zenith AI", "Advanced Image Generator",
                "Generate Images with Prompts",
                "gpt-4", "gpt-4-0613", "gpt-4-32k", "gpt-4-0314", "gpt-4-32k-0314", "gpt-3.5-turbo", 
                "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k-0613", "gpt-3.5-turbo-0301", 
                "text-davinci-003", "text-davinci-002", "code-davinci-002", "gpt-3", "text-curie-001", 
                "text-babbage-001", "text-ada-001", "davinci", "curie", "babbage", "ada", "babbage-002", "davinci-002",
                "chatgpt", "gpt-4o"}
modelSpinner.adapter = ArrayAdapter(this, android.R.layout.simple_spinner_item, models)
modelSpinner.setSelection(0)

-- Function to update result text
function updateResultText(result)
  resultText.text = result
end

-- Set up generate response button
generateResponseButton.onClick = function()
  local mode = modelSpinner.selectedItem
  local question = questionInput.text
  
  if question and #question > 0 then
    updateResultText("Generating AI response...")
    
    generateAIResponse(mode, question, function(response, model, error)
      if error then
        updateResultText("Error: " .. error)
      else
        updateResultText("AI Response (" .. model .. "):\n\n" .. response)
      end
    end)
    
    -- Clear the text field after sending
    questionInput.text = ""
  else
    updateResultText("Please enter a question for AI response generation")
  end
end

-- Set up exit button
exitButton.onClick = function()
  dlg.dismiss()
end

-- Show dialog
dlg.show()