TahaRasouli commited on
Commit
845e556
·
verified ·
1 Parent(s): 1d95373

Update unified_document_processor.py

Browse files
Files changed (1) hide show
  1. unified_document_processor.py +8 -10
unified_document_processor.py CHANGED
@@ -507,16 +507,14 @@ class UnifiedDocumentProcessor:
507
 
508
  relevant_content.append('\n'.join(content_info))
509
 
510
- summary_prompt = f"""Based on the following content, please provide:
511
- 1. A concise answer to the question
512
- 2. Key supporting points
513
- 3. Related context if relevant
514
-
515
- Question: {question}
516
-
517
- Content:
518
- {'\n\n'.join(relevant_content)}
519
- """
520
 
521
  response = self.groq_client.chat.completions.create(
522
  messages=[{"role": "user", "content": summary_prompt}],
 
507
 
508
  relevant_content.append('\n'.join(content_info))
509
 
510
+ summary_prompt = (
511
+ f"Based on the following content, please provide:\n"
512
+ "1. A concise answer to the question\n"
513
+ "2. Key supporting points\n"
514
+ "3. Related context if relevant\n\n"
515
+ f"Question: {question}\n\n"
516
+ f"Content:\n{chr(10).join(relevant_content)}"
517
+ )
 
 
518
 
519
  response = self.groq_client.chat.completions.create(
520
  messages=[{"role": "user", "content": summary_prompt}],