changed database and dialog policy

This commit is contained in:
s459312 2023-05-25 15:37:38 +02:00
parent a1257f29fb
commit 299452076d
2 changed files with 2 additions and 16 deletions

View File

@ -147,13 +147,13 @@
" system_action[(domain, 'NoOffer')] = []\n", " system_action[(domain, 'NoOffer')] = []\n",
" else:\n", " else:\n",
" system_action[(domain, 'Inform')].append(['Choice', str(len(self.results))])\n", " system_action[(domain, 'Inform')].append(['Choice', str(len(self.results))])\n",
"\n",
" if domain == \"product\":\n", " if domain == \"product\":\n",
" # Select the first product that matches the user's constraints\n", " # Select the first product that matches the user's constraints\n",
" for product in self.results:\n", " for product in self.results:\n",
" if all(product.get(slot, '').lower() == value.lower() for slot, value in constraints):\n", " if all(product.get(slot, '').lower() == value.lower() for slot, value in constraints):\n",
" system_action[(domain, 'Recommend')].append(['Name', product['name']])\n", " system_action[(domain, 'Recommend')].append(['Name', product['name']])\n",
" break\n" " break\n",
"\n"
] ]
}, },
{ {

View File

@ -1,19 +1,5 @@
{ {
"database":{ "database":{
"payment":[
{
"type":"karta",
"amount":"21 zł",
"loyalty_card":"23232323"
}
],
"delivery":[
{
"type":"paczkomat",
"address":"Aleje",
"time":"15:30"
}
],
"product":[ "product":[
{ {
"name":"banan", "name":"banan",