Spaces:
Runtime error
Runtime error
Jainish1808 commited on
Commit ·
39ac481
1
Parent(s): 7962bae
Fix LLM check - remove incorrect model attribute check
Browse files
main.py
CHANGED
|
@@ -408,7 +408,7 @@ class RAGSystem:
|
|
| 408 |
logger.info("📝 No relevant documents found, using LLM for direct conversation")
|
| 409 |
|
| 410 |
# Use LLM for general conversation
|
| 411 |
-
if self.llm
|
| 412 |
prompt = f"""You're a helpful, smart, and friendly AI assistant. Answer the user's question naturally and conversationally.
|
| 413 |
|
| 414 |
Question: {question}
|
|
@@ -444,7 +444,7 @@ Answer:"""
|
|
| 444 |
scores.append(float(score))
|
| 445 |
|
| 446 |
# Generate answer using LLM with document context (RAG mode)
|
| 447 |
-
if self.llm
|
| 448 |
context_text = "\n\n".join(contexts)
|
| 449 |
prompt = f"""You're a helpful AI assistant. Answer the user's question based on the context provided below.
|
| 450 |
|
|
|
|
| 408 |
logger.info("📝 No relevant documents found, using LLM for direct conversation")
|
| 409 |
|
| 410 |
# Use LLM for general conversation
|
| 411 |
+
if self.llm:
|
| 412 |
prompt = f"""You're a helpful, smart, and friendly AI assistant. Answer the user's question naturally and conversationally.
|
| 413 |
|
| 414 |
Question: {question}
|
|
|
|
| 444 |
scores.append(float(score))
|
| 445 |
|
| 446 |
# Generate answer using LLM with document context (RAG mode)
|
| 447 |
+
if self.llm:
|
| 448 |
context_text = "\n\n".join(contexts)
|
| 449 |
prompt = f"""You're a helpful AI assistant. Answer the user's question based on the context provided below.
|
| 450 |
|