Spaces:
Sleeping
Sleeping
Update planner_agent.py
Browse files- planner_agent.py +7 -0
planner_agent.py
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
from pydantic import BaseModel, Field
|
| 2 |
from agents import Agent, AsyncOpenAI, OpenAIChatCompletionsModel
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
HOW_MANY_SEARCHES = 5
|
| 5 |
|
| 6 |
INSTRUCTIONS = f"You are a helpful research assistant. Given a query, come up with a set of web searches \
|
|
|
|
| 1 |
from pydantic import BaseModel, Field
|
| 2 |
from agents import Agent, AsyncOpenAI, OpenAIChatCompletionsModel
|
| 3 |
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
gemini_client = AsyncOpenAI(base_url="https://generativelanguage.googleapis.com/v1beta/openai/", api_key=os.getenv('GOOGLE_API_KEY'))
|
| 7 |
+
|
| 8 |
+
gemini_model = OpenAIChatCompletionsModel(model="gemini-2.0-flash", openai_client=gemini_client)
|
| 9 |
+
|
| 10 |
+
|
| 11 |
HOW_MANY_SEARCHES = 5
|
| 12 |
|
| 13 |
INSTRUCTIONS = f"You are a helpful research assistant. Given a query, come up with a set of web searches \
|