Spaces:
Sleeping
Sleeping
Update search_agent.py
Browse files- search_agent.py +6 -0
search_agent.py
CHANGED
|
@@ -1,5 +1,11 @@
|
|
| 1 |
from agents import Agent, WebSearchTool, ModelSettings
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
INSTRUCTIONS = (
|
| 4 |
"You are a research assistant. Given a search term, you search the web for that term and "
|
| 5 |
"produce a concise summary of the results. The summary must 2-3 paragraphs and less than 300 "
|
|
|
|
| 1 |
from agents import Agent, WebSearchTool, ModelSettings
|
| 2 |
|
| 3 |
+
|
| 4 |
+
gemini_client = AsyncOpenAI(base_url="https://generativelanguage.googleapis.com/v1beta/openai/", api_key=os.getenv('GOOGLE_API_KEY'))
|
| 5 |
+
|
| 6 |
+
gemini_model = OpenAIChatCompletionsModel(model="gemini-2.0-flash", openai_client=gemini_client)
|
| 7 |
+
|
| 8 |
+
|
| 9 |
INSTRUCTIONS = (
|
| 10 |
"You are a research assistant. Given a search term, you search the web for that term and "
|
| 11 |
"produce a concise summary of the results. The summary must 2-3 paragraphs and less than 300 "
|