-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrew.py
35 lines (31 loc) · 1.52 KB
/
crew.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from crewai import Crew, Process
from langchain_openai import ChatOpenAI
from agents import (data_engineer_agent,
technical_analysis_agent,
nlp_researcher_agent,
risk_analysis_agent,
advisor_agent)
from tasks import (gather_data,
technical_analysis,
fundamental_and_sentimental_analysis,
risk_analysis,
investment_advise)
def run_crew(inputs:dict, temperature:float):
crew = Crew(
tasks=[gather_data,
technical_analysis,
fundamental_and_sentimental_analysis,
risk_analysis,
investment_advise],
agents=[data_engineer_agent,
technical_analysis_agent,
nlp_researcher_agent,
risk_analysis_agent,
advisor_agent],
manager_llm=ChatOpenAI(model="gpt-3.5-turbo",
temperature=temperature),
process=Process.hierarchical,
verbose=True
)
result = crew.kickoff(inputs=inputs)
return result