Spaces:
Running
Running
Update insight_and_tasks/agents/follower_agent.py
Browse files
insight_and_tasks/agents/follower_agent.py
CHANGED
@@ -366,12 +366,12 @@ class EnhancedFollowerAnalysisAgent:
|
|
366 |
if not pai.config.get("llm"): # Check if LLM is set for PandasAI
|
367 |
logger.warning("PandasAI LLM not configured. Attempting to configure now.")
|
368 |
# This assumes configure_pandasai is available and sets pai.config.llm
|
369 |
-
from utils.pandasai_setup import configure_pandasai
|
370 |
configure_pandasai(self.api_key, self.model_name)
|
371 |
-
if not pai.config.llm:
|
372 |
raise RuntimeError("PandasAI LLM could not be configured for chat operation.")
|
373 |
|
374 |
-
logger.info(f"Executing PandasAI chat for follower analysis with LLM: {pai.config.llm}")
|
375 |
return pandas_ai_df.chat(analysis_query)
|
376 |
|
377 |
analysis_result_raw = self.retry_mechanism.retry_with_backoff(
|
|
|
366 |
if not pai.config.get("llm"): # Check if LLM is set for PandasAI
|
367 |
logger.warning("PandasAI LLM not configured. Attempting to configure now.")
|
368 |
# This assumes configure_pandasai is available and sets pai.config.llm
|
369 |
+
from insight_and_tasks.utils.pandasai_setup import configure_pandasai
|
370 |
configure_pandasai(self.api_key, self.model_name)
|
371 |
+
if not pai.config.get("llm"):
|
372 |
raise RuntimeError("PandasAI LLM could not be configured for chat operation.")
|
373 |
|
374 |
+
logger.info(f"Executing PandasAI chat for follower analysis with LLM: {pai.config.get("llm")}")
|
375 |
return pandas_ai_df.chat(analysis_query)
|
376 |
|
377 |
analysis_result_raw = self.retry_mechanism.retry_with_backoff(
|