First pass UI for extending webui

This commit is contained in:
50h100a 2023-08-02 03:30:57 -04:00
parent 88f3e01f72
commit 42cc66f06e
1 changed files with 47 additions and 22 deletions

View File

@ -1501,30 +1501,55 @@
</div> </div>
</div> </div>
<div id="textgenerationwebui_api" style="display: none;position: relative;"> <div id="textgenerationwebui_api" style="display: none;position: relative;">
<div class="flex-container"> <form action="javascript:void(null);" method="post" enctype="multipart/form-data">
<a href="https://github.com/oobabooga/text-generation-webui" target="_blank"> If you are using:
oobabooga/text-generation-webui <div class="flex-container" style="margin-left:20px;">
</a> <a href="https://github.com/oobabooga/text-generation-webui" target="_blank">
<span data-i18n="Make sure you run it with"> oobabooga/text-generation-webui
Make sure you run it with <tt>--api</tt> flag </a>,
</span> <span data-i18n="Make sure you run it with">
</div> Make sure you run it with <tt>--api</tt> flag
<div> </span>
<div class="flex-container flexFlowColumn"> </div>
<div class="flex1"> <div class="flex-container" style="margin-left:20px;">
<h4 data-i18n="Blocking API url">Blocking API url</h4> <a href="https://mancer.tech/" target="_blank">
<small>Example: http://127.0.0.1:5000/</small> Mancer AI
<input id="textgenerationwebui_api_url_text" name="textgenerationwebui_api_url" class="text_pole wide100p" maxlength="500" value="" autocomplete="off"> </a>,
</div> <label class="checkbox_label" for="use-mancer-api-checkbox">
<div class="flex1"> <span data-i18n="Use API key (Only required for Mancer)">
<h4 data-i18n="Streaming API url">Streaming API url</h4> Click this box (and add your API key!):
<small>Example: ws://127.0.0.1:5005/api/v1/stream</small> </span>
<input id="streaming_url_textgenerationwebui" type="text" class="text_pole wide100p" maxlength="500" value="" autocomplete="off"> <input id="use-mancer-api-checkbox" type="checkbox" />
</label>
</div>
<div id="mancer-api-ui" style="display:none;">
<h4 data-i18n="Mancer API key">Mancer API key</h4>
<div class="flex-container">
<input id="api_key_mancer" name="api_key_mancer" class="text_pole flex1 wide100p" maxlength="500" size="35" type="text" autocomplete="off">
<div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_mancer">
</div>
</div> </div>
</div> </div>
<input id="api_button_textgenerationwebui" class="menu_button" type="submit" value="Connect"> <div>
<div id="api_loading_textgenerationwebui" class="api-load-icon fa-solid fa-hourglass fa-spin"></div> <div class="flex-container flexFlowColumn">
</div> <div data-for="api_key_mancer" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
For privacy reasons, your API key will be hidden after you reload the page.
</div>
<div class="flex1">
<h4 data-i18n="Blocking API url">Blocking API url</h4>
<small>Example: http://127.0.0.1:5000/</small>
<input id="textgenerationwebui_api_url_text" name="textgenerationwebui_api_url" class="text_pole wide100p" maxlength="500" value="" autocomplete="off">
</div>
<div class="flex1">
<h4 data-i18n="Streaming API url">Streaming API url</h4>
<small>Example: ws://127.0.0.1:5005/api/v1/stream</small>
<input id="streaming_url_textgenerationwebui" type="text" class="text_pole wide100p" maxlength="500" value="" autocomplete="off">
</div>
</div>
<input id="api_button_textgenerationwebui" class="menu_button" type="submit" value="Connect">
<div id="api_loading_textgenerationwebui" class="api-load-icon fa-solid fa-hourglass fa-spin"></div>
</div>
</form>
<div class="online_status4"> <div class="online_status4">
<div class="online_status_indicator4"></div> <div class="online_status_indicator4"></div>
<div class="online_status_text4" data-i18n="Not connected">Not connected</div> <div class="online_status_text4" data-i18n="Not connected">Not connected</div>