Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,9 +34,8 @@ def call_groq(system_prompt: str, user_prompt: str, temperature: float = 0.7, ma
|
|
| 34 |
Calls the Groq chat completion API and returns the full combined response text.
|
| 35 |
Streams tokens and accumulates them into a final string.
|
| 36 |
"""
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
completion = client.chat.create (
|
| 40 |
model=GROQ_MODEL,
|
| 41 |
messages=[
|
| 42 |
{"role": "system", "content": system_prompt},
|
|
|
|
| 34 |
Calls the Groq chat completion API and returns the full combined response text.
|
| 35 |
Streams tokens and accumulates them into a final string.
|
| 36 |
"""
|
| 37 |
+
client = Groq(api_key = "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") # Uses GROQ_API_KEY env var
|
| 38 |
+
completion = client.chat.completions.create (
|
|
|
|
| 39 |
model=GROQ_MODEL,
|
| 40 |
messages=[
|
| 41 |
{"role": "system", "content": system_prompt},
|