crewAI-tools icon indicating copy to clipboard operation
crewAI-tools copied to clipboard

serperdevtool is broken

Open strnad opened this issue 1 year ago • 1 comments

the new version of serperdevtool is broken. I have tried to fix it but i gave it up after 3rd error:

File "/home/jakub/CrewAI-Studio/venv/lib/python3.11/site-packages/crewai_tools/tools/serper_dev_tool/serper_dev_tool.py", line 30 save_file: bool = Field(default=False, description="Flag to determine whether to save the results to a file") TabError: inconsistent use of tabs and spaces in indentation

File "/home/jakub/CrewAI-Studio/venv/lib/python3.11/site-packages/crewai_tools/tools/serper_dev_tool/serper_dev_tool.py", line 42 payload["gl"] = self.country if self.country ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: expected 'else' after 'if' expression

I encountered an error while trying to use the tool. This was the error: Object of type FieldInfo is not JSON serializable. Tool Search the internet accepts these inputs: Search the internet(search_query: 'string') - A tool that can be used to search the internet with a search_query. search_query: 'Mandatory search query you want to use to search the internet'

strnad avatar Jul 17 '24 01:07 strnad

I'm facing the same issue as well. Here is my code

from crewai_tools import SerperDevTool, ScrapeWebsiteTool

@agent
    def topic_researcher(self) -> Agent:
        return Agent(
            config=self.agents_config['topic_researcher'],
            tools=[SerperDevTool(), ScrapeWebsiteTool()],
        )

Error

I encountered an error while trying to use the tool. This was the error: StructuredTool._run() missing 1 required keyword-only argument: 'config'.
 Tool Search the internet accepts these inputs: Search the internet(search_query: 'string') - A tool that can be used to search the internet with a search_query.

anirudhmaddy avatar Jul 17 '24 05:07 anirudhmaddy

I believe this was resolved. Re-open if you're still experiencing errors.

tonykipkemboi avatar Oct 04 '24 14:10 tonykipkemboi