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",
),
),
),
)
Just cut a new verison 0.28.1 that should fix it now depending on a new verison of crewai-tools 0.1.15.
might take a few minutes to be available, but once it is let me knwo how it works
Thanks for doing that, unfortunately its still doing it with GPT4
Error:
I encountered an error while trying to use the tool. This was the error: GithubSearchTool._run() missing 1 required positional argument: 'search_query'. Tool Search a github repo's content accepts these inputs: A tool that can be used to semantic search a query the joaomdmoura/crewAI github repo's content.
This now my code, based on your changes
github_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',],
config=dict(
llm=dict(
provider="openai",
config=dict(
model="gpt-4-0125-preview"
),
),
embedder=dict(
provider="openai",
config=dict(
model="text-embedding-3-small",
),
),
),
)
I'm also encountering the same error
This is also affecting the directory search tool as well as the GitHub search tool
I have updated crewA.I. to the latest v0.28.1 7 April 2024 and it is still giving this error: "I encountered an error while trying to use the tool. This was the error: SerperDevTool._run() missing 1 required positional argument: 'search_query'. Tool Search the internet accepts these inputs: Search the internet(search_query: 'string') - A tool that can be used to semantic search a query from a txt's content."
I can now confirm the the TXTSearchTool is also having the same issue
I encountered an error while trying to use the tool. This was the error: TXTSearchTool._run() missing 1 required positional argument: 'search_query'.
Tool Search a txt's content accepts these inputs: A tool that can be used to semantic search a query the /workspaces/tech/Developer/github/crewai/OUTDATED_TEMPLATE/crewai_cisco/rag_files/txt/Microsoft Sentinel SIEM Roadmap.txt txt's content.
I am having 0 success with RAG tools
Same problem. Anyone found a fix?
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
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
Seems you have to set search_query when initialising the tool Like so using the DirectorySearchTool as an example:
# initialize the DirectorySearchTool directory_search_tool = DirectorySearchTool( search_query="<question here>", search_directory="./test" )
But the problem is how is the answer to this handled by the agent or task (depending where you assigned the tool). No matter what you ask it the Agent / Task prompts will override and proceed to hallucinate
The GithubSearchTool appears to be functioning in version 0.28.8.
I was unable to make it work using the documented "synthetic" instantiation:
tool = GithubSearchTool(
github_repo='https://github.com/example/repo',
content_types=['code', 'issue'] # Options: code, repo, pr, issue
)
However, it operates correctly with the verbose instantiation mentioned by @theCyberTech here: https://github.com/joaomdmoura/crewAI/issues/434#issuecomment-2040960464
You can refer to this notebook to quickly reproduce the process: https://github.com/alexfazio/crewAI-quickstart/blob/main/crewai_sequential_GithubSearchTool_quickstart.ipynb
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
I'd also recommend testing with the new RC
0.30.0rc3it'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
I may be making a mistake, but I just tested with 0.30.0rc3 using "synthetic" instantiation and it was unsuccessful.
You can use this notebook to easily replicate the process with 0.30.0rc3:
https://colab.research.google.com/drive/1ag3D-UDBUTKzqbgREzbMtlSygeQeSEMZ?usp=sharing
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 :)
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.
I have the same question.