yasserrmd commited on
Commit
cf6f63a
·
verified ·
1 Parent(s): dca45c3

Update app/utils/groq_client.py

Browse files
Files changed (1) hide show
  1. 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
- text_output = chat_completion.choices[0].message.content
120
- print(text_output)
121
- json_output = self.extract_json(text_output)
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)