The following code generates an OpenAI compatible endpoint URL <https://calling-granted-unity-alaska.trycloudflare.com>, but it is not clear to me why.

import os, shutil, torch
from IPython.display import clear_output, display, HTML
from IPython.utils import capture
from google.colab import files, drive
!wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4
%env LD_PRELOAD=/content/libtcmalloc_minimal.so.4

#PARAMS
#@markdown 👈 Configure the settings below, then press this button to start the installation process. The links will appear at the bottom of this page after a few minutes.

Model = "Utopia 13B" #@param ["(No Model)", "Airoboros M 7B 3.1.2", "Airoboros Mistral2.2 7B", "Amethyst 13B Mistral", "ANIMA Phi Neptune Mistral 7B", "Arithmo Mistral 7B", "Asclepius 13B", "AshhLimaRP Mistral 7B", "Athena v4 13B", "Augmental 13B", "Basilisk 7B v0.2", "BerrySauce L2 13B", "CodeLlama 13B", "CodeLlama 13B Instruct", "CodeLlama 13B Python", "CollectiveCognition v1.1 Mistral 7B", "Dans AdventurousWinds Mk2 7B", "Dolphin 2.2.1 Mistral 7B", "Emerhyst 13B", "Em German Mistral v01 7B", "Hermes Trismegistus Mistral 7B", "HornyEchidna 13B v0.1", "Huginn 13B v4.5", "Japanese StableLM Instruct Gamma 7B", "Kimiko Mistral 7B", "Leo Mistral Hessianai 7B Chat", "Llama 2 13B", "Llama 2 7B", "Llama 2 13B Chat", "Llama 2 7B Chat", "LLaMA2 13B Tiefighter", "Llava v1.5 13B", "Magpie 13B", "MegaMix T1 13B", "Mistral 7B Claude Chat", "Mistral 7B Dolphin2.1 Lima0.5", "Mistral 7B Instruct v0.1", "Mistral 7B OpenOrca", "Mistral 7B v0.1", "Mistral ClaudeLimaRP v3 7B", "Mistral Pygmalion 7B", "Mistral Trismegistus 7B", "Mistralic 7B-1", "MistralLite 7B", "MistRP Airoboros 7B", "Mythalion 13B", "MythoMax L2 Kimiko v2 13B", "MythoMax L2 13B", "Naberius 7B", "Nous Capybara 7B V1.9", "Nous Hermes Llama2 13B", "Nous Hermes Llama2 7B", "OpenBuddy Mistral 7B v13 Base", "OpenChat 3.5 7B", "OpenHermes 2.5 Mistral 7B", "PsyMedRP v1 13B", "Pygmalion 2 13B", "Pygmalion 2 13B SuperCOT", "Pygmalion 2 7B", "ReMM SLERP L2 13B", "Samantha 1.2 Mistral 7B", "Samantha Mistral Instruct 7B", "SauerkrautLM 7B v1 Mistral", "Sheep Duck Llama2 13B", "SlimOpenOrca Mistral 7B", "Speechless Code Mistral 7B v1.0", "Speechless Llama2 Hermes Orca Platypus WizardLM 13B", "Spicyboros 13B 2.2", "Spicyboros 7B 2.2", "Spring Dragon 13B", "Storytime 13B", "SynthIA 7B v2.0", "Thespis Mistral 7B v0.5", "UndiMix v4 13B", "Unholy v1 12L 13B", "Utopia 13B", "Vigostral 7B Chat", "WizardCoder Python 13B v1.0", "WizardLM 1.0 L2 13B", "WizardMath 13B v1.0", "Xwin LM 13B V0.2", "Xwin LM 7B V0.2", "Xwin MLewd 13B v0.2", "Yarn Mistral 7B 128K", "Yarn Mistral 7B 64K", "Zarablend L2 7B", "Zephyr 7B Beta"]
#@markdown > <font color="gray">Models from [Hugging Face](https://huggingface.co/models). <sup>(This list will be updated as newer models are released.)
Flags = "--share --extensions openai --public-api --chat-buttons" #@param [] {allow-input: true}
#@markdown > <font color="gray">You can enter any [command-line flags](https://github.com/oobabooga/text-generation-webui/blob/main/README.md#basic-settings) or [extensions](https://github.com/oobabooga/text-generation-webui/blob/main/docs/Extensions.md) here.
Google_Drive = False #@param {type:"boolean"}
#@markdown > <font color="gray">Remember that models are very large, and free Google Drive only provides 15GB. [Manage your Drive space here.](https://drive.google.com/drive/my-drive)
Debug = False #@param {type:"boolean"}
#@markdown > <font color="gray">Shows the installation console log if checked.
model_url = ""
branch = ""

# Model names
# Lord forgive me for what I have done
match Model:
    case "Airoboros M 7B 3.1.2": model_url = "TheBloke/Airoboros-M-7B-3.1.2-GPTQ"
    case "Airoboros Mistral2.2 7B": model_url = "TheBloke/airoboros-mistral2.2-7B-GPTQ"
    case "Amethyst 13B Mistral": model_url = "TheBloke/Amethyst-13B-Mistral-GPTQ"
    case "ANIMA Phi Neptune Mistral 7B": model_url = "TheBloke/ANIMA-Phi-Neptune-Mistral-7B-GPTQ"
    case "Arithmo Mistral 7B": model_url = "TheBloke/Arithmo-Mistral-7B-GPTQ"
    case "Asclepius 13B": model_url = "TheBloke/Asclepius-13B-GPTQ"
    case "AshhLimaRP Mistral 7B": model_url = "TheBloke/AshhLimaRP-Mistral-7B-GPTQ"
    case "Athena v4 13B": model_url = "TheBloke/Athena-v4-GPTQ"
    case "Augmental 13B": model_url = "TheBloke/Augmental-13B-GPTQ"
    case "Basilisk 7B v0.2": model_url = "TheBloke/basilisk-7B-v0.2-GPTQ"
    case "BerrySauce L2 13B": model_url = "TheBloke/BerrySauce-L2-13B-GPTQ"
    case "CodeLlama 13B": model_url = "TheBloke/CodeLlama-13B-GPTQ"
    case "CodeLlama 13B Instruct": model_url = "TheBloke/CodeLlama-13B-Instruct-GPTQ"
    case "CodeLlama 13B Python": model_url = "TheBloke/CodeLlama-13B-Python-GPTQ"
    case "CollectiveCognition v1.1 Mistral 7B": model_url = "TheBloke/CollectiveCognition-v1.1-Mistral-7B-GPTQ"
    case "Dans AdventurousWinds Mk2 7B": model_url = "TheBloke/Dans-AdventurousWinds-Mk2-7B-GPTQ"
    case "Dolphin 2.2.1 Mistral 7B": model_url = "TheBloke/dolphin-2.2.1-mistral-7B-GPTQ"
    case "Emerhyst 13B": model_url = "TheBloke/Emerhyst-13B-GPTQ"
    case "Em German Mistral v01 7B": model_url = "TheBloke/em_german_mistral_v01-GPTQ"
    case "Hermes Trismegistus Mistral 7B": model_url = "TheBloke/Hermes-Trismegistus-Mistral-7B-GPTQ"
    case "HornyEchidna 13B v0.1": model_url = "TheBloke/HornyEchidna-13B-v0.1-GPTQ"
    case "Huginn 13B v4.5": model_url = "TheBloke/Huginn-13B-v4.5-GPTQ"
    case "Japanese StableLM Instruct Gamma 7B": model_url = "TheBloke/japanese-stablelm-instruct-gamma-7B-GPTQ"
    case "Kimiko Mistral 7B": model_url = "TheBloke/Kimiko-Mistral-7B-GPTQ"
    case "Leo Mistral Hessianai 7B Chat": model_url = "TheBloke/Leo-Mistral-Hessianai-7B-Chat-GPTQ"
    case "Llama 2 13B": model_url = "TheBloke/Llama-2-13B-GPTQ"
    case "Llama 2 7B": model_url = "TheBloke/Llama-2-7B-GPTQ"
    case "Llama 2 13B Chat": model_url = "TheBloke/Llama-2-13B-chat-GPTQ"
    case "Llama 2 7B Chat": model_url = "TheBloke/Llama-2-7B-Chat-GPTQ"
    case "LLaMA2 13B Tiefighter": model_url = "TheBloke/LLaMA2-13B-Tiefighter-GPTQ"
    case "Llava v1.5 13B": model_url = "TheBloke/llava-v1.5-13B-GPTQ"
    case "Magpie 13B": model_url = "TheBloke/Magpie-13B-GPTQ"
    case "MegaMix T1 13B": model_url = "TheBloke/MegaMix-T1-13B-GPTQ"
    case "Mistral 7B Claude Chat": model_url = "TheBloke/Mistral-7B-Claude-Chat-GPTQ"
    case "Mistral 7B Dolphin2.1 Lima0.5": model_url = "TheBloke/Mistral_7B_Dolphin2.1_LIMA0.5-GPTQ"
    case "Mistral 7B Instruct v0.1": model_url = "TheBloke/Mistral-7B-Instruct-v0.1-GPTQ"
    case "Mistral 7B OpenOrca": model_url = "TheBloke/Mistral-7B-OpenOrca-GPTQ"
    case "Mistral 7B v0.1": model_url = "TheBloke/Mistral-7B-v0.1-GPTQ"
    case "Mistral ClaudeLimaRP v3 7B": model_url = "TheBloke/Mistral-ClaudeLimaRP-v3-7B-GPTQ"
    case "Mistral Pygmalion 7B": model_url = "TheBloke/Mistral-Pygmalion-7B-GPTQ"
    case "Mistral Trismegistus 7B": model_url = "TheBloke/Mistral-Trismegistus-7B-GPTQ"
    case "Mistralic 7B-1": model_url = "TheBloke/Mistralic-7B-1-GPTQ"
    case "MistralLite 7B": model_url = "TheBloke/MistralLite-7B-GPTQ"
    case "MistRP Airoboros 7B": model_url = "TheBloke/MistRP-Airoboros-7B-GPTQ"
    case "Mythalion 13B": model_url = "TheBloke/Mythalion-13B-GPTQ"
    case "MythoMax L2 Kimiko v2 13B": model_url = "TheBloke/MythoMax-L2-Kimiko-v2-13B-GPTQ"
    case "MythoMax L2 13B": model_url = "TheBloke/MythoMax-L2-13B-GPTQ"
    case "Naberius 7B": model_url = "TheBloke/Naberius-7B-GPTQ"
    case "Nous Capybara 7B V1.9": model_url = "TheBloke/Nous-Capybara-7B-v1.9-GPTQ"
    case "Nous Hermes Llama2 13B": model_url = "TheBloke/Nous-Hermes-Llama2-GPTQ"
    case "Nous Hermes Llama2 7B": model_url = "TheBloke/Nous-Hermes-Llama-2-7B-GPTQ"
    case "OpenBuddy Mistral 7B v13 Base": model_url = "TheBloke/openbuddy-mistral-7B-v13-base-GPTQ"
    case "OpenChat 3.5 7B": model_url = "TheBloke/openchat_3.5-GPTQ"
    case "OpenHermes 2.5 Mistral 7B": model_url = "TheBloke/openchat_3.5-GPTQ"
    case "PsyMedRP v1 13B": model_url = "TheBloke/PsyMedRP-v1-13B-GPTQ"
    case "Pygmalion 2 13B": model_url = "TheBloke/Pygmalion-2-13B-GPTQ"
    case "Pygmalion 2 13B SuperCOT": model_url = "TheBloke/Pygmalion-2-13B-SuperCOT-GPTQ"
    case "Pygmalion 2 7B": model_url = "TheBloke/Pygmalion-2-7B-GPTQ"
    case "ReMM SLERP L2 13B": model_url = "TheBloke/ReMM-SLERP-L2-13B-GPTQ"
    case "Samantha 1.2 Mistral 7B": model_url = "TheBloke/samantha-1.2-mistral-7B-GPTQ"
    case "Samantha Mistral Instruct 7B": model_url = "TheBloke/samantha-mistral-instruct-7B-GPTQ"
    case "SauerkrautLM 7B v1 Mistral": model_url = "TheBloke/SauerkrautLM-7B-v1-mistral-GPTQ"
    case "Sheep Duck Llama2 13B": model_url = "TheBloke/sheep-duck-llama-2-13B-GPTQ"
    case "SlimOpenOrca Mistral 7B": model_url = "TheBloke/SlimOpenOrca-Mistral-7B-GPTQ"
    case "Speechless Code Mistral 7B v1.0": model_url = "TheBloke/speechless-code-mistral-7B-v1.0-GPTQ"
    case "Speechless Llama2 Hermes Orca Platypus WizardLM 13B": model_url = "TheBloke/Speechless-Llama2-Hermes-Orca-Platypus-WizardLM-13B-GPTQ"
    case "Spicyboros 13B 2.2": model_url = "TheBloke/Spicyboros-13B-2.2-GPTQ"
    case "Spicyboros 7B 2.2": model_url = "TheBloke/Spicyboros-7B-2.2-GPTQ"
    case "Spring Dragon 13B": model_url = "TheBloke/Spring-Dragon-GPTQ"
    case "Storytime 13B": model_url = "TheBloke/storytime-13B-GPTQ"
    case "SynthIA 7B v2.0": model_url = "TheBloke/SynthIA-7B-v2.0-GPTQ"
    case "Thespis Mistral 7B v0.5": model_url = "TheBloke/Thespis-Mistral-7B-v0.5-GPTQ"
    case "UndiMix v4 13B": model_url = "TheBloke/UndiMix-v4-13B-GPTQ"
    case "Unholy v1 12L 13B": model_url = "TheBloke/Unholy-v1-12L-13B-GPTQ"
    case "Utopia 13B": model_url = "TheBloke/Utopia-13B-GPTQ"
    case "Vigostral 7B Chat": model_url = "TheBloke/Vigostral-7B-Chat-GPTQ"
    case "WizardCoder Python 13B v1.0": model_url = "TheBloke/WizardCoder-Python-13B-V1.0-GPTQ"
    case "WizardLM 1.0 L2 13B": model_url = "TheBloke/WizardLM-1.0-Uncensored-Llama2-13B-GPTQ"
    case "WizardMath 13B v1.0": model_url = "TheBloke/WizardMath-13B-V1.0-GPTQ"
    case "Xwin LM 13B V0.2": model_url = "TheBloke/Xwin-LM-13B-v0.2-GPTQ"
    case "Xwin LM 7B V0.2": model_url = "TheBloke/Xwin-LM-7B-V0.2-GPTQ"
    case "Xwin MLewd 13B v0.2": model_url = "TheBloke/Xwin-MLewd-13B-v0.2-GPTQ"
    case "Yarn Mistral 7B 128K": model_url = "TheBloke/Yarn-Mistral-7B-64k-GPTQ"
    case "Yarn Mistral 7B 64K": model_url = "TheBloke/Yarn-Mistral-7B-64k-GPTQ"
    case "Zarablend L2 7B": model_url = "TheBloke/Zarablend-L2-7B-GPTQ"
    case "Zephyr 7B Beta": model_url = "TheBloke/zephyr-7B-beta-GPTQ"

def message_a():
    clear_output(wait = True)
    print(f"\033[1;32;1m\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBeginning installation. This will take a few minutes.\n\nInstalling WebUI...\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\033[0;37;0m")
    display(HTML("<img src='https://i.redd.it/lk2e0cf88xvb1.gif' height='80'/>"))
def message_b():
    clear_output(wait = True)
    print(f"\033[1;32;1m\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBeginning installation. This will take a few minutes.\n\nWebUI installed. Downloading model...\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\033[0;37;0m")
    display(HTML("<img src='https://i.redd.it/lk2e0cf88xvb1.gif' height='80'/>"))
def message_c():
    clear_output(wait = True)
    print(f"\033[1;32;1m\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nInstallation complete. To enter the WebUI, click on the gradio link that will appear below.\n\nFor SillyTavern users, copy the Blocking API URL and paste into SillyTavern's API settings.\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\033[0;37;0m")

# Install WebUI
def install_webui():
    if os.path.exists(repo_dir):
        %cd {repo_dir}
        !git pull
    else:
        !git clone https://github.com/oobabooga/text-generation-webui.git
    %cd {repo_dir}

    # Install WebUI requirements
    torver = torch.__version__
    is_cuda118 = '+cu118' in torver  # 2.1.0+cu118
    is_cuda117 = '+cu117' in torver  # 2.0.1+cu117
    textgen_requirements = open('requirements.txt').read().splitlines()
    if is_cuda117:
        textgen_requirements = [req.replace('+cu121', '+cu117').replace('+cu122', '+cu117').replace('torch2.1', 'torch2.0') for req in textgen_requirements]
    elif is_cuda118:
        textgen_requirements = [req.replace('+cu121', '+cu118').replace('+cu122', '+cu118') for req in textgen_requirements]
    with open('temp_requirements.txt', 'w') as file:
        file.write('\n'.join(textgen_requirements))
    !pip install -r temp_requirements.txt --upgrade

    # Install extension requirements
    if 'deepspeed' in Flags:
        !pip install -U mpi4py
        !pip install -U deepspeed
    if 'xformers' in Flags:
        !pip install xformers
    if 'api' in Flags:
        !pip install -r extensions/api/requirements.txt
    if 'google_translate' in Flags:
        !pip install -r extensions/google_translate/requirements.txt
    if 'superbooga' in Flags:
        !pip install -r extensions/superbooga/requirements.txt
    if 'silero_tts' in Flags:
        !pip install -r extensions/silero_tts/requirements.txt
    if 'elevenlabs_tts' in Flags:
        !pip install -r extensions/elevenlabs_tts/requirements.txt
    if 'whisper_stt' in Flags:
        !pip install -r extensions/whisper_stt/requirements.txt
    if 'openai' in Flags:
        !pip install -r extensions/openai/requirements.txt
    if 'ngrok' in Flags:
        !pip install -r extensions/ngrok/requirements.txt

    try:
        import flash_attn
    except:
        !pip uninstall -y flash_attn

# Mount Google Drive if enabled
if Google_Drive:
    drive.mount('/content/drive')
    %cd /content/drive/MyDrive
    repo_dir = '/content/drive/MyDrive/text-generation-webui'
    model_dir = '/content/drive/MyDrive/text-generation-webui/models'
else:
    %cd /content
    repo_dir = '/content/text-generation-webui'
    model_dir = '/content/text-generation-webui/models'
if Debug is False:
    message_a()
    with capture.capture_output() as cap:
        install_webui()
else:
    install_webui()

# Download model
model_url = model_url.strip()
if model_url != "":
    if not model_url.startswith('http'):
        model_url = 'https://huggingface.co/' + model_url
    url_parts = model_url.strip('/').strip().split('/')
    output_folder = f"{url_parts[-2]}_{url_parts[-1]}"
    branch = branch.strip('"\' ')
    if branch.strip() != '':
        output_folder += f"_{branch}"
        if Debug is False:
            message_b()
            with capture.capture_output() as cap:
                !python download-model.py {model_url} --branch {branch}
        else:
            !python download-model.py {model_url} --branch {branch}
    else:
        if Debug is False:
            message_b()
            with capture.capture_output() as cap:
                !python download-model.py {model_url}
        else:
            !python download-model.py {model_url}
else:
    output_folder = ""

# Run WebUI
if Debug is False:
    message_c()
if 'deepspeed' in Flags:
    cmd = f"deepspeed --num_gpus=1 server.py"
else:
    cmd = f"python server.py"
if output_folder != "":
    cmd += f" --model {output_folder}"
cmd += f" {Flags}"
print(cmd)
!$cmd