Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ from pydantic import BaseModel, Field
|
|
| 12 |
import nest_asyncio
|
| 13 |
import requests
|
| 14 |
import os, re
|
| 15 |
-
import
|
| 16 |
|
| 17 |
os.getenv("OPENAI_API_KEY")
|
| 18 |
os.getenv("GEMINI_API_KEY")
|
|
@@ -146,7 +146,11 @@ Follow this cycle until you find the answer:
|
|
| 146 |
web_search,
|
| 147 |
visit_website
|
| 148 |
],
|
| 149 |
-
model=
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
)
|
| 151 |
|
| 152 |
result = Runner.run_sync(
|
|
|
|
| 12 |
import nest_asyncio
|
| 13 |
import requests
|
| 14 |
import os, re
|
| 15 |
+
from agents.extensions.models.litellm_model import LitellmModel
|
| 16 |
|
| 17 |
os.getenv("OPENAI_API_KEY")
|
| 18 |
os.getenv("GEMINI_API_KEY")
|
|
|
|
| 146 |
web_search,
|
| 147 |
visit_website
|
| 148 |
],
|
| 149 |
+
model=LitellmModel(
|
| 150 |
+
model="gemini/gemini-pro", # This tells LiteLLM to route to Gemini
|
| 151 |
+
api_key=os.getenv("GEMINI_API_KEY")
|
| 152 |
+
)
|
| 153 |
+
|
| 154 |
)
|
| 155 |
|
| 156 |
result = Runner.run_sync(
|