llama.cpp/tools/server/public_simplechat/index.html

79 lines
3.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>SimpleChat LlamaCppEtal </title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="message" content="Save Nature Save Earth" />
<meta name="description" content="SimpleChat: trigger LLM web service endpoints /chat/completions and /completions, single/multi chat sessions" />
<meta name="author" content="by Humans for All" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<script type="importmap">
{
"imports": {
"simplechat": "./simplechat.js",
"datautils": "./datautils.mjs",
"ui": "./ui.mjs"
}
}
</script>
<script src="main.js" type="module" defer></script>
<link rel="stylesheet" href="simplechat.css" />
</head>
<body>
<div class="samecolumn" id="fullbody">
<div class="sameline" id="heading">
<div id="sessions-div" class="flex-grow"></div>
<div id="icons-div" class="flex-nogrow">
<button id="sessionsprompts" title="system prompts">&#x1F916;prompt</button>
<button id="clearchat" title="clear current chat">&#x1F300;clear</button>
<button id="settings" title="change settings">&#x2699;</button>
</div>
</div>
<div id="sessionsprompts-div" class="visibility-visible">
<hr>
<div class="sameline role-system">
<label for="system-in">System</label>
<textarea name="system" id="system-in" rows="2" placeholder="e.g. you are a helpful ai assistant, who provides concise answers" class="flex-grow"></textarea>
</div>
</div>
<hr>
<div id="chat-div">
<p> You need to have javascript enabled.</p>
</div>
<div id="popover-chatmsg" popover="auto">
<button id="popover-chatmsg-del" title="delete message"> &#x274C; </button>
<button id="popover-chatmsg-copy" title="copy message text"> &#x1F4CB; </button>
</div>
<div id="tool-div">
<div class="sameline">
<textarea id="toolname-in" class="flex-grow" rows="1" placeholder="name of tool to run"></textarea>
<button id="tool-btn">run tool</button>
</div>
<div class="sameline">
<textarea id="toolargs-in" class="flex-grow" rows="2" placeholder="arguments to pass to the specified tool"></textarea>
</div>
</div>
<hr>
<div id="popover-image" popover="auto">
<img id="poimage-img"></img>
<button id="poimage-del" title="delete"> &#x274C; </button>
</div>
<div id="user-in-div" class="role-user">
<div id="user-in-imgs"></div>
<div class="sameline">
<textarea id="user-in" class="flex-grow" rows="2" placeholder="enter your query to the ai model here" ></textarea>
<button id="user-btn" title="submit">&#x1F4AC;</button>
</div>
</div>
</div>
</body>
</html>