Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while : from crewai import Agent,Task , Crew #846

Closed
mohammad-gh009 opened this issue Jul 1, 2024 · 13 comments
Closed

Error while : from crewai import Agent,Task , Crew #846

mohammad-gh009 opened this issue Jul 1, 2024 · 13 comments

Comments

@mohammad-gh009
Copy link

PackageNotFoundError: No package metadata was found for embedchain.

@robsonc
Copy link

robsonc commented Jul 1, 2024

I received the same error after install a totally fresh new project

@strnad
Copy link

strnad commented Jul 1, 2024

same problem here, for me it was possible to fix it by installing embedchain from git instead of wheel.
pip install git+https://github.com/joaomdmoura/embedchain.git

@gromag
Copy link

gromag commented Jul 1, 2024

Fresh new project, new python environment, first I got the same embedchain problem then after manually pip installing it I got:

from crewai_tools import SerperDevTool, BrowserbaseTool, ExaSearchTool
ImportError: cannot import name 'BrowserbaseTool' from 'crewai_tools'

I'm using the getting starter code:

import os

from langchain.llms import OpenAI
from crewai import Agent
from crewai_tools import SerperDevTool, BrowserbaseTool, ExaSearchTool
from dotenv import load_dotenv

load_dotenv("cred.env")

assert os.environ["OPENAI_API_KEY"] is not None
assert os.environ["SERPER_API_KEY"] is not None

search_tool = SerperDevTool()
browser_tool = BrowserbaseTool()
exa_search_tool = ExaSearchTool()

# Creating a senior researcher agent with advanced configurations
researcher = Agent(
    role="Senior Researcher",
    goal="Uncover groundbreaking technologies in {topic}",
    backstory=(
        "Driven by curiosity, you're at the forefront of innovation, "
        "eager to explore and share knowledge that could change the world."
    ),
    memory=True,
    verbose=True,
    allow_delegation=False,
    tools=[search_tool, browser_tool],
    allow_code_execution=False,  # New attribute for enabling code execution
    max_iter=15,  # Maximum number of iterations for task execution
    max_rpm=100,  # Maximum requests per minute
    max_execution_time=3600,  # Maximum execution time in seconds
    system_template="Your custom system template here",  # Custom system template
    prompt_template="Your custom prompt template here",  # Custom prompt template
    response_template="Your custom response template here",  # Custom response template
)

# Creating a writer agent with custom tools and specific configurations
writer = Agent(
    role="Writer",
    goal="Narrate compelling tech stories about {topic}",
    backstory=(
        "With a flair for simplifying complex topics, you craft engaging "
        "narratives that captivate and educate, bringing new discoveries to light."
    ),
    verbose=True,
    allow_delegation=False,
    memory=True,
    tools=[exa_search_tool],
    function_calling_llm=OpenAI(
        model_name="gpt-3.5-turbo"
    ),  # Separate LLM for function calling
)

# Setting a specific manager agent
manager = Agent(
    role="Manager",
    goal="Ensure the smooth operation and coordination of the team",
    verbose=True,
    backstory=(
        "As a seasoned project manager, you excel in organizing "
        "tasks, managing timelines, and ensuring the team stays on track."
    ),
    allow_code_execution=True,  # Enable code execution for the manager
)

@LarsAC
Copy link

LarsAC commented Jul 1, 2024

The dependency in crewai is on embedchain-crewai, but that does not solve the problem for me either.

@gromag
Copy link

gromag commented Jul 3, 2024

Did anyone get anywhere with this?

@JamesStallings
Copy link

JamesStallings commented Jul 4, 2024

This is giving me a problem as well; it seems that the tools depend on embedchain, which depends on langchain; so if you are using langchain-community, installing embed chain replaces it with langchain and breaks a lot of stuff....and you won't be able to import the tools.

@joaomdmoura
Copy link
Collaborator

Hey folks thanks for reporting the error, what version are you using? He did see this bug but should be fixed on 0.35.8

@joaomdmoura
Copy link
Collaborator

in the new version we will update the dependency with them as well to sue new versions

@wasimsafdar
Copy link

Does anybody know how to solve it? I followed and got this error.

@JamesStallings
Copy link

JamesStallings commented Jul 21, 2024 via email

@joaomdmoura
Copy link
Collaborator

Hey folks, if there is an on going problem we would love to help, we do need more information though to be able to replicated it, like the versions being used, logs and some code to help us to it.

@joaomdmoura
Copy link
Collaborator

We update embedchain in the latest versions so this should be gone, but lmk if I'm wrong

@wasimsafdar
Copy link

I am following this tutorial. https://lablab.ai/t/mastering-ai-content-creation-leveraging-llama-3-and-groq-api. Is this error related to "langchain_groq"? I also installed embedchain but I do not know how to update imports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants