You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue while using the CSV Search Tool in CrewAI. The tool fails to execute the search, and the following error is raised:
APIStatusError.init() missing 2 required keyword-only arguments: 'response' and 'body'.
The tool is expected to take a search query and return semantic results from the CSV, but the error occurs during execution, leaving the tool unusable. This prevents the agent from accessing and analyzing the data in the CSV.
Steps to Reproduce
from crewai_tools import CSVSearchTool
from crewai import Agent, Task, Crew, Process, LLM
from textwrap import dedent
import os
from dotenv import load_dotenv
planner = Agent(
llm=llm,
role=dedent((
"""
Data Engineer:
Responsible for answering every question about the data and providing actionable insights.
"""
)),
backstory=dedent((
"""
I am a Data Engineer with 5 years of experience in data analysis and engineering.
I have expertise in handling, transforming, and analyzing complex datasets using advanced tools and technologies.
My focus is on uncovering patterns, ensuring data integrity, and delivering insights to support decision-making.
"""
)),
goal=dedent((
"""
Answer all questions related to the data, provide meaningful insights, identify trends,
and resolve complex data-related challenges to facilitate informed decision-making.
Question: {question}
Provide an analysis and actionable recommendations.
"""
)),
allow_delegation=False,
verbose=True,
tools=[tool_search]
)
task = Task(
description=dedent((
"""
A proficient Data Engineer tasked with leveraging expertise in data analysis and engineering
Question : {question}
"""
)),
expected_output=dedent((
"""
The agent should provide detailed and accurate answers to data-related questions, actionable insights,
about {question} and identify trends and patterns in the dataset.
"""
)),
agent=planner
)
subject = 'Explain all the data insights and trends in the dataset.'
template_input = {"question": subject}
result = crew.kickoff(inputs=template_input)
Expected behavior
I encountered an error while trying to use the tool. This was the error: APIStatusError.init() missing 2 required keyword-only arguments: 'response' and 'body'.
Tool Search a CSV's content accepts these inputs: Tool Name: Search a CSV's content
Tool Arguments: {'search_query': {'description': "Mandatory search query you want to use to search the CSV's content", 'type': 'str'}}
Tool Description: A tool that can be used to semantic search a query the data.csv CSV's content.
Agent:
Final Answer:
I cannot provide any data insights or trends without access to the data in the CSV file. Please provide the CSV data so I can perform the analysis.
The path given is correct I had Verified
Screenshots/Code snippets
Operating System
Windows 11
Python Version
3.12
crewAI Version
crewai, version 0.95.0
crewAI Tools Version
4.1.0
Virtual Environment
Venv
Evidence
Given Above
Possible Solution
None
Additional context
None
The text was updated successfully, but these errors were encountered:
Description
I encountered an issue while using the CSV Search Tool in CrewAI. The tool fails to execute the search, and the following error is raised:
APIStatusError.init() missing 2 required keyword-only arguments: 'response' and 'body'.
The tool is expected to take a search query and return semantic results from the CSV, but the error occurs during execution, leaving the tool unusable. This prevents the agent from accessing and analyzing the data in the CSV.
Steps to Reproduce
from crewai_tools import CSVSearchTool
from crewai import Agent, Task, Crew, Process, LLM
from textwrap import dedent
import os
from dotenv import load_dotenv
load_dotenv()
llm = LLM(
model="gemini/gemini-1.5-flash",
api_key=os.getenv("API")
)
tool_search = CSVSearchTool(csv='data.csv')
planner = Agent(
llm=llm,
role=dedent((
"""
Data Engineer:
Responsible for answering every question about the data and providing actionable insights.
"""
)),
backstory=dedent((
"""
I am a Data Engineer with 5 years of experience in data analysis and engineering.
I have expertise in handling, transforming, and analyzing complex datasets using advanced tools and technologies.
My focus is on uncovering patterns, ensuring data integrity, and delivering insights to support decision-making.
"""
)),
goal=dedent((
"""
Answer all questions related to the data, provide meaningful insights, identify trends,
and resolve complex data-related challenges to facilitate informed decision-making.
)
task = Task(
description=dedent((
"""
A proficient Data Engineer tasked with leveraging expertise in data analysis and engineering
Question : {question}
"""
)),
expected_output=dedent((
"""
The agent should provide detailed and accurate answers to data-related questions, actionable insights,
about {question} and identify trends and patterns in the dataset.
"""
)),
agent=planner
)
crew = Crew(
agents=[planner],
tasks=[task],
process=Process.sequential
)
subject = 'Explain all the data insights and trends in the dataset.'
template_input = {"question": subject}
result = crew.kickoff(inputs=template_input)
Expected behavior
I encountered an error while trying to use the tool. This was the error: APIStatusError.init() missing 2 required keyword-only arguments: 'response' and 'body'.
Tool Search a CSV's content accepts these inputs: Tool Name: Search a CSV's content
Tool Arguments: {'search_query': {'description': "Mandatory search query you want to use to search the CSV's content", 'type': 'str'}}
Tool Description: A tool that can be used to semantic search a query the data.csv CSV's content.
Agent:
Final Answer:
I cannot provide any data insights or trends without access to the data in the CSV file. Please provide the CSV data so I can perform the analysis.
The path given is correct I had Verified
Screenshots/Code snippets
Operating System
Windows 11
Python Version
3.12
crewAI Version
crewai, version 0.95.0
crewAI Tools Version
4.1.0
Virtual Environment
Venv
Evidence
Given Above
Possible Solution
None
Additional context
None
The text was updated successfully, but these errors were encountered: