Skip to content

Commit

Permalink
Add support for Ask AI in mkdocs (stanfordnlp#1669)
Browse files Browse the repository at this point in the history
  • Loading branch information
krypticmouse authored Oct 22, 2024
1 parent 2890ddf commit d9161b3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/docs/js/runllm-widget.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
document.addEventListener("DOMContentLoaded", function () {
var script = document.createElement("script");
script.defer = true;
script.type = "module";
script.id = "runllm-widget-script";
script.src =
"https://widget.runllm.com";
script.setAttribute("runllm-name", "DSPy");
script.setAttribute("runllm-preset", "mkdocs");
script.setAttribute("runllm-server-address", "https://api.runllm.com");
script.setAttribute("runllm-assistant-id", "132");
script.setAttribute("runllm-position", "BOTTOM_RIGHT");
script.setAttribute("runllm-keyboard-shortcut", "Mod+j");
script.setAttribute(
"runllm-slack-community-url",
""
);

document.head.appendChild(script);
});
3 changes: 3 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ extra:
- icon: fontawesome/brands/discord
link: https://discord.gg/XCGy2WDCQB

extra_javascript:
- "js/runllm-widget.js"

markdown_extensions:
- pymdownx.tabbed:
alternate_style: true
Expand Down

0 comments on commit d9161b3

Please sign in to comment.