100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
Merge pull request #109 from Madhuvod/revamp-competitor-agent
Shubham Saboo12f1fa0cb3db
diff --cc ai_agent_tutorials/ai_competitor_intelligence_agent_team/competitor_agent_team.pyindex cf139044,d403cccf..2c9052d2--- a/ai_agent_tutorials/ai_competitor_intelligence_agent_team/competitor_agent_team.py+++ b/ai_agent_tutorials/ai_competitor_intelligence_agent_team/competitor_agent_team.py@@@ -13,18 -18,36 +18,36 @@@ st.set_page_config(page_title="AI Compest.sidebar.title("API Keys")openai_api_key = st.sidebar.text_input("OpenAI API Key", type="password")firecrawl_api_key = st.sidebar.text_input("Firecrawl API Key", type="password")- exa_api_key = st.sidebar.text_input("Exa API Key", type="password")- # Store API keys in session state- if openai_api_key and firecrawl_api_key and exa_api_key:- st.session_state.openai_api_key = openai_api_key- st.session_state.firecrawl_api_key = firecrawl_api_key- st.session_state.exa_api_key = exa_api_key- else:- st.sidebar.warning("Please enter all API keys to proceed.")+ # Add search engine selection before API keys+ search_engine = st.sidebar.selectbox(+ "Select Search Endpoint",+ options=["Perplexity AI - Sonar Pro", "Exa AI"],+ help="Choose which AI service to use for finding competitor URLs"+ )++ # Show relevant API key input based on selection+ if search_engine == "Perplexity AI - Sonar Pro":+ perplexity_api_key = st.sidebar.text_input("Perplexity API Key", type="password")+ # Store API keys in session state+ if openai_api_key and firecrawl_api_key and perplexity_api_key:+ st.session_state.openai_api_key = openai_api_key+ st.session_state.firecrawl_api_key = firecrawl_api_key+ st.session_state.perplexity_api_key = perplexity_api_key+ else:+ st.sidebar.warning("Please enter all required API keys to proceed.")+ else: # Exa AI+ exa_api_key = st.sidebar.text_input("Exa API Key", type="password")+ # Store API keys in session state+ if openai_api_key and firecrawl_api_key and exa_api_key:+ st.session_state.openai_api_key = openai_api_key+ st.session_state.firecrawl_api_key = firecrawl_api_key+ st.session_state.exa_api_key = exa_api_key+ else:+ st.sidebar.warning("Please enter all required API keys to proceed.")# Main UI-st.title("🧲 AI Competitor Intelligence Agent")+st.title("🧲 AI Competitor Intelligence Agent Team")st.info("""This app helps businesses analyze their competitors by extracting structured data from competitor websites and generating insights using AI.