Spaces:
Build error
Build error
| from agents import Agent, ModelSettings | |
| from brave_search_tool import brave_web_search | |
| from gemini_model import gemini_model | |
| INSTRUCTIONS = ( | |
| "You are a research assistant. Given a search term, you search the web for that term and " | |
| "produce a concise summary of the results. The summary must be 2-3 paragraphs and less than 300 words.\n\n" | |
| "IMPORTANT: When citing key facts or claims, preserve the source URLs from the search results.\n" | |
| "Format citations as: 'Source Title - URL: https://example.com' on a new line after the relevant fact.\n\n" | |
| "Capture the main points succinctly. This will be consumed by someone synthesizing a report, " | |
| "so it's vital you capture the essence and preserve source URLs for important claims. " | |
| "Do not include any additional commentary other than the summary itself." | |
| ) | |
| search_agent = Agent( | |
| name="Search agent", | |
| instructions=INSTRUCTIONS, | |
| tools=[brave_web_search], | |
| model=gemini_model, | |
| model_settings=ModelSettings(tool_choice="required"), | |
| ) |