Open vmugra opened 2 years ago
@vmugra just the local intents or are we missing a "Publish intents" as a separate issue?
@turnerrainer applies to all intents (local and public)
@vmugra Should intents be downloadable only separately or should there be and option for downloading ALL intents at once? PS! This functionality is not currently designed and should be added to figma.
@vmugra GUI buttons for downloading / uploading added. Uploading file type limited to CSV only.
This issue should be cut into smaller chunks.
@RaulAltmae an example of downloading a result as CSV can be seen in http://test.buerokratt.ee:3010/analytics/chats when you click on "CSV"
This will trigger https://github.com/buerokratt/Analytics-Module/blob/main/DSL/Ruuter/POST/csv.yml, which in turn makes a request to https://github.com/buerokratt/Analytics-Module/blob/main/DSL/DMapper/hbs/get-csv.handlebars
csv file is converted in front-end to base64
"ei"
"mkm"
"iialgi"
"ei meeldi"
"mitte väga"
"Ei , pole vaja!"
Sample input for /rasa/intents/upload
{
"intent": "common_tervitus",
"file": "ImVpIgoibWttIgoiaWlhbGdpIgoiZWkgbWVlbGRpIgoibWl0dGUgdsOkZ2EiCiJFaSAsIHBvbGUgdmFqYSEiCg=="
}
Sample input for /rasa/intents/download
{
"intent": "common_tervitus"
}
PR https://github.com/buerokratt/Training-Module/pull/290
This pull request finalizes both downloading and uploading CSV files in adding or receiving examples of any intent on the intents page. Both ways, CSV files are processed with a simple Handlebars script through a Datamapper request. The incoming examples are added to the already existing ones and outgoing ones are compiled from all examples under the intent. It is possible to download one intent's examples and upload them to another. The added examples are reflected in OpenSearch and the timestamp of the change is written into the intents database.
Download as well as uploading works as intended.
AS A Bürokratt Trainer I WANT TO download intents and examples to my computer SO THAT I can store them locally on my computer
Acceptance Criteria
/intents/examples/add
) to a specified intent by the user providing examples by uploading them as CSVGUI
DSL
Prepare data for downloading as a CSV file
intent
of file content for further processingSample input
Sample output
Sample input based on original YAML file
Sample output based on sample input (see below)
Download intents and current examples with specific timeframe
Add new examples to a specified intent by uploading examples as CSV
intent
of #Step 3 via #67