The Docq Embeddable Widget is a tool that allows you to seamlessly integrate the Docq public chat interface into your website.
For a comprehensive understanding of Docq, please refer to the official documentation:
To dynamically embed the widget, copy and paste the following code into your website, replacing placeholders with the appropriate values:
<div id="docq-widget"><i>Loading widget...</i></div>
<script>
(function(d, o, c, q, a, i) {
i = o.createElement('script');i.async = 1;i.src = c;d['__DocqSID'] = a;
a = o.getElementsByTagName('script')[0];a.parentNode.insertBefore(i, a);d['__Docq'] = q;
})(window, document, 'https://cdn.jsdelivr.net/gh/docqai/widget@main/public/widget.js', 'docq-host-url', 'org-id:space-group-id')
</script>
The following code will load the widget from a server at http://localhost:8501
with the organization ID 1000
and space group ID 1
:
<div id="docq-widget"><i>Loading widget...</i></div>
<script>
(function(d, o, c, q, a, i) {
i = o.createElement('script');i.async = 1;i.src = c;d['__DocqSID'] = a;
a = o.getElementsByTagName('script')[0];a.parentNode.insertBefore(i, a);d['__Docq'] = q;
})(window, document, 'http://localhost:8501', '1000:1')
To statically embed the widget, copy and paste the following code into your website, replacing placeholders with the appropriate values:
<div id="docq-widget"><i>Loading widget...</i></div>
<script src="https://cdn.jsdelivr.net/gh/docqai/widget@main/public/widget.js"
docq-host-url="docq-host-url" docq-config="org-id:space-group-id"
></script>
The following code will load the widget from a server at http://localhost:8501
with the organization ID 1000
and space group ID 1
:
<div id="docq-widget"><i>Loading widget...</i></div>
<script src="https://cdn.jsdelivr.net/gh/docqai/widget@main/public/widget.js" docq-host-url="http://localhost:8501" docq-config="1000:1"></script>
Below is a list of placeholders that are used and what they represent:
docq-host-url
: URL of the Docq serverorg-id
: Organization IDspace-group-id
: Space Group IDdocq-config
: Configuration string in the formatorg-id:space-group-id