codeBOKER commited on
Commit
6c64035
·
verified ·
1 Parent(s): b675fc7

Update propit message

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -13,6 +13,7 @@ TELEGRAM_URL = f"https://api.telegram.org/bot{TELEGRAM_TOKEN}/sendMessage"
13
 
14
  EMBED_MODEL= os.environ.get("EMBED_MODEL")
15
  GROQ_MODEL = os.environ.get("GROQ_MODEL")
 
16
 
17
  pc = Pinecone(api_key=PINECONE_API_KEY)
18
  index = pc.Index("customerserviceindex")
@@ -41,15 +42,13 @@ async def get_ai_response(user_query: str):
41
  # Construct the System Prompt
42
  # We use facts from the profile: Islamic banking, based in Mukalla [cite: 15, 6]
43
  prompt = f"""
44
- You are the official AI assistant for Hadhramout Bank (بنك حضرموت).
45
- Your tone is professional, helpful, and culturally respectful to the Yemeni community.
46
- Use ONLY the provided context to answer. If the information isn't there,
47
- kindly ask the customer to visit the main branch in Al Mukalla.
48
 
49
- Context:
50
- {context_text}
51
 
52
- Customer Question: {user_query}
 
 
53
  """
54
 
55
  completion = groq_client.chat.completions.create(
 
13
 
14
  EMBED_MODEL= os.environ.get("EMBED_MODEL")
15
  GROQ_MODEL = os.environ.get("GROQ_MODEL")
16
+ PROMPT = os.environ.get("PROMPT")
17
 
18
  pc = Pinecone(api_key=PINECONE_API_KEY)
19
  index = pc.Index("customerserviceindex")
 
42
  # Construct the System Prompt
43
  # We use facts from the profile: Islamic banking, based in Mukalla [cite: 15, 6]
44
  prompt = f"""
45
+ {PROMPT}
 
 
 
46
 
47
+ Message:{user_message}
 
48
 
49
+ Retrieved Context:{retrieved_context}
50
+
51
+ Final Answer:
52
  """
53
 
54
  completion = groq_client.chat.completions.create(