Spaces:
Sleeping
Sleeping
Update phase3_agents.py
Browse files- phase3_agents.py +10 -8
phase3_agents.py
CHANGED
|
@@ -4,7 +4,7 @@ from phi.model.openai import OpenAIChat
|
|
| 4 |
import markdown2
|
| 5 |
import pdfkit
|
| 6 |
from bni_agent import get_bni_benefits
|
| 7 |
-
|
| 8 |
|
| 9 |
# Load environment variables (API keys, etc.)
|
| 10 |
from dotenv import load_dotenv
|
|
@@ -110,18 +110,19 @@ def get_bni_membership_benefits(company_data: str) -> str:
|
|
| 110 |
##############################
|
| 111 |
# 5️⃣ BNI RAG Agent: Pearl Chapter Connections #
|
| 112 |
##############################
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
|
| 117 |
|
| 118 |
##############################
|
| 119 |
# 6️⃣ Report Generation Agent #
|
| 120 |
##############################
|
| 121 |
-
def generate_report(company_name: str, company_data: str,
|
| 122 |
-
ai_strategy: str,
|
| 123 |
revenue_opportunities: str,
|
| 124 |
-
bni_benefits: str
|
|
|
|
| 125 |
"""
|
| 126 |
Generates a structured AI strategy report in PDF format using `pdfkit`.
|
| 127 |
|
|
@@ -150,7 +151,8 @@ def generate_report(company_name: str, company_data: str, #industry_trends: str,
|
|
| 150 |
## 4️⃣ How BNI Can Help Your Business
|
| 151 |
{bni_benefits}
|
| 152 |
|
| 153 |
-
|
|
|
|
| 154 |
|
| 155 |
"""
|
| 156 |
|
|
|
|
| 4 |
import markdown2
|
| 5 |
import pdfkit
|
| 6 |
from bni_agent import get_bni_benefits
|
| 7 |
+
from rag_agent import recommend_bni_connections
|
| 8 |
|
| 9 |
# Load environment variables (API keys, etc.)
|
| 10 |
from dotenv import load_dotenv
|
|
|
|
| 110 |
##############################
|
| 111 |
# 5️⃣ BNI RAG Agent: Pearl Chapter Connections #
|
| 112 |
##############################
|
| 113 |
+
def get_bni_recommendations(company_data: str) -> str:
|
| 114 |
+
"""Recommends relevant BNI Pearl Chapter members based on the user's company data."""
|
| 115 |
+
return recommend_bni_connections(company_data)
|
| 116 |
|
| 117 |
|
| 118 |
##############################
|
| 119 |
# 6️⃣ Report Generation Agent #
|
| 120 |
##############################
|
| 121 |
+
def generate_report(company_name: str, company_data: str,
|
| 122 |
+
ai_strategy: str,
|
| 123 |
revenue_opportunities: str,
|
| 124 |
+
bni_benefits: str,
|
| 125 |
+
bni_connections: str) -> str:
|
| 126 |
"""
|
| 127 |
Generates a structured AI strategy report in PDF format using `pdfkit`.
|
| 128 |
|
|
|
|
| 151 |
## 4️⃣ How BNI Can Help Your Business
|
| 152 |
{bni_benefits}
|
| 153 |
|
| 154 |
+
## 5️⃣ Recommended BNI Pearl Chapter Connections
|
| 155 |
+
{bni_connections} # ✅ Added this placeholder
|
| 156 |
|
| 157 |
"""
|
| 158 |
|