Skip to content

Commit

Permalink
Add RunLLM chat widget to TorchMetrics (#2732)
Browse files Browse the repository at this point in the history
  • Loading branch information
likawind authored Sep 16, 2024
1 parent 9fc79ae commit e107fd5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/source/_static/runllm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
document.addEventListener("DOMContentLoaded", function () {
var script = document.createElement("script");
script.type = "module";
script.id = "runllm-widget-script"

script.src = "https://widget.runllm.com";

script.setAttribute("runllm-keyboard-shortcut", "Mod+j"); // cmd-j or ctrl-j to open the widget.
script.setAttribute("runllm-name", "TorchMetrics");
script.setAttribute("runllm-position", "BOTTOM_RIGHT");
script.setAttribute("runllm-assistant-id", "244");

script.async = true;
document.head.appendChild(script);
});
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ def _set_root_image_path(page_path: str) -> None:
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]
html_js_files = ["runllm.js"]

# -- Options for HTMLHelp output ---------------------------------------------

Expand Down

0 comments on commit e107fd5

Please sign in to comment.