GenAICoder commited on
Commit
06e7b96
·
verified ·
1 Parent(s): 6e48dc6

Update analytics/ai_assistant.py

Browse files
Files changed (1) hide show
  1. analytics/ai_assistant.py +3 -1
analytics/ai_assistant.py CHANGED
@@ -199,6 +199,8 @@ def _infer_data_request(question: str, as_of_month: str | None = None, segment:
199
  temperature=0.0,
200
  top_p=0.95
201
  )
 
 
202
  text = response.choices[0].message.content if hasattr(response, 'choices') else str(response)
203
  spec = _extract_json(text)
204
  if not spec:
@@ -341,6 +343,6 @@ def generate_ai_answer(question: str, df: pd.DataFrame, as_of_month: str | None
341
  temperature=HF_TEMPERATURE,
342
  top_p=0.95
343
  )
344
-
345
  output_text = response.choices[0].message.content if hasattr(response, 'choices') else (response[0].get('generated_text') if isinstance(response, list) else str(response))
346
  return output_text
 
199
  temperature=0.0,
200
  top_p=0.95
201
  )
202
+
203
+ print(response.choices[0].message.content)
204
  text = response.choices[0].message.content if hasattr(response, 'choices') else str(response)
205
  spec = _extract_json(text)
206
  if not spec:
 
343
  temperature=HF_TEMPERATURE,
344
  top_p=0.95
345
  )
346
+ print(response.choices[0].message.content)
347
  output_text = response.choices[0].message.content if hasattr(response, 'choices') else (response[0].get('generated_text') if isinstance(response, list) else str(response))
348
  return output_text