VishnuRamDebyez commited on
Commit
6400d6d
·
verified ·
1 Parent(s): 804a7ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -120,12 +120,12 @@ class QASystem:
120
  if retrieved_docs:
121
  context = ' '.join(m.content for m in retrieved_docs)
122
  else:
123
- context = "mountain bicycle technical knowledge"
124
 
125
  system_prompt = (
126
  "You are an AI assistant embedded within the Interactive Electronic Technical Manual (IETM) for Mountain Cycles.. "
127
  "Always provide accurate responses with references to provided data. "
128
- "If the user query is not technical-specific, still respond from a technical perspective."
129
  f"\n\nContext:\n{context}"
130
  )
131
 
@@ -139,7 +139,7 @@ class QASystem:
139
  def generate(state: MessagesState):
140
  retrieved_docs = [m for m in reversed(state["messages"]) if m.type == "tool"][::-1]
141
 
142
- context = ' '.join(m.content for m in retrieved_docs) if retrieved_docs else "mountain bicycle technical knowledge"
143
 
144
  system_prompt = (
145
  "You are an AI assistant embedded within the Interactive Electronic Technical Manual (IETM) for Mountain Cycles. "
 
120
  if retrieved_docs:
121
  context = ' '.join(m.content for m in retrieved_docs)
122
  else:
123
+ context = "mountain bicycle documentation knowledge"
124
 
125
  system_prompt = (
126
  "You are an AI assistant embedded within the Interactive Electronic Technical Manual (IETM) for Mountain Cycles.. "
127
  "Always provide accurate responses with references to provided data. "
128
+ "If the user query is not technical-specific, still respond from a IETM perspective."
129
  f"\n\nContext:\n{context}"
130
  )
131
 
 
139
  def generate(state: MessagesState):
140
  retrieved_docs = [m for m in reversed(state["messages"]) if m.type == "tool"][::-1]
141
 
142
+ context = ' '.join(m.content for m in retrieved_docs) if retrieved_docs else "mountain bicycle documentation knowledge"
143
 
144
  system_prompt = (
145
  "You are an AI assistant embedded within the Interactive Electronic Technical Manual (IETM) for Mountain Cycles. "