Docfile commited on
Commit
279a83f
·
verified ·
1 Parent(s): 1ac1ded

Update crew_utils.py

Browse files
Files changed (1) hide show
  1. crew_utils.py +8 -4
crew_utils.py CHANGED
@@ -1,7 +1,7 @@
1
  # crew_utils.py
2
  from crewai import Agent, Crew, Process, Task
3
  from crewai_tools import SerperDevTool
4
- from langchain_google_genai import ChatGoogleGenerativeAI
5
  from pydantic import BaseModel, Field
6
  from typing import List,Any
7
  from pdf_tool import PDFTool
@@ -13,12 +13,16 @@ pdf_tool = PDFTool()
13
  # --- Définition du LLM (Gemini) ---
14
  # Remplace par ta clé API
15
 
16
- api_key = "AIzaSyD6yZxfVOnh63GXBJjakAupk9aP4CZrgrQ"
17
 
18
- llm = ChatGoogleGenerativeAI(
19
- model="gemini-1.5-flash", google_api_key=api_key, temperature=0.7
 
 
 
 
20
  )
21
 
 
22
  # --- Définition des agents ---
23
  # Chef de Projet
24
  project_manager = Agent(
 
1
  # crew_utils.py
2
  from crewai import Agent, Crew, Process, Task
3
  from crewai_tools import SerperDevTool
4
+ from crewai import LLM
5
  from pydantic import BaseModel, Field
6
  from typing import List,Any
7
  from pdf_tool import PDFTool
 
13
  # --- Définition du LLM (Gemini) ---
14
  # Remplace par ta clé API
15
 
 
16
 
17
+ GEMINI_API_KEY = "AIzaSyD6yZxfVOnh63GXBJjakAupk9aP4CZrgrQ"
18
+ llm = LLM(
19
+ model="gemini/gemini-1.5-flash",
20
+ temperature=0.7,
21
+ timeout=120, # Seconds to wait for response
22
+ max_tokens=8000,
23
  )
24
 
25
+
26
  # --- Définition des agents ---
27
  # Chef de Projet
28
  project_manager = Agent(