File size: 1,695 Bytes
0d18784
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4da48ad
 
 
 
 
0d18784
 
 
4da48ad
 
 
 
 
0d18784
1ab4354
fa7cbde
0d18784
 
 
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
36
37
38
39
40
41
42
43
44
45
46
from crewai import Crew, Process
from tasks.competitor_analyst_task import competitor_analyst_task
from tasks.financial_analyst_task import financial_analyst_task
from tasks.industry_analyst_task import industry_analyst_task
from tasks.market_analyst_task import market_analyst_task
from tasks.swot_analyst_task import swot_analyst_task
from tasks.reporting_analyst_task import reporting_analyst_task
from agents.competitor_analyst_agent import competitor_analyst_agent
from agents.financial_analyst_agent import financial_analyst_agent
from agents.industry_analyst_agent import industry_analyst_agent
from agents.market_analyst_agent import market_analyst_agent
from agents.reporting_analyst_agent import reporting_analyst_agent
from agents.swot_analyst_agent import swot_analyst_agent

from langchain_openai import ChatOpenAI

def initialize_crew():
    """
    Initialize the Crew instance with agents and tasks.

    Returns:
        Crew: The initialized Crew instance.
    """
    return Crew(
        agents=[
            industry_analyst_agent,
            competitor_analyst_agent,
            market_analyst_agent,
            financial_analyst_agent,
            swot_analyst_agent,
            reporting_analyst_agent,
        ],
        tasks=[
            industry_analyst_task,
            competitor_analyst_task,
            market_analyst_task,
            financial_analyst_task,
            swot_analyst_task,
            reporting_analyst_task
        ],
        #manager_llm=ChatOpenAI(model="gpt-4o-mini-2024-07-18", temperature=0.7),
        manager_llm=ChatOpenAI(model="gpt-3.5-turbo", temperature=0.7),
        process=Process.hierarchical,
        verbose=True
    )