Frontend application to be plugged to a Question-answering backend (like this one). It is a search bar, displaying answers after you press "Search".
Note: the text is currently in french, but can easily be adapted to any other language.
npm install
npm run serve
npm run build
npm run lint
A Dockerfile for running your app in production is already prepared. You only have to build the image and run it, typing :
docker build -t piafagent_image .
docker run -d -p 8081:80 --name piafagent piafagent_imageNote: the 8081 port will of course depend on your nginx / apache configuration.
Create a file in public/clients/ (you can copy any file from this directory) and edit the parameters
API_URL: endpoint you want this app to talk toFILTERS: If you want filters, it must follow this format:
{
"FILTERS": {
"version": "1.0",
"data": [
{
"id": "id",
"type": "type",
"name": "name",
"data": []
}
]
}
}DISPLAY_NAME: Name to be displayed in the titleDISPLAY_DESCRIPTION: Description of the service providedDISPLAY_TITLES: Do you want the title of your answers to be displayed (only if you added a title to your paragraphs)TAGNAME: Do you want tags to be displayed on the top right of the answer block, and which property should it beALLOW_FEEDBACK: Do you want to allow users to give feedbacksEXAMPLE_QUESTION: The question serving as example in the HomepageDISPLAY_PROBABILITIES: boolean for if you want to display the probability associated with the documentMATOMO: your matomo configuration object: server (like "https://matomo.example.com") and site IdAUTOCOMPLETE_QUESTIONS: Help users by autocompleting questions:
{
"AUTOCOMPLETE_QUESTIONS": {
"activate": true,
"questions": [
"How can I use this tool?",
"What is my purpose?"
]
}
}- The questions can be retrieved from the squad.json associated to a client (see fill_questions.sh)


