axel-darmouni commited on
Commit
244cc53
Β·
1 Parent(s): 6122d6e

all gemini

Browse files
Files changed (5) hide show
  1. README.md +3 -3
  2. agent.py +2 -3
  3. app.py +2 -3
  4. followup_agent.py +2 -3
  5. tools/retrieval_tools.py +2 -3
README.md CHANGED
@@ -67,7 +67,7 @@ tag: agent-demo-track
67
  ### 1. Prerequisites
68
 
69
  - Python 3.8+
70
- - Mistral API key
71
 
72
  ### 2. Installation
73
 
@@ -85,7 +85,7 @@ pip install -r requirements.txt
85
  Create a `.env` file in the project root:
86
 
87
  ```bash
88
- Mistral_API_KEY=your_Mistral_api_key_here
89
  ```
90
 
91
  ### 4. Launch the Application
@@ -170,7 +170,7 @@ After the initial analysis is complete:
170
 
171
  - **Frontend**: Gradio with custom CSS and real-time progress
172
  - **AI Agents**:
173
- - Primary SmolAgents powered by Mistral Medium Latest
174
  - Specialized follow-up agent for interactive analysis ⭐
175
  - **Search**: BM25 keyword matching with TF-IDF preprocessing
176
  - **Translation**: LLM-powered bilingual query translation
 
67
  ### 1. Prerequisites
68
 
69
  - Python 3.8+
70
+ - Gemini API key
71
 
72
  ### 2. Installation
73
 
 
85
  Create a `.env` file in the project root:
86
 
87
  ```bash
88
+ GEMINI_API_KEY=your_Gemini_api_key_here
89
  ```
90
 
91
  ### 4. Launch the Application
 
170
 
171
  - **Frontend**: Gradio with custom CSS and real-time progress
172
  - **AI Agents**:
173
+ - Primary SmolAgents powered by Gemini
174
  - Specialized follow-up agent for interactive analysis ⭐
175
  - **Search**: BM25 keyword matching with TF-IDF preprocessing
176
  - **Translation**: LLM-powered bilingual query translation
agent.py CHANGED
@@ -25,9 +25,8 @@ from smolagents import (
25
  def create_web_agent(step_callback):
26
  search_tool = DuckDuckGoSearchTool()
27
  model = LiteLLMModel(
28
- #model_id="gemini/gemini-2.5-flash-preview-05-20",
29
- model_id="mistral/mistral-medium-latest",
30
- api_key=os.getenv("MISTRAL_API_KEY"),
31
  )
32
  web_agent = CodeAgent(
33
  tools=[
 
25
  def create_web_agent(step_callback):
26
  search_tool = DuckDuckGoSearchTool()
27
  model = LiteLLMModel(
28
+ model_id="gemini/gemini-2.5-flash-preview-05-20",
29
+ api_key=os.getenv("GEMINI_API_KEY"),
 
30
  )
31
  web_agent = CodeAgent(
32
  tools=[
app.py CHANGED
@@ -32,9 +32,8 @@ def initialize_models():
32
  # Initialize LLM for translation
33
  try:
34
  model = LiteLLMModel(
35
- #model_id="gemini/gemini-2.5-flash-preview-05-20",
36
- model_id="mistral/mistral-medium-latest",
37
- api_key=os.getenv("MISTRAL_API_KEY")
38
  )
39
  llm_translator = CodeAgent(tools=[], model=model, max_steps=1)
40
  print("βœ… LLM translator initialized")
 
32
  # Initialize LLM for translation
33
  try:
34
  model = LiteLLMModel(
35
+ model_id="gemini/gemini-2.5-flash-preview-05-20",
36
+ api_key=os.getenv("GEMINI_API_KEY")
 
37
  )
38
  llm_translator = CodeAgent(tools=[], model=model, max_steps=1)
39
  print("βœ… LLM translator initialized")
followup_agent.py CHANGED
@@ -22,9 +22,8 @@ def create_followup_agent():
22
  """Create a specialized agent for follow-up analysis"""
23
  search_tool = DuckDuckGoSearchTool()
24
  model = LiteLLMModel(
25
- #model_id="gemini/gemini-2.5-flash-preview-05-20",
26
- model_id="mistral/mistral-medium-latest",
27
- api_key=os.getenv("MISTRAL_API_KEY"),
28
  )
29
 
30
  followup_agent = CodeAgent(
 
22
  """Create a specialized agent for follow-up analysis"""
23
  search_tool = DuckDuckGoSearchTool()
24
  model = LiteLLMModel(
25
+ model_id="gemini/gemini-2.5-flash-preview-05-20",
26
+ api_key=os.getenv("GEMINI_API_KEY"),
 
27
  )
28
 
29
  followup_agent = CodeAgent(
tools/retrieval_tools.py CHANGED
@@ -33,9 +33,8 @@ def _initialize_retrieval_system():
33
  if _llm_translator is None:
34
  try:
35
  model = LiteLLMModel(
36
- #model_id="gemini/gemini-2.5-flash-preview-05-20",
37
- model_id="mistral/mistral-medium-latest",
38
- api_key=os.getenv("MISTRAL_API_KEY")
39
  )
40
  _llm_translator = CodeAgent(tools=[], model=model, max_steps=1)
41
  print("βœ… LLM translator initialized")
 
33
  if _llm_translator is None:
34
  try:
35
  model = LiteLLMModel(
36
+ model_id="gemini/gemini-2.5-flash-preview-05-20",
37
+ api_key=os.getenv("GEMINI_API_KEY")
 
38
  )
39
  _llm_translator = CodeAgent(tools=[], model=model, max_steps=1)
40
  print("βœ… LLM translator initialized")