Chat
Parameters
-
https://qsc-dev.quasiris.de/console/chat?token=****&tenant=demo&code=my-chat
-
token: a token to secure the chat
-
tenant: the tenant of the configuration
-
code: the id of the configuration
Token
To secure the chat by a token:
- go to Security
- create a new api key
- grant read permissions to
config, chat
Configuration
- apiUrl - the base url of the api
- resultsetId - the id of the result set from where the answer is read
- initialQuestion - the initial question to display in the chat after loading
- answer - jsonPath to the answer.
documents[0].document.answer
- template
- if no template is defined, the value of
answer
is used - input: documents[]
- example:
"template": "<BCard title='Answer'><BCardText>{{ documents[0].document.answer }} </BCardText></BCard>"
- https://bootstrap-vue-next.github.io/bootstrap-vue-next/docs/components/card.html
- html bootstrap is also possible to use
- if no template is defined, the value of
UI Options
- icon
- headerBackground
- background
- customFooterLogo
- favicon
- headerTitle
- headerTitleColor
- sentMessageTextColor
- sentMessageBackground
- footerBackground
Tracking
- trackingUrl
- feedbackModalTitle
- feedbackModalButtonText
- feedbackModalCommentOptions
relatedChatsOptions
- name - the name of the chat to display in the dropdown
- code - the code of the chat
{
"relatedChatsOptions": [
{
"code": "my-chat-1",
"name": "My Chat 1"
}
]
}
Actions
- name: the name of the action displayed in the menu
- icon: the icon of the action, displayed next to the name - font awesome icons - https://fontawesome.com/search?o=r&m=free
- action:
- prompt - send the prompt message to the API as a q parameter and display the text in the chat
- uploadImage - open a upload image modal
- camera - open the camera
- text: the text to show in the chat, when the action is selected. If there is no prompt configured, the text is send to the API as q parameter
{
"actions": [
{
"name": "summary",
"icon": "fa fa-list",
"text": "Create a Summary for this document",
"prompt" : "Create a summary for this document and format the result in html",
"action" : "prompt"
},
{
"name": "Upload Image",
"icon": "fa fa-image",
"action" : "uploadImage"
},
{
"name": "Camera",
"icon": "fa fa-camera",
"action" : "camera"
}
]
}