Spaces:
Running
Running
Update eb_agent_module.py
Browse files- 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
|
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) ->
|
812 |
"""Factory function to create a new agent instance"""
|
813 |
logging.info("Creating new EnhancedEmployerBrandingAgent instance via helper function.")
|
814 |
-
return
|
815 |
|
816 |
-
async def initialize_agent_async(agent:
|
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()
|