Skip to content

Commit

Permalink
[Docs] Add RunLLM chat widget (#6857)
Browse files Browse the repository at this point in the history
  • Loading branch information
cw75 authored Jul 27, 2024
1 parent 1ad86ac commit f954d07
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/source/_static/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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("version", "stable");
script.setAttribute("runllm-keyboard-shortcut", "Mod+j"); // cmd-j or ctrl-j to open the widget.
script.setAttribute("runllm-name", "vLLM");
script.setAttribute("runllm-position", "BOTTOM_RIGHT");
script.setAttribute("runllm-assistant-id", "207");

script.async = true;
document.head.appendChild(script);
});
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
'use_repository_button': True,
'use_edit_page_button': True,
}
html_static_path = ["_static"]
html_js_files = ["custom.js"]

# see https://docs.readthedocs.io/en/stable/reference/environment-variables.html # noqa
READTHEDOCS_VERSION_TYPE = os.environ.get('READTHEDOCS_VERSION_TYPE')
Expand Down

0 comments on commit f954d07

Please sign in to comment.