Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ def call_groq_api(prompt):
|
|
| 21 |
return "Error: GROQ_API_KEY environment variable not set."
|
| 22 |
|
| 23 |
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
|
| 24 |
-
data = {"model": "llama3-
|
| 25 |
|
| 26 |
try:
|
| 27 |
response = requests.post("https://api.groq.com/openai/v1/chat/completions", json=data, headers=headers)
|
|
|
|
| 21 |
return "Error: GROQ_API_KEY environment variable not set."
|
| 22 |
|
| 23 |
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
|
| 24 |
+
data = {"model": "llama3-70b-8192", "messages": [{"role": "user", "content": prompt}]}
|
| 25 |
|
| 26 |
try:
|
| 27 |
response = requests.post("https://api.groq.com/openai/v1/chat/completions", json=data, headers=headers)
|