Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -128,7 +128,8 @@ def fetch_website_text(url):
|
|
| 128 |
# --- FUNCTION: Ask Groq API using official client ---
|
| 129 |
def ask_groq(context, question):
|
| 130 |
messages = [
|
| 131 |
-
|
|
|
|
| 132 |
{"role": "user", "content": f"Context: {context}\n\nQuestion: {question}\nAnswer:"}
|
| 133 |
]
|
| 134 |
chat_completion = groq_client.chat.completions.create(
|
|
|
|
| 128 |
# --- FUNCTION: Ask Groq API using official client ---
|
| 129 |
def ask_groq(context, question):
|
| 130 |
messages = [
|
| 131 |
+
"role": "system", "content": f"You are a helpful assistant. Always include full clickable URLs in your answers. The base website is {website_url}."
|
| 132 |
+
|
| 133 |
{"role": "user", "content": f"Context: {context}\n\nQuestion: {question}\nAnswer:"}
|
| 134 |
]
|
| 135 |
chat_completion = groq_client.chat.completions.create(
|