eaglelandsonce commited on
Commit
020e871
1 Parent(s): fd234e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -19,6 +19,9 @@ GOOGLE_AI_STUDIO = os.environ.get('GOOGLE_AI_STUDIO2')
19
  if not GOOGLE_AI_STUDIO:
20
  raise ValueError("API key not found. Please set the GOOGLE_AI_STUDIO2 environment variable.")
21
 
 
 
 
22
  from crewai import Agent, Task, Crew, Process
23
 
24
  # os.environ["OPENAI_API_KEY"] = "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"
@@ -46,7 +49,7 @@ def crewai_process(research_topic):
46
  actionable insights.""",
47
  verbose=True,
48
  allow_delegation=False,
49
- llm = ChatGoogleGenerativeAI(model="gemini-pro"),
50
  tools=[
51
  GeminiSearchTools.gemini_search
52
  ]
 
19
  if not GOOGLE_AI_STUDIO:
20
  raise ValueError("API key not found. Please set the GOOGLE_AI_STUDIO2 environment variable.")
21
 
22
+ genai.configure(api_key=GOOGLE_AI_STUDIO)
23
+ model = genai.GenerativeModel('gemini-pro')
24
+
25
  from crewai import Agent, Task, Crew, Process
26
 
27
  # os.environ["OPENAI_API_KEY"] = "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"
 
49
  actionable insights.""",
50
  verbose=True,
51
  allow_delegation=False,
52
+ llm = ChatGoogleGenerativeAI(model=model),
53
  tools=[
54
  GeminiSearchTools.gemini_search
55
  ]