Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,15 +74,16 @@ Context:
|
|
| 74 |
Question:
|
| 75 |
{query}"""
|
| 76 |
|
|
|
|
| 77 |
response = client.chat.completions.create(
|
| 78 |
-
model="llama-3.
|
| 79 |
messages=[{"role": "user", "content": prompt}],
|
| 80 |
temperature=0.7,
|
| 81 |
max_tokens=500
|
| 82 |
)
|
| 83 |
|
| 84 |
return response.choices[0].message.content
|
| 85 |
-
|
| 86 |
def chat(user_input, history):
|
| 87 |
answer = generate_answer(user_input)
|
| 88 |
history.append((user_input, answer))
|
|
|
|
| 74 |
Question:
|
| 75 |
{query}"""
|
| 76 |
|
| 77 |
+
# ✅ Use currently available Groq model (April 2026)
|
| 78 |
response = client.chat.completions.create(
|
| 79 |
+
model="llama-3.1-8b-instant", # Fast & reliable
|
| 80 |
messages=[{"role": "user", "content": prompt}],
|
| 81 |
temperature=0.7,
|
| 82 |
max_tokens=500
|
| 83 |
)
|
| 84 |
|
| 85 |
return response.choices[0].message.content
|
| 86 |
+
|
| 87 |
def chat(user_input, history):
|
| 88 |
answer = generate_answer(user_input)
|
| 89 |
history.append((user_input, answer))
|