Skip to content

Commit

Permalink
PD-1117 / 3.0 / Add AI-Powered Search widget to Docs Hub (Master - Ba…
Browse files Browse the repository at this point in the history
…ckport … (by DjP-iX) (#3071)

* PD-1117: Add AI-Powered Search widget to Docs Hub (Master - Backport to active branches) (#3059)

* Add AI-Powered Search widget to Docs Hub

This is an embedded widget that is a front end to DocsBot and GPT-4 based LLM query responses.

The bot is initially ingested with public documentation about TrueNAS from the Docs Hub, TrueNAS.com, and a few other Open Source licensed software projects that are relevant to TrueNAS.

Responses are experimental and should be used cautiously.

Community feedback and tuning suggestions are welcome!

* Update site-header.html

---------

Co-authored-by: DjP-iX <[email protected]>
(cherry picked from commit dcaf925)

* Update site-header.html

---------

Co-authored-by: Tim Moore <[email protected]>
  • Loading branch information
bugclerk and Mrt134 authored Sep 25, 2024
1 parent 4872fc4 commit c787ad4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion layouts/partials/site-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,16 @@
});
});
</script>
<!-- End sticky main_navbar -->
<!-- End sticky main_navbar -->
<!-- Add DocsBot AI powered search widget -->
<script type="text/javascript">window.DocsBotAI=window.DocsBotAI||{},DocsBotAI.init=function(c){return new Promise(function(e,o){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://widget.docsbot.ai/chat.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n),t.addEventListener("load",function(){window.DocsBotAI.mount({id:c.id,supportCallback:c.supportCallback,identify:c.identify,options:c.options,signature:c.signature});var t;t=function(n){return new Promise(function(e){if(document.querySelector(n))return e(document.querySelector(n));var o=new MutationObserver(function(t){document.querySelector(n)&&(e(document.querySelector(n)),o.disconnect())});o.observe(document.body,{childList:!0,subtree:!0})})},t&&t("#docsbotai-root").then(e).catch(o)}),t.addEventListener("error",function(t){o(t.message)})})};</script>
<script type="text/javascript">
DocsBotAI.init({
id: "c6l7vGyugnoP9SSSoNXy/h6qDF4J2h3xfHKO9Nm6r",
options: {
horizontalMargin: 40,
verticalMargin: 80,
}
});
</script>
<!-- End AI powered search widget embed -->

0 comments on commit c787ad4

Please sign in to comment.