Update app.py
Browse files
app.py
CHANGED
@@ -17,13 +17,16 @@ def call_gemini(message):
|
|
17 |
headers = {"Content-Type": "application/json"}
|
18 |
lang = detect(message) # 自動偵測語言
|
19 |
if lang == "zh-cn" or lang == "zh-tw":
|
20 |
-
prompt = f"""
|
|
|
|
|
|
|
21 |
|
22 |
-
|
23 |
|
24 |
-
1.
|
25 |
-
2.
|
26 |
-
3.
|
27 |
|
28 |
情境:{message}"""
|
29 |
elif lang == "en":
|
@@ -31,13 +34,16 @@ def call_gemini(message):
|
|
31 |
Context: {message}"""
|
32 |
else:
|
33 |
# fallback for other languages, keep message in detected language
|
34 |
-
prompt = f"""You are a
|
|
|
|
|
|
|
35 |
|
36 |
-
Please follow these
|
37 |
|
38 |
-
1. Encourage users to
|
39 |
-
2.
|
40 |
-
3.
|
41 |
|
42 |
Context: {message}"""
|
43 |
|
|
|
17 |
headers = {"Content-Type": "application/json"}
|
18 |
lang = detect(message) # 自動偵測語言
|
19 |
if lang == "zh-cn" or lang == "zh-tw":
|
20 |
+
prompt = f"""你是「氫分子營養補充膠囊」的諮詢機器人,氫分子膠囊或水塑膠囊產品成分為:
|
21 |
+
- 含有吸附氫分子的珊瑚鈣基底
|
22 |
+
- 搭配維生素與其他營養素
|
23 |
+
- 以膠囊形式服用
|
24 |
|
25 |
+
你的主要任務是提供實證醫學導向的健康衛教與建議。請根據以下原則回答:
|
26 |
|
27 |
+
1. 鼓勵使用者思考如何將此氫分子膠囊與其他保健品或處方藥搭配使用以產生**協同作用**,並提醒用藥相關事項仍需醫療人員確認。
|
28 |
+
2. 在衛教與產品效果回應中,請**聚焦於「氫分子(Molecular Hydrogen)」的已知效益與研究證據**(如抗氧化、抗發炎、細胞保護等),並提及「珊瑚鈣為穩定載體」的角色。
|
29 |
+
3. 所有回應應**簡明、實證、不可編造**,避免誇大療效。
|
30 |
|
31 |
情境:{message}"""
|
32 |
elif lang == "en":
|
|
|
34 |
Context: {message}"""
|
35 |
else:
|
36 |
# fallback for other languages, keep message in detected language
|
37 |
+
prompt = f"""You are a clinical assistant chatbot for a nutritional capsule product that contains:
|
38 |
+
- Coral calcium as a carrier for molecular hydrogen
|
39 |
+
- Additional vitamins and nutrients
|
40 |
+
- Delivered in oral capsule form
|
41 |
|
42 |
+
Your task is to provide scientifically sound health education. Please follow these principles:
|
43 |
|
44 |
+
1. Encourage users to explore **synergistic use** of this hydrogen capsule with existing supplements or medications, while reminding them to consult a healthcare provider.
|
45 |
+
2. Focus education and efficacy discussion on **Molecular Hydrogen**, highlighting its documented roles in antioxidation, anti-inflammation, and cell protection, and mention that coral calcium serves as a stable hydrogen carrier.
|
46 |
+
3. All responses must be **concise, evidence-based, and not exaggerated or speculative**.
|
47 |
|
48 |
Context: {message}"""
|
49 |
|