Update crew.py
Browse files
crew.py
CHANGED
@@ -11,6 +11,8 @@ from openinference.instrumentation.crewai import CrewAIInstrumentor
|
|
11 |
from phoenix.otel import register
|
12 |
from util import get_final_answer
|
13 |
|
|
|
|
|
14 |
PHOENIX_API_KEY = os.environ["PHOENIX_API_KEY"]
|
15 |
|
16 |
os.environ["PHOENIX_CLIENT_HEADERS"] = f"api_key={PHOENIX_API_KEY}"
|
@@ -33,6 +35,7 @@ def run_crew(question):
|
|
33 |
goal="Search the web for question \"{topic}\" and scrape the most relevant web page.",
|
34 |
backstory="As an expert web search assistant, you search the web for the question and scrape the most relevant web page.",
|
35 |
allow_delegation=False,
|
|
|
36 |
tools=[web_search_tool, web_rag_tool],
|
37 |
verbose=True
|
38 |
)
|
@@ -42,6 +45,7 @@ def run_crew(question):
|
|
42 |
goal="Search a YouTube video for question \"{topic}\".",
|
43 |
backstory="As an expert YouTube search assistant, you search a YouTube video.",
|
44 |
allow_delegation=False,
|
|
|
45 |
tools=[web_search_tool, web_rag_tool],
|
46 |
verbose=True
|
47 |
)
|
@@ -60,7 +64,8 @@ def run_crew(question):
|
|
60 |
|
61 |
crew = Crew(
|
62 |
agents=[web_search_agent],
|
63 |
-
|
|
|
64 |
process=Process.sequential,
|
65 |
tasks=[web_search],
|
66 |
verbose=True
|
|
|
11 |
from phoenix.otel import register
|
12 |
from util import get_final_answer
|
13 |
|
14 |
+
PLANNING_MODEL = "o3"
|
15 |
+
|
16 |
PHOENIX_API_KEY = os.environ["PHOENIX_API_KEY"]
|
17 |
|
18 |
os.environ["PHOENIX_CLIENT_HEADERS"] = f"api_key={PHOENIX_API_KEY}"
|
|
|
35 |
goal="Search the web for question \"{topic}\" and scrape the most relevant web page.",
|
36 |
backstory="As an expert web search assistant, you search the web for the question and scrape the most relevant web page.",
|
37 |
allow_delegation=False,
|
38 |
+
max_iter=1,
|
39 |
tools=[web_search_tool, web_rag_tool],
|
40 |
verbose=True
|
41 |
)
|
|
|
45 |
goal="Search a YouTube video for question \"{topic}\".",
|
46 |
backstory="As an expert YouTube search assistant, you search a YouTube video.",
|
47 |
allow_delegation=False,
|
48 |
+
max_iter=1,
|
49 |
tools=[web_search_tool, web_rag_tool],
|
50 |
verbose=True
|
51 |
)
|
|
|
64 |
|
65 |
crew = Crew(
|
66 |
agents=[web_search_agent],
|
67 |
+
planning=True,
|
68 |
+
planning_llm=PLANNING_MODEL
|
69 |
process=Process.sequential,
|
70 |
tasks=[web_search],
|
71 |
verbose=True
|