Spaces:
Configuration error
Configuration error
Update crew.py
Browse files
crew.py
CHANGED
|
@@ -7,7 +7,7 @@ import os
|
|
| 7 |
import pandas as pd
|
| 8 |
from crewai import Agent, Crew, Process, Task
|
| 9 |
from crewai.tools import tool
|
| 10 |
-
from crewai_tools import StagehandTool
|
| 11 |
from google import genai
|
| 12 |
from google.genai import types
|
| 13 |
from openinference.instrumentation.crewai import CrewAIInstrumentor
|
|
@@ -48,14 +48,7 @@ tracer_provider = register(
|
|
| 48 |
|
| 49 |
def run_crew(question, file_path):
|
| 50 |
# Tools
|
| 51 |
-
|
| 52 |
-
#web_browser_tool = StagehandTool(
|
| 53 |
-
# api_key=os.environ["BROWSERBASE_API_KEY"],
|
| 54 |
-
# project_id=os.environ["BROWSERBASE_PROJECT_ID"],
|
| 55 |
-
# model_api_key=os.environ["OPENAI_API_KEY"],
|
| 56 |
-
# model_name="gpt-4.1"
|
| 57 |
-
#)
|
| 58 |
-
|
| 59 |
@tool("Web Search Tool")
|
| 60 |
def web_search_tool(question: str) -> str:
|
| 61 |
"""Given a question only, search the web to answer the question.
|
|
@@ -333,6 +326,13 @@ def run_crew(question, file_path):
|
|
| 333 |
verbose=True
|
| 334 |
)
|
| 335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
#web_browser_agent = Agent(
|
| 337 |
# role="Web Browser Agent",
|
| 338 |
# goal="Given a question and URL, load the URL and act, extract, navigate, observe, and answer the question: {question}",
|
|
|
|
| 7 |
import pandas as pd
|
| 8 |
from crewai import Agent, Crew, Process, Task
|
| 9 |
from crewai.tools import tool
|
| 10 |
+
#from crewai_tools import StagehandTool
|
| 11 |
from google import genai
|
| 12 |
from google.genai import types
|
| 13 |
from openinference.instrumentation.crewai import CrewAIInstrumentor
|
|
|
|
| 48 |
|
| 49 |
def run_crew(question, file_path):
|
| 50 |
# Tools
|
| 51 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
@tool("Web Search Tool")
|
| 53 |
def web_search_tool(question: str) -> str:
|
| 54 |
"""Given a question only, search the web to answer the question.
|
|
|
|
| 326 |
verbose=True
|
| 327 |
)
|
| 328 |
|
| 329 |
+
#web_browser_tool = StagehandTool(
|
| 330 |
+
# api_key=os.environ["BROWSERBASE_API_KEY"],
|
| 331 |
+
# project_id=os.environ["BROWSERBASE_PROJECT_ID"],
|
| 332 |
+
# model_api_key=os.environ["OPENAI_API_KEY"],
|
| 333 |
+
# model_name="gpt-4.1"
|
| 334 |
+
#)
|
| 335 |
+
|
| 336 |
#web_browser_agent = Agent(
|
| 337 |
# role="Web Browser Agent",
|
| 338 |
# goal="Given a question and URL, load the URL and act, extract, navigate, observe, and answer the question: {question}",
|