Skip to main content

Here is an example of a configuration file with all available options :

config

const configuration = {
fullSize: true,
isUsedOnBorne: false,
locales: {
default: 'fr-FR', // Deprecated since v1.0.14
getDefaultFromBrowser: false
},
position: {
searchForLocation: false,
latitude: 48.866667,
longitude: 2.333333,
city: 'Paris',
country: 'France'
},
subtitles: true
logo: {
src: 'https://cdn.retorik.ai/retorik-framework/imagefiles/logo_DAVI_white.png'
},
answerpanel: true,
skipWelcome: false,
preventExpectedInputHint: true,
pagination: {
borne: 12,
landscape: 20,
mobile: 18
},
remote: {
desktop: 200,
desktopTactile: 250,
verticalTactile: 500
},
companyName: 'DAVI',
subCompanyMessage: 'I answer your questions',
loaderInformationTexts: {
vocal: {
top: 'In order to choose vocal mode',
bottom: 'put the cursor below on the left'
}
text: {
top: 'In order to choose text mode',
bottom: 'put the cursor below on the right'
}
},
hideRetorikLogo: false,
hideMenu: false,
hideControls: false,
baseMenu: [
{ view: AvailableViews.home, indice: 1 }
],
customMenu: [
{
clickHandler: () => console.log('Test'),
customDisplay: 'testPage',
label: { 'fr-FR': 'Page de test', 'en-US': 'Test page' },
icon: <img src='images/lea@2x.png' alt='' />,
indice: 0
}
],
subMenu: [
{ view: AvailableSubViews.history, indice: 1 },
{ view: AvailableSubViews.tutorial, indice: 2 }
],
externalComponents: [{ name: 'testPage', component: <TestPage /> }],
doNotDetectDeviceFromUserAgent: false,
enableConversationCookie: true,
conversationCookieMaxAge: 1800,
enableTelemetry: false,
forceMobileView: false,
enableSpeechCaching: true
}

viewsConfig

const viewsConfiguration = {
homeRoute: 'home',
webcamRotation: 90,
views: {
home: {
background: {
image: 'images/background.webp',
style: 'image'
}
},
news: {
intervalInSeconds: 2,
loop: true,
openingVideo: 'videos/intro.mp4',
background: {
style: 'image',
image: 'images/background.webp'
}
}
}
}

chatbotData

const defaultChatbotData = {
size: '200vh', // with long-shot animations, this size is a good compromise for all devices. For medium-shot animations, keep this filed 'undefined'
height: undefined
}

agentData

const agentData = characters.zahra // ReactJs with import { characters } from '@davi-ai/retorik-framework'
const agentData = 'https://cdn.retorik.ai/spiritenginehtml5/characters/zahra' // Javascript

ponyfillFactoryCredentials

const ponyfillFactoryCredentials = {
region: '<region>',
subscriptionKey: '<subscription_key>'
}

addressData

const addressData = {
tenant: '<tenant_name>'
}

customVoice

const customvoice = {
voice: 'JennyMultilingualNeural'
}