susmitsil commited on
Commit
f63ecdc
·
verified ·
1 Parent(s): df599d5

changed model

Browse files
Files changed (1) hide show
  1. app.py +16 -16
app.py CHANGED
@@ -16,23 +16,23 @@ 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
- google_api_key = os.getenv('GOOGLE_API_KEY')
21
- if google_api_key:
22
- print(f"GOOGLE_API_KEY found. Last 10 characters: ...{google_api_key[-10:]}")
23
- else:
24
- print("GOOGLE_API_KEY environment variable not set.")
25
 
26
- try:
27
- gemini_model_id = "google/gemini-2.0-flash"
28
- model = LiteLLMModel(model_id=gemini_model_id)
29
- # print("GPT-4o LLM is instantiated")
30
- print(f"{gemini_model_id} LLM instantiated using LiteLLM")
31
- except Exception as e:
32
- print(f"Error instantiating LLM: {e}")
33
- print("Please ensure you have installed smolagents[litellm] and google-generativeai,")
34
- print("and that your GOOGLE_API_KEY environment variable is set.")
35
- raise e # Re-raise the exception to fail initialization if model fails
36
 
37
  # Initialize the search tool
38
  search_tool = DuckDuckGoSearchTool()
 
16
  def __init__(self):
17
  print("Initializing the BasicAgent")
18
  # model = OpenAIServerModel(model_id="gpt-4o")
19
+ model = OpenAIServerModel(model_id="gpt-4o-mini")
20
+ # google_api_key = os.getenv('GOOGLE_API_KEY')
21
+ # if google_api_key:
22
+ # print(f"GOOGLE_API_KEY found. Last 10 characters: ...{google_api_key[-10:]}")
23
+ # else:
24
+ # print("GOOGLE_API_KEY environment variable not set.")
25
 
26
+ # try:
27
+ # gemini_model_id = "google/gemini-2.0-flash"
28
+ # model = LiteLLMModel(model_id=gemini_model_id)
29
+ # # print("GPT-4o LLM is instantiated")
30
+ # print(f"{gemini_model_id} LLM instantiated using LiteLLM")
31
+ # except Exception as e:
32
+ # print(f"Error instantiating LLM: {e}")
33
+ # print("Please ensure you have installed smolagents[litellm] and google-generativeai,")
34
+ # print("and that your GOOGLE_API_KEY environment variable is set.")
35
+ # raise e # Re-raise the exception to fail initialization if model fails
36
 
37
  # Initialize the search tool
38
  search_tool = DuckDuckGoSearchTool()