susmitsil commited on
Commit
197e6ff
·
verified ·
1 Parent(s): 0e2b5c0

Applied gemini

Browse files
Files changed (1) hide show
  1. app.py +6 -3
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
- print("GPT-4o LLM is instantiated")
 
 
 
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")