Skip to content

Distribute and run LLMs with a single file.

Detect search query to start webchat (#333)

Ed Leea8124633ea9b
diff --git a/llama.cpp/server/public/index.html b/llama.cpp/server/public/index.html
index 367ded37..1e4f9987 100644
--- a/llama.cpp/server/public/index.html
+++ b/llama.cpp/server/public/index.html
@@ -1001,6 +1001,10 @@
}
function App(props) {
+ useEffect(() => {
+ const query = new URLSearchParams(location.search).get("q");
+ if (query) chat(query);
+ }, []);
return html`
<div class="mode-${session.value.type}">