Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -95,7 +95,7 @@ def generate_response(query, retriever=None, use_web_search=False, scrape_web=Fa
|
|
| 95 |
|
| 96 |
chat_history = memory.load_memory_variables({}).get("chat_history", "")
|
| 97 |
context = (
|
| 98 |
-
f"This is a conversation with
|
| 99 |
f"to help with tasks like answering questions in Persian, providing recommendations, and decision-making."
|
| 100 |
)
|
| 101 |
if knowledge:
|
|
@@ -103,7 +103,7 @@ def generate_response(query, retriever=None, use_web_search=False, scrape_web=Fa
|
|
| 103 |
if chat_history:
|
| 104 |
context += f"\n\nChat History:\n{chat_history}"
|
| 105 |
|
| 106 |
-
context += f"\n\nYou: {query}\
|
| 107 |
|
| 108 |
chat_completion = client.chat.completions.create(
|
| 109 |
messages=[{"role": "user", "content": context}],
|
|
|
|
| 95 |
|
| 96 |
chat_history = memory.load_memory_variables({}).get("chat_history", "")
|
| 97 |
context = (
|
| 98 |
+
f"This is a conversation with SanaGPT, an AI model designed by sepehr arya from kashan University of Technology (KUT), "
|
| 99 |
f"to help with tasks like answering questions in Persian, providing recommendations, and decision-making."
|
| 100 |
)
|
| 101 |
if knowledge:
|
|
|
|
| 103 |
if chat_history:
|
| 104 |
context += f"\n\nChat History:\n{chat_history}"
|
| 105 |
|
| 106 |
+
context += f"\n\nYou: {query}\nSanaGPT:"
|
| 107 |
|
| 108 |
chat_completion = client.chat.completions.create(
|
| 109 |
messages=[{"role": "user", "content": context}],
|