crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
19.77k stars 2.73k forks source link

unexpected keyword argument 'task_type' in crewai tools config #1295

Open alexdevassy opened 1 month ago

alexdevassy commented 1 month ago

Description

Getting error TypeError: BaseEmbedderConfig.__init__() got an unexpected keyword argument 'task_type' when code from https://docs.crewai.com/tools/WebsiteSearchTool/#customization-options is executed

Steps to Reproduce

from crewai import Agent, Task, Crew
from langchain_ollama import ChatOllama
from crewai_tools import WebsiteSearchTool
import os

tool = WebsiteSearchTool(
    config=dict(
        llm=dict(
            provider="ollama", # or google, openai, anthropic, llama2, ...
            config=dict(
                model="llama2"
            ),
        ),
        embedder=dict(
            provider="huggingface", # or openai, ollama, ...
            config=dict(
                model="sentence-transformers/all-MiniLM-L6-v2",
                task_type="retrieval_document",
            ),
        ),
    )
)

Save the above code to python file named test.py. Upon executing python test.py I am getting below error

TypeError: BaseEmbedderConfig.__init__() got an unexpected keyword argument 'task_type'

Expected behavior

To execute without any error

Screenshots/Code snippets

-

Operating System

Ubuntu 22.04

Python Version

3.12

crewAI Version

0.51.1

crewAI Tools Version

0.8.3

Virtual Environment

Venv

Evidence

-

Possible Solution

-

Additional context

-

github-actions[bot] commented 10 hours ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.