crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

tools in crew ai

Open SumaiyaSultan2002 opened this issue 9 months ago • 2 comments

do tools in crew ai require open ai api key. currently i want to use groq with llama 3 model but i keep getting in error with i try to run CSVSearchTool() in the agents I encountered an error while trying to use the tool. This was the error: Error code: 401 - {'error': {'message': 'Incorrect API key provided: NA. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}. Tool Search a CSV's content accepts these inputs: Search a CSV's content(search_query: 'string') - A tool that can be used to semantic search a query the Sample_helpdesk_tickets.csv CSV's content.

i dont want to use openai key for the tools. are there any alternatives?

SumaiyaSultan2002 avatar May 16 '24 19:05 SumaiyaSultan2002

tool = CSVSearchTool( config=dict( llm=dict( provider="groq", # or google, openai, anthropic, llama2, ... config=dict( model="llama3", # temperature=0.5, # top_p=1, # stream=true, ), ), embedder=dict( provider="google", # or openai, ollama, ... config=dict( model="models/embedding-001", task_type="retrieval_document", # title="Embeddings", ), ), ) ) i also configured CSVsearchtool like this. but not sure what to do next. Would be great if someone could help me out of this.

SumaiyaSultan2002 avatar May 16 '24 19:05 SumaiyaSultan2002

Hello @SumaiyaSultan2002 , I'm encountering the same issue as you when using the Groq API. Unfortunately, I believe the only way to utilize open-source LLMs while working with CrewAI is to work locally using Ollama.

Timilla avatar May 20 '24 13:05 Timilla

Can someone explain this in more detail? What is the workaround, if any?

TaoAthe avatar Jun 03 '24 14:06 TaoAthe

Found this on crewai discord that may help

tool = JSONSearchTool( json_path=file_path, config={ "llm": { "provider": "google", "config": { "model": "gemini-pro", "temperature": 0.7, }, }, "embedder": { "provider": "google", "config": { "model": "text-embedding-004", "task_type": "retrieval_document", }, }, } )

gadgethome avatar Jun 03 '24 19:06 gadgethome

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.

github-actions[bot] avatar Aug 17 '24 12:08 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Aug 23 '24 12:08 github-actions[bot]