Aditya0619 commited on
Commit
4c3ff1f
·
verified ·
1 Parent(s): b9a043d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -12,12 +12,17 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
12
  # --- Basic Agent Definition ---
13
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
14
  class BasicAgent:
15
- def __init__(self, openai_key):
16
- self.openai_key = openai_key
17
  print("BasicAgent initialized.")
18
  # Initialize the model
19
  #model = HfApiModel()
20
- model = OpenAIServerModel(model_id="gpt-4.1", api_key=self.openai_key)
 
 
 
 
 
21
  # Initialize the search tool
22
  search_tool = DuckDuckGoSearchTool()
23
  # Initialize Agent
 
12
  # --- Basic Agent Definition ---
13
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
14
  class BasicAgent:
15
+ def __init__(self, GOOGLE_API_KEY):
16
+ self.GOOGLE_API_KEY = GOOGLE_API_KEY
17
  print("BasicAgent initialized.")
18
  # Initialize the model
19
  #model = HfApiModel()
20
+ model = OpenAIServerModel(
21
+ model_id="gemini-2.5-flash",
22
+ # Google Gemini OpenAI-compatible API base URL
23
+ api_base="https://generativelanguage.googleapis.com/v1beta/openai/",
24
+ api_key=GOOGLE_API_KEY
25
+ )
26
  # Initialize the search tool
27
  search_tool = DuckDuckGoSearchTool()
28
  # Initialize Agent