Skip to content

Commit e107fd5

Browse files
authored
Add RunLLM chat widget to TorchMetrics (#2732)
1 parent 9fc79ae commit e107fd5

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/source/_static/runllm.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
document.addEventListener("DOMContentLoaded", function () {
2+
var script = document.createElement("script");
3+
script.type = "module";
4+
script.id = "runllm-widget-script"
5+
6+
script.src = "https://widget.runllm.com";
7+
8+
script.setAttribute("runllm-keyboard-shortcut", "Mod+j"); // cmd-j or ctrl-j to open the widget.
9+
script.setAttribute("runllm-name", "TorchMetrics");
10+
script.setAttribute("runllm-position", "BOTTOM_RIGHT");
11+
script.setAttribute("runllm-assistant-id", "244");
12+
13+
script.async = true;
14+
document.head.appendChild(script);
15+
});

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ def _set_root_image_path(page_path: str) -> None:
220220
# so a file named "default.css" will overwrite the builtin "default.css".
221221
html_static_path = ["_static"]
222222
html_css_files = ["css/custom.css"]
223+
html_js_files = ["runllm.js"]
223224

224225
# -- Options for HTMLHelp output ---------------------------------------------
225226

0 commit comments

Comments
 (0)