Skip to content

Commit ba56102

Browse files
authored
Cherrypick: Add the RunLLM widget to the website (pytorch#159592)
Add the RunLLM widget to the website (pytorch#152055) Fixes #ISSUE_NUMBER Pull Request resolved: pytorch#152055 Approved by: https://github.com/albanD (cherry picked from commit e4e2701)
1 parent c525a02 commit ba56102

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.ci/docker/requirements-docs.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sphinx==5.3.0
22
#Description: This is used to generate PyTorch docs
33
#Pinned versions: 5.3.0
4-
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@pytorch_sphinx_theme2#egg=pytorch_sphinx_theme2
4+
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@722b7e6f9ca512fcc526ad07d62b3d28c50bb6cd#egg=pytorch_sphinx_theme2
55

66
# TODO: sphinxcontrib.katex 0.9.0 adds a local KaTeX server to speed up pre-rendering
77
# but it doesn't seem to work and hangs around idly. The initial thought that it is probably
@@ -49,8 +49,8 @@ IPython==8.12.0
4949
#Pinned versions: 8.12.0
5050

5151
myst-nb==0.17.2
52-
#Description: This is used to generate PyTorch functorch docs
53-
#Pinned versions: 0.13.2
52+
#Description: This is used to generate PyTorch functorch and torch.compile docs.
53+
#Pinned versions: 0.17.2
5454

5555
# The following are required to build torch.distributed.elastic.rendezvous.etcd* docs
5656
python-etcd==0.4.5
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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("crossorigin", "true");
10+
script.setAttribute("runllm-keyboard-shortcut", "Mod+j");
11+
script.setAttribute("runllm-name", "PyTorch");
12+
script.setAttribute("runllm-position", "BOTTOM_RIGHT");
13+
script.setAttribute("runllm-assistant-id", "834");
14+
15+
script.async = true;
16+
document.head.appendChild(script);
17+
});

docs/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3564,6 +3564,8 @@ def linkcode_resolve(domain, info):
35643564
"https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
35653565
]
35663566

3567+
html_js_files = ["js/runllm-widget.js"]
3568+
35673569
from sphinx.ext.coverage import CoverageBuilder
35683570

35693571

0 commit comments

Comments
 (0)