A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 00:45 UTC
Set `?device={device}` when changing tab in installation guides (#12560)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Jan 30, 2025 at 08:05 UTC
a2769032ca78108e58abc45e2eb0ade8b47a6515
1 file changed
+21
-1
docs/source/_static/custom.js
+21
-1
@@ -1,3 +1,4 @@
1
+// Add RunLLM widget
2
document.addEventListener("DOMContentLoaded", function () {
3
var script = document.createElement("script");
4
script.type = "module";
@@ -15,4 +16,23 @@ document.addEventListener("DOMContentLoaded", function () {
16
17
script.async = true;
18
document.head.appendChild(script);
18
- });
\ No newline at end of file
19
+ });
20
+
21
+// Update URL search params when tab is clicked
22
+ document.addEventListener("DOMContentLoaded", function () {
23
+ const tabs = document.querySelectorAll(".sd-tab-label");
24
+
25
+ function updateURL(tab) {
26
+ const syncGroup = tab.getAttribute("data-sync-group");
27
+ const syncId = tab.getAttribute("data-sync-id");
28
+ if (syncGroup && syncId) {
29
+ const url = new URL(window.location);
30
+ url.searchParams.set(syncGroup, syncId);
31
+ window.history.replaceState(null, "", url);
32
+ }
33
+ }
34
+
35
+ tabs.forEach(tab => {
36
+ tab.addEventListener("click", () => updateURL(tab));
37
+ });
38
+});