SimpleChat: Update notes a bit. Try keep browser happy
Avoid browser quirk mode with DOCTYPE. Help with accessibility a bit by specifying the language explicitly. Specify the char encoding explicitly, inturn utf-8 is a safe bet, even with intermixing of languages if reqd in future. Add a cache-control http-equiv meta tag, which in all probability will be ignored. Defer js loading and execution, just for fun and future, not that critical here as it stands now.
This commit is contained in:
parent
6eb1e0fbde
commit
5a5f6ab848
2 changed files with 18 additions and 3 deletions
|
@ -9,8 +9,11 @@ This simple web frontend, allows triggering/testing the server's /completions or
|
||||||
in a simple way with minimal code from a common code base. And also allows trying to maintain a basic back
|
in a simple way with minimal code from a common code base. And also allows trying to maintain a basic back
|
||||||
and forth chatting to an extent.
|
and forth chatting to an extent.
|
||||||
|
|
||||||
|
User can set a system prompt, as well as try and chat with the model over a series of back and forth chat
|
||||||
|
messages.
|
||||||
|
|
||||||
NOTE: Given that the idea is for basic minimal testing, it doesnt bother with any model context length and
|
NOTE: Given that the idea is for basic minimal testing, it doesnt bother with any model context length and
|
||||||
culling of old messages from the chat. Also currently I havent added input for a system prompt, but may add it.
|
culling of old messages from the chat.
|
||||||
|
|
||||||
NOTE: It doesnt set any parameters other than temperature for now. However if someone wants they can update
|
NOTE: It doesnt set any parameters other than temperature for now. However if someone wants they can update
|
||||||
the js file as needed.
|
the js file as needed.
|
||||||
|
@ -38,3 +41,11 @@ Once inside
|
||||||
* the user input box will be disabled and a working message will be shown in it.
|
* the user input box will be disabled and a working message will be shown in it.
|
||||||
* just refresh the page, to reset wrt the chat history and or system prompt and start afresh.
|
* just refresh the page, to reset wrt the chat history and or system prompt and start afresh.
|
||||||
|
|
||||||
|
|
||||||
|
## Devel note
|
||||||
|
|
||||||
|
Sometimes the browser may be stuborn with caching of the file, so your updates to html/css/js
|
||||||
|
may not be visible. Also remember that just refreshing/reloading page in browser or for that
|
||||||
|
matter clearing site data, dont directly override site caching in all cases. Worst case you may
|
||||||
|
have to change port.
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
<html>
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Simple LlamaCPP Chat</title>
|
<title>Simple LlamaCPP Chat</title>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
<meta name="message" content="Save Nature Save Earth" />
|
<meta name="message" content="Save Nature Save Earth" />
|
||||||
<meta name="description" content="SimpleChat: trigger LLM web service endpoints /chat/completions and /completions, also try chat" />
|
<meta name="description" content="SimpleChat: trigger LLM web service endpoints /chat/completions and /completions, also try chat" />
|
||||||
<meta name="author" content="by Humans for All" />
|
<meta name="author" content="by Humans for All" />
|
||||||
<script src="simplechat.js"></script>
|
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||||
|
<script src="simplechat.js" defer></script>
|
||||||
<link rel="stylesheet" href="simplechat.css" />
|
<link rel="stylesheet" href="simplechat.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -26,6 +29,7 @@
|
||||||
<div id="chat">
|
<div id="chat">
|
||||||
<p> Enter the system prompt above, before entering/submitting any user query</p>
|
<p> Enter the system prompt above, before entering/submitting any user query</p>
|
||||||
<p> Enter your text to the ai assistant below</p>
|
<p> Enter your text to the ai assistant below</p>
|
||||||
|
<p> Refresh the page to start over fresh</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue