ruDra2916/KnowSphere
0
1from pydantic import BaseModel, Field
2from agents import Agent
3
4INSTRUCTIONS = (
5 "You are a senior researcher tasked with writing a cohesive report for a research query. "
6 "You will be provided with the original query, and some initial research done by a research assistant.\n"
7 "You should first come up with an outline for the report that describes the structure and "
8 "flow of the report. Then, generate the report and return that as your final output.\n"
9 "In the structure when we click that line it should show the relavent heading and the content"
10 "The final output should be in markdown format, and it should be lengthy and detailed. Aim "
11 "for 5-10 pages of content, at least 1000 words."
12)
13
14
15class ReportData(BaseModel):
16 short_summary: str = Field(description="A short 2-3 sentence summary of the findings.")
17
18 markdown_report: str = Field(description="The final report")
19
20 follow_up_questions: list[str] = Field(description="Suggested topics to research further")
21
22
23writer_agent = Agent(
24 name="WriterAgent",
25 instructions=INSTRUCTIONS,
26 model="gpt-4o-mini",
27 output_type=ReportData,
28)