Minimum configuration
For all configuration options, see the section Configurations.
Since Retorik Framework version 1.0.17, less properties are needed to launch the application. These are :
- addressData that contains the data of the tenant to which the application will connect
- widgetData only in widget mode
The other data will be automatically retrieved from Retorik Studio. You can still overload these data by setting them in the configuration object as before.
Retorik Framework version greater than or equal 1.0.17
- ReactJs
- Javascript
If you are using typescript in your project, you can import the following types :
import type {
AddressData,
WidgetConfiguration // widget mode only
} from '@davi-ai/retorik-framework';
The minimum data needed, to be passed as props when instanciating the main component, are the following :
const addressData: AddressData = {
tenant: '<name_of_the_tenant>'
/* the tenant is your Retorik Studio address : https://studio.retorik.ai/tenant/... */
};
/* Mandatory only in widget mode */
const widgetConfiguration: WidgetConfiguration = {}
The minimum data needed, to be passed as props when instanciating the main component, are the following :
const addressData: AddressData = {
tenant: '<name_of_the_tenant>'
/* the tenant is your Retorik Studio address : https://studio.retorik.ai/tenant/... */
};
/* Mandatory only in widget mode */
const widgetConfiguration = {}
Retorik Framework version lower than 1.0.17
- ReactJs Typescript
- Javascript
If you are using typescript in your project, you can import the following types :
import type {
AddressData,
Configuration,
PonyfillFactoryCredentials,
ViewsConfiguration,
WidgetConfiguration // widget mode only
} from '@davi-ai/retorik-framework';
The minimum data needed, to be passed as props when instanciating the main component, are the following :
import characters from '@davi-ai/retorik-framework';
const configuration: Configuration = {};
const viewsConfig: ViewsConfiguration = {
homeRoute: 'home',
home: {
background: {
style: 'image',
image: ''
}
}
};
const agentData: string = characters.zahra;
const ponyfillFactoryCredentials: PonyfillFactoryCredentials = {
region: '<region>',
subscriptionKey: '<subscription_key>',
};
const addressData: AddressData = {
tenant: '<name_of_the_tenant>'
/* the tenant is your Retorik Studio address : https://studio.retorik.ai/tenant/... */
};
/* Mandatory only in widget mode */
const widgetConfiguration: WidgetConfiguration = {}
The minimum data needed, to be passed as props when instanciating the main component, are the following :
const configuration = {};
const agentData: string = 'https://cdn.retorik.ai/spiritenginehtml5/characters/zahra';
const ponyfillFactoryCredentials: PonyfillFactoryCredentials = {
region: '<region>',
subscriptionKey: '<subscription_key>',
};
const addressData: AddressData = {
tenant: '<name_of_the_tenant>'
/* the tenant is your Retorik Studio address : https://studio.retorik.ai/tenant/... */
};
/* Mandatory only in widget mode */
const widgetConfiguration = {}