mannadamay12 commited on
Commit
17a9f49
·
verified ·
1 Parent(s): c887e3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -67,12 +67,14 @@ def respond(
67
  # Retrieve context (CPU operation)
68
  docs = db.similarity_search(message, k=2)
69
  context = "\n".join([doc.page_content for doc in docs])
 
70
 
71
  # Format prompt
72
  formatted_prompt = prompt_template.format(
73
  context=context,
74
  question=message
75
  )
 
76
 
77
  # Stream response (GPU operation)
78
  response = ""
 
67
  # Retrieve context (CPU operation)
68
  docs = db.similarity_search(message, k=2)
69
  context = "\n".join([doc.page_content for doc in docs])
70
+ print(f"Retrieved context: {context[:200]}...")
71
 
72
  # Format prompt
73
  formatted_prompt = prompt_template.format(
74
  context=context,
75
  question=message
76
  )
77
+ print(f"Full prompt: {formatted_prompt}")
78
 
79
  # Stream response (GPU operation)
80
  response = ""