Applied gemini
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import requests
|
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
|
7 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool, OpenAIServerModel
|
8 |
|
9 |
# (Keep Constants as is)
|
10 |
# --- Constants ---
|
@@ -16,8 +16,11 @@ class BasicAgent:
|
|
16 |
def __init__(self):
|
17 |
print("Initializing the BasicAgent")
|
18 |
# model = OpenAIServerModel(model_id="gpt-4o")
|
19 |
-
model = OpenAIServerModel(model_id="gpt-3.5-turbo")
|
20 |
-
|
|
|
|
|
|
|
21 |
# Initialize the search tool
|
22 |
search_tool = DuckDuckGoSearchTool()
|
23 |
print("DuckDuckSearchTool instantiated")
|
|
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
|
7 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, OpenAIServerModel, LiteLLMModel
|
8 |
|
9 |
# (Keep Constants as is)
|
10 |
# --- Constants ---
|
|
|
16 |
def __init__(self):
|
17 |
print("Initializing the BasicAgent")
|
18 |
# model = OpenAIServerModel(model_id="gpt-4o")
|
19 |
+
# model = OpenAIServerModel(model_id="gpt-3.5-turbo")
|
20 |
+
gemini_model_id = "gemini/gemini-2.0-flash"
|
21 |
+
model = LiteLLMModel(model_id=gemini_model_id)
|
22 |
+
# print("GPT-4o LLM is instantiated")
|
23 |
+
print(f"{gemini_model_id} LLM instantiated using LiteLLM")
|
24 |
# Initialize the search tool
|
25 |
search_tool = DuckDuckGoSearchTool()
|
26 |
print("DuckDuckSearchTool instantiated")
|