Update app.py
Browse filesAdded gemini model and google search tool
app.py
CHANGED
|
@@ -11,6 +11,16 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 11 |
# --- Basic Agent Definition ---
|
| 12 |
# Agent capabilities required: Search the web, listen to audio recordings, watch YouTube videos (process the footage, not the transcript), work with Excel spreadsheets
|
| 13 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
class BasicAgent:
|
| 15 |
def __init__(self):
|
| 16 |
print("BasicAgent initialized.")
|
|
|
|
| 11 |
# --- Basic Agent Definition ---
|
| 12 |
# Agent capabilities required: Search the web, listen to audio recordings, watch YouTube videos (process the footage, not the transcript), work with Excel spreadsheets
|
| 13 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 14 |
+
|
| 15 |
+
llm_model = LiteLLMModel(
|
| 16 |
+
model_id="gemini/gemini-2.0-flash", # you can see other model names here: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models. It is important to prefix the name with "gemini/"
|
| 17 |
+
api_key=GEMINI_API_KEY,
|
| 18 |
+
max_tokens=8192
|
| 19 |
+
)
|
| 20 |
+
google_search_tool = Tool(
|
| 21 |
+
google_search = GoogleSearch()
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
class BasicAgent:
|
| 25 |
def __init__(self):
|
| 26 |
print("BasicAgent initialized.")
|