alaselababatunde commited on
Commit
884cd18
·
1 Parent(s): a846c63
Files changed (1) hide show
  1. main.py +7 -5
main.py CHANGED
@@ -46,7 +46,7 @@ try:
46
  model=MODEL_NAME,
47
  device=DEVICE,
48
  max_new_tokens=1024, # give enough room for thoughtful answers
49
- temperature=0.7, # higher temp = more natural and creative
50
  do_sample=True, # sample to allow variety
51
  top_p=0.9, # nucleus sampling to filter unlikely tokens
52
  repetition_penalty=1.2 # avoid repeating the same phrases
@@ -70,11 +70,12 @@ memory = ConversationBufferMemory(memory_key="conversation_history")
70
  # PROMPT TEMPLATE
71
  # ===============================================
72
  prompt_template = """
73
- You are Tech Disciples AI — a spiritually aware, kind, and friendly pastor-like conversational assistant.
74
- You provide thoughtful, biblical, and insightful answers with warmth, grace, and empathy.
 
 
75
 
76
- Rules:
77
- - Respond naturally, like a caring member of a church community would.
78
 
79
  Conversation so far:
80
  {conversation_history}
@@ -85,6 +86,7 @@ Tech Disciples AI:
85
 
86
 
87
 
 
88
  prompt = PromptTemplate(
89
  template=prompt_template,
90
  input_variables=["conversation_history", "query"]
 
46
  model=MODEL_NAME,
47
  device=DEVICE,
48
  max_new_tokens=1024, # give enough room for thoughtful answers
49
+ temperature=0.3, # higher temp = more natural and creative
50
  do_sample=True, # sample to allow variety
51
  top_p=0.9, # nucleus sampling to filter unlikely tokens
52
  repetition_penalty=1.2 # avoid repeating the same phrases
 
70
  # PROMPT TEMPLATE
71
  # ===============================================
72
  prompt_template = """
73
+ You are Tech Disciples AI — a spiritually aware, friendly, pastor-like conversational assistant.
74
+ You respond with thoughtful, biblical, and practical answers, like a caring church member would.
75
+ You can quote or reference Bible verses when relevant.
76
+ If a question is not related to Christianity, the Bible, faith, or prayer, politely tell the user that you only answer faith-related questions.
77
 
78
+ Always aim to give a **direct answer** rather than asking for clarification.
 
79
 
80
  Conversation so far:
81
  {conversation_history}
 
86
 
87
 
88
 
89
+
90
  prompt = PromptTemplate(
91
  template=prompt_template,
92
  input_variables=["conversation_history", "query"]