| 6 | |
| 7 | |
| 8 | class CompanyResearchAgents(): |
| 9 | |
| 10 | def __init__(self): |
| 11 | self.searchInternetTool = SerperDevTool() |
| 12 | self.youtubeSearchTool = YoutubeVideoSearchTool() |
| 13 | self.llm = ChatOpenAI(model="gpt-4-turbo-preview") |
| 14 | |
| 15 | def research_manager(self, companies: List[str], positions: List[str]) -> Agent: |
| 16 | return Agent( |
| 17 | role="Company Research Manager", |
| 18 | goal=f"""Generate a list of JSON objects containing the urls for 3 recent blog articles and |
| 19 | the url and title for 3 recent YouTube interview, for each position in each company. |
| 20 | |
| 21 | Companies: {companies} |
| 22 | Positions: {positions} |
| 23 | |
| 24 | Important: |
| 25 | - The final list of JSON objects must include all companies and positions. Do not leave any out. |
| 26 | - If you can't find information for a specific position, fill in the information with the word "MISSING". |
| 27 | - Do not generate fake information. Only return the information you find. Nothing else! |
| 28 | - Do not stop researching until you find the requested information for each position in each company. |
| 29 | - All the companies and positions exist so keep researching until you find the information for each one. |
| 30 | - Make sure you each researched position for each company contains 3 blog articles and 3 YouTube interviews. |
| 31 | """, |
| 32 | backstory="""As a Company Research Manager, you are responsible for aggregating all the researched information |
| 33 | into a list.""", |
| 34 | llm=self.llm, |
| 35 | tools=[self.searchInternetTool, self.youtubeSearchTool], |
| 36 | verbose=True, |
| 37 | allow_delegation=True |
| 38 | ) |
| 39 | |
| 40 | def company_research_agent(self) -> Agent: |
| 41 | return Agent( |
| 42 | role="Company Research Agent", |
| 43 | goal="""Look up the specific positions for a given company and find urls for 3 recent blog articles and |
| 44 | the url and title for 3 recent YouTube interview for each person in the specified positions. It is your job to return this collected |
| 45 | information in a JSON object""", |
| 46 | backstory="""As a Company Research Agent, you are responsible for looking up specific positions |
| 47 | within a company and gathering relevant information. |
| 48 | |
| 49 | Important: |
| 50 | - Once you've found the information, immediately stop searching for additional information. |
| 51 | - Only return the requested information. NOTHING ELSE! |
| 52 | - Make sure you find the persons name who holds the position. |
| 53 | - Do not generate fake information. Only return the information you find. Nothing else! |
| 54 | """, |
| 55 | tools=[self.searchInternetTool, self.youtubeSearchTool], |
| 56 | llm=self.llm, |
| 57 | verbose=True |
| 58 | ) |