Spaces:
Sleeping
Sleeping
Commit
·
a293459
1
Parent(s):
c9518d7
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,9 @@ from crewai.tools.browser_tools import BrowserTools
|
|
10 |
from crewai.tools.sec_tools import SECTools
|
11 |
|
12 |
# Google Langchain
|
13 |
-
from langchain_google_genai import ChatGoogleGenerativeAI
|
|
|
|
|
14 |
|
15 |
from crewai import Agent, Task, Crew, Process
|
16 |
|
@@ -23,12 +25,10 @@ GOOGLE_AI_STUDIO = os.environ.get('GOOGLE_API_KEY')
|
|
23 |
if not GOOGLE_AI_STUDIO:
|
24 |
raise ValueError("API key not found. Please set the GOOGLE_AI_STUDIO2 environment variable.")
|
25 |
|
26 |
-
genai.configure(api_key=GOOGLE_AI_STUDIO)
|
27 |
-
model = genai.GenerativeModel('gemini-pro')
|
28 |
-
|
29 |
|
|
|
30 |
|
31 |
-
os.environ["OPENAI_API_KEY"] = "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"
|
32 |
|
33 |
# Crew Bot: https://chat.openai.com/g/g-qqTuUWsBY-crewai-assistant
|
34 |
|
|
|
10 |
from crewai.tools.sec_tools import SECTools
|
11 |
|
12 |
# Google Langchain
|
13 |
+
#from langchain_google_genai import ChatGoogleGenerativeAI
|
14 |
+
|
15 |
+
from langchain_google_genai import GoogleGenerativeAI
|
16 |
|
17 |
from crewai import Agent, Task, Crew, Process
|
18 |
|
|
|
25 |
if not GOOGLE_AI_STUDIO:
|
26 |
raise ValueError("API key not found. Please set the GOOGLE_AI_STUDIO2 environment variable.")
|
27 |
|
|
|
|
|
|
|
28 |
|
29 |
+
llm = GoogleGenerativeAI(model="models/text-bison-001", google_api_key=GOOGLE_AI_STUDIO)
|
30 |
|
31 |
+
# os.environ["OPENAI_API_KEY"] = "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"
|
32 |
|
33 |
# Crew Bot: https://chat.openai.com/g/g-qqTuUWsBY-crewai-assistant
|
34 |
|