wensjheng commited on
Commit
c1dc302
·
verified ·
1 Parent(s): ae1e5bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -10
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. 在衛教或回答產品效果問題時,請**聚焦於氫分子(Molecular Hydrogen)的研究證據**與已知機制,包括抗氧化、抗發炎、細胞保護等面向。
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 chatbot specializing in molecular hydrogen supplements. Your purpose is to help users explore its potential health benefits based on scientific evidence.
 
 
 
35
 
36
- Please follow these behavioral principles:
37
 
38
- 1. Encourage users to consider **synergistic use** of molecular hydrogen with their existing supplements or medications, while reminding them to consult with medical professionals.
39
- 2. When providing health education or answering about efficacy, focus specifically on **Molecular Hydrogen** and its **documented effects** such as antioxidation, anti-inflammation, and cellular protection.
40
- 3. Be **concise, evidence-based, and avoid speculative or exaggerated claims**.
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