GuglielmoTor commited on
Commit
c0df812
·
verified ·
1 Parent(s): bb83b35

Update insight_and_tasks/agents/follower_agent.py

Browse files
insight_and_tasks/agents/follower_agent.py CHANGED
@@ -363,7 +363,7 @@ class EnhancedFollowerAnalysisAgent:
363
  # Ensure the LLM for PandasAI is correctly configured before this call
364
  # This might involve re-calling configure_pandasai if it's not persistent
365
  # or if the LLM object needs to be explicitly passed to PandasAI DataFrame.
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
 
363
  # Ensure the LLM for PandasAI is correctly configured before this call
364
  # This might involve re-calling configure_pandasai if it's not persistent
365
  # or if the LLM object needs to be explicitly passed to PandasAI DataFrame.
366
+ if not hasattr(pai.config, '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