feat: updated ai_research_agent

This commit is contained in:
ShubhamSaboo 2025-03-16 20:50:09 -05:00
parent 4880ace233
commit 08754ce6b0
2 changed files with 5 additions and 7 deletions

View file

@ -8,8 +8,8 @@ from agents.tool import function_tool
# Set page configuration # Set page configuration
st.set_page_config( st.set_page_config(
page_title="Enhanced Research Assistant", page_title="OpenAI Deep Research Agent",
page_icon="🔍", page_icon="📘",
layout="wide" layout="wide"
) )
@ -40,7 +40,7 @@ with st.sidebar:
st.session_state.firecrawl_api_key = firecrawl_api_key st.session_state.firecrawl_api_key = firecrawl_api_key
# Main content # Main content
st.title("🔍 Enhanced Deep Research Agent") st.title("📘 OpenAI Deep Research Agent")
st.markdown("This OpenAI Agent from the OpenAI Agents SDK performs deep research on any topic using Firecrawl") st.markdown("This OpenAI Agent from the OpenAI Agents SDK performs deep research on any topic using Firecrawl")
# Research topic input # Research topic input
@ -100,7 +100,8 @@ research_agent = Agent(
3. Review the research results and organize them into a well-structured report 3. Review the research results and organize them into a well-structured report
4. Include proper citations for all sources 4. Include proper citations for all sources
5. Highlight key findings and insights 5. Highlight key findings and insights
""" """,
tools=[deep_research]
) )
elaboration_agent = Agent( elaboration_agent = Agent(
@ -122,9 +123,6 @@ elaboration_agent = Agent(
""" """
) )
# Attach the deep research tool to the research agent
research_agent.tools.append(deep_research)
async def run_research_process(topic: str): async def run_research_process(topic: str):
"""Run the complete research process.""" """Run the complete research process."""
# Step 1: Initial Research # Step 1: Initial Research