GuglielmoTor commited on
Commit
9605646
·
verified ·
1 Parent(s): 4568522

Update eb_agent_module.py

Browse files
Files changed (1) hide show
  1. eb_agent_module.py +4 -4
eb_agent_module.py CHANGED
@@ -318,7 +318,7 @@ class AdvancedRAGSystem:
318
  logging.error(f"Error during RAG retrieval for query '{query[:50]}...': {e}", exc_info=True)
319
  return ""
320
 
321
- class EnhancedEmployerBrandingAgent:
322
  def __init__(self,
323
  all_dataframes: Optional[Dict[str, pd.DataFrame]] = None,
324
  rag_documents_df: Optional[pd.DataFrame] = None,
@@ -808,12 +808,12 @@ class EnhancedEmployerBrandingAgent:
808
 
809
  # --- Helper Functions for External Integration ---
810
  def create_agent_instance(dataframes: Optional[Dict[str, pd.DataFrame]] = None,
811
- rag_docs: Optional[pd.DataFrame] = None) -> EnhancedEmployerBrandingAgent:
812
  """Factory function to create a new agent instance"""
813
  logging.info("Creating new EnhancedEmployerBrandingAgent instance via helper function.")
814
- return EnhancedEmployerBrandingAgent(all_dataframes=dataframes, rag_documents_df=rag_docs)
815
 
816
- async def initialize_agent_async(agent: EnhancedEmployerBrandingAgent) -> bool:
817
  """Async helper to initialize an agent instance"""
818
  logging.info("Initializing agent via async helper function.")
819
  return await agent.initialize()
 
318
  logging.error(f"Error during RAG retrieval for query '{query[:50]}...': {e}", exc_info=True)
319
  return ""
320
 
321
+ class EmployerBrandingAgent:
322
  def __init__(self,
323
  all_dataframes: Optional[Dict[str, pd.DataFrame]] = None,
324
  rag_documents_df: Optional[pd.DataFrame] = None,
 
808
 
809
  # --- Helper Functions for External Integration ---
810
  def create_agent_instance(dataframes: Optional[Dict[str, pd.DataFrame]] = None,
811
+ rag_docs: Optional[pd.DataFrame] = None) -> EmployerBrandingAgent:
812
  """Factory function to create a new agent instance"""
813
  logging.info("Creating new EnhancedEmployerBrandingAgent instance via helper function.")
814
+ return EmployerBrandingAgent(all_dataframes=dataframes, rag_documents_df=rag_docs)
815
 
816
+ async def initialize_agent_async(agent: EmployerBrandingAgent) -> bool:
817
  """Async helper to initialize an agent instance"""
818
  logging.info("Initializing agent via async helper function.")
819
  return await agent.initialize()