mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-05 09:36:52 +00:00
improvements
This commit is contained in:
@@ -167,8 +167,8 @@ R"htmlraw(<html>
|
|||||||
<form onsubmit=${submit}>
|
<form onsubmit=${submit}>
|
||||||
<input type="text" value="${message}" oninput=${(e) => message.value = e.target.value} autofocus placeholder="Chat here..."/>
|
<input type="text" value="${message}" oninput=${(e) => message.value = e.target.value} autofocus placeholder="Chat here..."/>
|
||||||
<button type="submit" disabled=${!generating.value} >Send</button>
|
<button type="submit" disabled=${!generating.value} >Send</button>
|
||||||
<button onclick=${(e) => stop(e)} disabled=${generating.value}>Stop</button>
|
<button onclick=${stop} disabled=${generating}>Stop</button>
|
||||||
<button onclick=${(e) => reset(e)}>Reset</button>
|
<button onclick=${reset}>Reset</button>
|
||||||
</form>
|
</form>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
@@ -185,7 +185,7 @@ R"htmlraw(<html>
|
|||||||
}, [messages])
|
}, [messages])
|
||||||
|
|
||||||
const chatLine = ([user, msg]) => {
|
const chatLine = ([user, msg]) => {
|
||||||
return html`<p><strong>${template(user, {})}:</strong> ${template(msg, {})}</p>`
|
return html`<p key=${msg}><strong>${template(user)}:</strong> ${template(msg)}</p>`
|
||||||
};
|
};
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
@@ -251,15 +251,15 @@ R"htmlraw(<html>
|
|||||||
<section class="chat">
|
<section class="chat">
|
||||||
<${chatStarted.value ? ChatLog : ConfigForm
|
<${chatStarted.value ? ChatLog : ConfigForm
|
||||||
} />
|
} />
|
||||||
</section >
|
</section>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
<section class="chat">
|
<section class="chat">
|
||||||
<${MessageInput} />
|
<${MessageInput} />
|
||||||
</section>
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
</main >
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>Powered by <a href="https://github.com/ggerganov/llama.cpp">llama.cpp</a> and <a href="https://ggml.ai">ggml.ai</a></p>
|
<p>Powered by <a href="https://github.com/ggerganov/llama.cpp">llama.cpp</a> and <a href="https://ggml.ai">ggml.ai</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -166,8 +166,8 @@
|
|||||||
<form onsubmit=${submit}>
|
<form onsubmit=${submit}>
|
||||||
<input type="text" value="${message}" oninput=${(e) => message.value = e.target.value} autofocus placeholder="Chat here..."/>
|
<input type="text" value="${message}" oninput=${(e) => message.value = e.target.value} autofocus placeholder="Chat here..."/>
|
||||||
<button type="submit" disabled=${!generating.value} >Send</button>
|
<button type="submit" disabled=${!generating.value} >Send</button>
|
||||||
<button onclick=${(e) => stop(e)} disabled=${generating.value}>Stop</button>
|
<button onclick=${stop} disabled=${generating}>Stop</button>
|
||||||
<button onclick=${(e) => reset(e)}>Reset</button>
|
<button onclick=${reset}>Reset</button>
|
||||||
</form>
|
</form>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
}, [messages])
|
}, [messages])
|
||||||
|
|
||||||
const chatLine = ([user, msg]) => {
|
const chatLine = ([user, msg]) => {
|
||||||
return html`<p><strong>${template(user, {})}:</strong> ${template(msg, {})}</p>`
|
return html`<p key=${msg}><strong>${template(user)}:</strong> ${template(msg)}</p>`
|
||||||
};
|
};
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
@@ -250,15 +250,15 @@
|
|||||||
<section class="chat">
|
<section class="chat">
|
||||||
<${chatStarted.value ? ChatLog : ConfigForm
|
<${chatStarted.value ? ChatLog : ConfigForm
|
||||||
} />
|
} />
|
||||||
</section >
|
</section>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
<section class="chat">
|
<section class="chat">
|
||||||
<${MessageInput} />
|
<${MessageInput} />
|
||||||
</section>
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
</main >
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>Powered by <a href="https://github.com/ggerganov/llama.cpp">llama.cpp</a> and <a href="https://ggml.ai">ggml.ai</a></p>
|
<p>Powered by <a href="https://github.com/ggerganov/llama.cpp">llama.cpp</a> and <a href="https://ggml.ai">ggml.ai</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
Reference in New Issue
Block a user