fix(agent_prompts): remove duplicate MATH_AGENT_PROMPT definition and fix server transport config

pull/819/head
Pavan Kumar 3 months ago committed by ascender1729
parent 802a489805
commit 725f304448

@ -22,4 +22,4 @@ def divide(a: int, b: int) -> float:
if __name__ == "__main__": if __name__ == "__main__":
print("Starting Mock Math Server on port 8000...") print("Starting Mock Math Server on port 8000...")
mcp.run(transport="sse", port=8000) mcp.run(transport="sse", transport_kwargs={"port": 8000, "host": "0.0.0.0"})

@ -10,15 +10,6 @@ Key responsibilities:
Remember to use the available MCP tools for calculations rather than doing them directly.""" Remember to use the available MCP tools for calculations rather than doing them directly."""
MATH_AGENT_PROMPT = """You are a specialized math agent that can perform calculations by calling external math service APIs.
Key responsibilities:
1. Understand mathematical queries and break them down into basic operations
2. Use available math tools (add, multiply, divide) appropriately
3. Provide clear explanations of calculations
4. Handle errors gracefully if operations fail
Remember to use the available MCP tools for calculations rather than doing them directly."""
FINANCE_AGENT_PROMPT = """You are a financial analysis agent with access to stock market data services. FINANCE_AGENT_PROMPT = """You are a financial analysis agent with access to stock market data services.
Key responsibilities: Key responsibilities:
1. Interpret financial queries and determine required data 1. Interpret financial queries and determine required data
@ -64,7 +55,6 @@ def generate_agent_role_prompt(agent):
return prompts.get(agent, "No such agent") return prompts.get(agent, "No such agent")
def generate_report_prompt(question, research_summary): def generate_report_prompt(question, research_summary):
"""Generates the report prompt for the given question and research summary. """Generates the report prompt for the given question and research summary.
Args: question (str): The question to generate the report prompt for Args: question (str): The question to generate the report prompt for
@ -83,7 +73,6 @@ def generate_report_prompt(question, research_summary):
" format" " format"
) )
def generate_search_queries_prompt(question): def generate_search_queries_prompt(question):
"""Generates the search queries prompt for the given question. """Generates the search queries prompt for the given question.
Args: question (str): The question to generate the search queries prompt for Args: question (str): The question to generate the search queries prompt for
@ -97,7 +86,6 @@ def generate_search_queries_prompt(question):
' ["query 1", "query 2", "query 3", "query 4"]' ' ["query 1", "query 2", "query 3", "query 4"]'
) )
def generate_resource_report_prompt(question, research_summary): def generate_resource_report_prompt(question, research_summary):
"""Generates the resource report prompt for the given question and research summary. """Generates the resource report prompt for the given question and research summary.
@ -122,7 +110,6 @@ def generate_resource_report_prompt(question, research_summary):
" should have a minimum length of 1,200 words." " should have a minimum length of 1,200 words."
) )
def generate_outline_report_prompt(question, research_summary): def generate_outline_report_prompt(question, research_summary):
"""Generates the outline report prompt for the given question and research summary. """Generates the outline report prompt for the given question and research summary.
Args: question (str): The question to generate the outline report prompt for Args: question (str): The question to generate the outline report prompt for
@ -142,7 +129,6 @@ def generate_outline_report_prompt(question, research_summary):
" format the outline and ensure readability." " format the outline and ensure readability."
) )
def generate_concepts_prompt(question, research_summary): def generate_concepts_prompt(question, research_summary):
"""Generates the concepts prompt for the given question. """Generates the concepts prompt for the given question.
Args: question (str): The question to generate the concepts prompt for Args: question (str): The question to generate the concepts prompt for
@ -160,7 +146,6 @@ def generate_concepts_prompt(question, research_summary):
' "concepts 4, concepts 5"]' ' "concepts 4, concepts 5"]'
) )
def generate_lesson_prompt(concept): def generate_lesson_prompt(concept):
""" """
Generates the lesson prompt for the given question. Generates the lesson prompt for the given question.
@ -180,7 +165,6 @@ def generate_lesson_prompt(concept):
return prompt return prompt
def get_report_by_type(report_type): def get_report_by_type(report_type):
report_type_mapping = { report_type_mapping = {
"research_report": generate_report_prompt, "research_report": generate_report_prompt,

Loading…
Cancel
Save