Skip to content

Commit 8466aa6

Browse files
cw75Alvant
authored andcommitted
[Docs] Add RunLLM chat widget (vllm-project#6857)
Signed-off-by: Alvant <alvasian@yandex.ru>
1 parent edfa666 commit 8466aa6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/source/_static/custom.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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("version", "stable");
9+
script.setAttribute("runllm-keyboard-shortcut", "Mod+j"); // cmd-j or ctrl-j to open the widget.
10+
script.setAttribute("runllm-name", "vLLM");
11+
script.setAttribute("runllm-position", "BOTTOM_RIGHT");
12+
script.setAttribute("runllm-assistant-id", "207");
13+
14+
script.async = true;
15+
document.head.appendChild(script);
16+
});

docs/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
'use_repository_button': True,
6969
'use_edit_page_button': True,
7070
}
71+
html_static_path = ["_static"]
72+
html_js_files = ["custom.js"]
7173

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

0 commit comments

Comments
 (0)