Skip to content

Commit e404656

Browse files
Refactor chatbot UI for clarity; update temperature setting in settings.json; add cooking recipe template to templates.json
1 parent 2a3321f commit e404656

4 files changed

Lines changed: 11 additions & 10 deletions

File tree

app/chatbot.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2090,20 +2090,15 @@ def update_ui_language(self):
20902090

20912091
# Update other elements in the chat tab
20922092
for btn in self.chat_tab.findChildren(QPushButton):
2093-
if "clear" in btn.text().lower():
2093+
if "🗑️" in btn.text():
20942094
btn.setText(translator.tr('clear'))
2095-
elif "export" in btn.text().lower():
2095+
elif "📤" in btn.text():
20962096
btn.setText(translator.tr('export'))
20972097

20982098
# Update input area
2099-
template_label = None
21002099
for label in self.chat_tab.findChildren(QLabel):
2101-
if label.text().startswith("Template"):
2102-
template_label = label
2103-
break
2104-
2105-
if template_label:
2106-
template_label.setText(translator.tr('template'))
2100+
if "Template" in label.text():
2101+
label.setText(translator.tr('template'))
21072102

21082103
self.send_button.setText(translator.tr('send'))
21092104

chat_history.db

8 KB
Binary file not shown.

settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"max_history": 50,
88
"font_size": 16,
99
"api_url": "http://localhost:11434",
10-
"temperature": 70,
10+
"temperature": 100,
1111
"user_name": "Madick Ange C\u00e9sar",
1212
"language": "fr"
1313
}

templates.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,11 @@
4040
"description": "find bmi",
4141
"category": "analysis",
4242
"created": "2025-03-02T02:54:06.219632"
43+
},
44+
"Cooking recipe": {
45+
"prompt": "\"Guide my AI-powered kitchen assistant to prepare {dish name}, a {vegetarian/non-vegetarian} dish with {number} servings, using ingredients listed below. Please consider the following parameters:\nCuisine: { specify cuisine or region}\nDietary preference: { vegan/gluten-free/no dietary restrictions}\nCooking method: { roast/steak/saut\u00e9/bake/any etc.}\nIngredients:\n{List ingredients with quantities and unit conversions (e.g., cups, grams)}\nAdditional notes:\n{Any specific cooking techniques or tips you'd like to include}\nDesired level of doneness:\n{list desired level of doneness for each ingredient, e.g., rare, medium-rare, well-done}\nPlease provide the recipe and any relevant cooking guidance to ensure a successful outcome.\"",
46+
"description": "Generate a cooking recipe by feeling the template",
47+
"category": "development",
48+
"created": "2025-03-02T08:03:10.802324"
4349
}
4450
}

0 commit comments

Comments
 (0)