0.0.7-dev.0 • Published 9 months ago
@revium/gpt-widget v0.0.7-dev.0
Quickstart
cp .env.example .env.local
yarn
yarn dev
Deploy code
<script>
function loadScript(url, callback) {
let script = document.createElement('script')
script.type = 'text/javascript'
script.src = url
script.onload = callback
document.head.appendChild(script)
let link = document.createElement('link')
link.rel = 'stylesheet'
link.href = 'https://cdn.jsdelivr.net/npm/@revium/gpt-widget@0.x.x/dist/style.css'
document.head.appendChild(link)
}
// Function to initialize the widget after the script is loaded
function initializeWidget() {
if (typeof ReviumGptWidget !== 'undefined' && typeof ReviumGptWidget.init === 'function') {
ReviumGptWidget.init({
source: 'xxxxxxxx',
apikey: 'xxxxxxxx',
intro:
'Im an AI chatbot built by the Revium team and trained on data you can find on this site, ask me anything about the website or future privacy laws!',
textMode: 'light',
primaryColor: '#000000',
secondaryColor: '#000000',
elementId: 'revium-gpt-widget',
})
} else {
console.error('ReviumGptWidget is not defined or does not have an init() function.')
}
}
// Load the external script
loadScript('https://cdn.jsdelivr.net/npm/@revium/gpt-widget@0.x.x/dist/revium-gpt-widget.js', initializeWidget)
</script>
Minified
function loadScript(t,e){let i=document.createElement("script");i.type="text/javascript",i.src=t,i.onload=e,document.head.appendChild(i);let n=document.createElement("link");n.rel="stylesheet",n.href="https://cdn.jsdelivr.net/npm/@revium/gpt-widget@0.x.x/dist/style.css",document.head.appendChild(n)}function initializeWidget(){"undefined"!=typeof ReviumGptWidget&&"function"==typeof ReviumGptWidget.init?ReviumGptWidget.init({source:"xxxxxxxx",apikey:"xxxxxxxx",intro:"Im an AI chatbot built by the Revium team and trained on data you can find on this site, ask me anything about the website or future privacy laws!",textMode:"light",primaryColor:"#000000",secondaryColor:"#000000"}):console.error("ReviumGptWidget is not defined or does not have an init() function.")}loadScript("https://cdn.jsdelivr.net/npm/@revium/gpt-widget@0.x.x/dist/revium-gpt-widget.js",initializeWidget);
0.0.36-dev.0
9 months ago
0.0.34-dev.0
10 months ago
0.0.34
9 months ago
0.0.35-dev.0
9 months ago
0.0.32-dev.0
1 year ago
0.0.31
1 year ago
0.0.32
1 year ago
0.0.33
11 months ago
0.0.30-dev.0
1 year ago
0.0.33-dev.0
11 months ago
0.0.30
1 year ago
0.0.29-dev.0
1 year ago
0.0.28-dev.0
1 year ago
0.0.26-dev.0
1 year ago
0.0.27-dev.0
1 year ago
0.0.21
1 year ago
0.0.22-dev.0
1 year ago
0.0.23-dev.0
1 year ago
0.0.21-dev.0
1 year ago
0.0.20
2 years ago
0.0.20-dev.0
2 years ago
0.0.19-dev.0
2 years ago
0.0.15
2 years ago
0.0.14
2 years ago
0.0.18-dev.0
2 years ago
0.0.17-dev.0
2 years ago
0.0.16-dev.0
2 years ago
0.0.15-dev.0
2 years ago
0.0.14-dev.0
2 years ago
0.0.13
2 years ago
0.0.13-dev.0
2 years ago
0.0.12
2 years ago
0.0.12-dev.0
2 years ago
0.0.11
2 years ago
0.0.10
2 years ago
0.0.8-dev.0
2 years ago
0.0.7-dev.0
2 years ago
0.0.6
2 years ago
0.0.6-dev.0
2 years ago
0.0.5
2 years ago
0.0.5-dev.0
2 years ago
0.0.4
2 years ago
0.0.4-dev.0
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago