crewAI: I encountered an error while trying to use the tool. This was the error: GithubSearchTool._run() missing 1 required positional argument: 'search_query'.

Issue: the github RAG tool and Directory searcher RAG tool fail to work with the following error. This means that even though the data is successfully loaded into the chromaDB, it cannot operate on it therefor hallucinating results.

I have confirmed this repeatable with

  • GPT3.5-Turbo-0125
  • GPT4-Turbo -Claude Haiku

I confirmed that embedchain tools work independently run running the appropriate loaders

Below is the configuration used for the tools,

github_tool = GithubSearchTool(
    github_repo='repo:joaomdmoura/crewAI type:code', 
    gh_token="<TOKEN>", 
    search_query='Review Python code in Github Repo and provide feedback on issues and corrections that need to be made. Be sure to name each file and provide a brief description of the issues found.',
    content_types=['code', 'issue', 'repo'],
    config=dict(
        llm=dict(
            provider="openai",
            config=dict(
                model="gpt-4-0125-preview"       
            ),
        ),
        embedder=dict(
            provider="openai",
            config=dict(
                model="text-embedding-3-small",
            ),
        ), 
    ),
)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 16 (8 by maintainers)

Most upvoted comments

I have found a workaround for now

inquiry_resolution = Task( description=( “just reached out with a super important ask:\n” “{inquiry}\n\n”
"Make sure to use everything you know " “to provide the best support possible.” "You must strive to provide a complete " “and accurate response to the request.” ), expected_output=( "A detailed, informative response to the " "inquiry that addresses " “all aspects of their question.\n” "The response should include references " "to everything you used to find the answer, " "including external data or solutions. " "Ensure the answer is complete, " "leaving no questions unanswered, and maintain a helpful and friendly " “tone throughout.” “if you are going to use MDX tool replace the search positional argument: to ‘search_query’” ), tools=[players_scores_tool, read_resume, semantic_search_resume], agent=support_agent, llm=llm ) It works 😃

Same problem. Anyone found a fix?

I’d also recommend testing with the new RC 0.30.0rc3 it’s in testing but has a few improvements around tool usage in general. I’m reading the other comments tho to see if maybe we have another bug in there

This is still an issue in latest version 0.28.7 & 0.1.7 - seems to be loading the repo but then hitting a 404

image

This is my cofnig for the tool:

custom_tool = GithubSearchTool( github_repo=‘joaomdmoura/crewAI’, gh_token=“TOKEN”, #search_query=‘Review Python code in Github Repo and provide feedback on issues and corrections that need to be made. Be sure to name each file and provide a brief description of the issues found.’, content_types=[‘code’, ‘repo’] )

Also same issue with TXT tool

image