Spaces:
Sleeping
Sleeping
Update app/utils/groq_client.py
Browse files- app/utils/groq_client.py +4 -3
app/utils/groq_client.py
CHANGED
|
@@ -47,6 +47,7 @@ class GroqClient:
|
|
| 47 |
max_tokens=1024,
|
| 48 |
top_p=1,
|
| 49 |
stop=None,
|
|
|
|
| 50 |
)
|
| 51 |
response_content = chat_completion.choices[0].message.content
|
| 52 |
questions = [q.strip() for q in response_content.strip().split("\n") if q.strip()]
|
|
@@ -116,9 +117,9 @@ class GroqClient:
|
|
| 116 |
top_p=1,
|
| 117 |
stop=None,
|
| 118 |
)
|
| 119 |
-
|
| 120 |
-
print(
|
| 121 |
-
|
| 122 |
# Validate if the output is valid JSON
|
| 123 |
try:
|
| 124 |
json.loads(json_output)
|
|
|
|
| 47 |
max_tokens=1024,
|
| 48 |
top_p=1,
|
| 49 |
stop=None,
|
| 50 |
+
|
| 51 |
)
|
| 52 |
response_content = chat_completion.choices[0].message.content
|
| 53 |
questions = [q.strip() for q in response_content.strip().split("\n") if q.strip()]
|
|
|
|
| 117 |
top_p=1,
|
| 118 |
stop=None,
|
| 119 |
)
|
| 120 |
+
json_output = chat_completion.choices[0].message.content
|
| 121 |
+
print(json_output)
|
| 122 |
+
|
| 123 |
# Validate if the output is valid JSON
|
| 124 |
try:
|
| 125 |
json.loads(json_output)
|