crewAI
crewAI copied to clipboard
Issue in reading through csv file using OLLAMA
from crewai_tools import CSVSearchTool tool = CSVSearchTool(csv='record.csv', config=dict( llm=dict( provider="ollama", config=dict( model="llama2", # temperature=0.5, # top_p=1, # stream=true, ), ), embedder=dict( provider="ollama", config=dict( model="llama2", #task_type="retrieval_document", # title="Embeddings", ), ), ) )
Trip planner
import os from crewai import Agent, Task, Crew, Process from crewai_tools import SerperDevTool
from langchain.llms import Ollama ollama_llm = Ollama(model="llama2",temperature=0)
Define your agents with roles and goals
csv_agent = Agent( role='Master in analyzing csv file', goal='Select all information about given emp_id ', backstory='An expert in analyzing csv files', verbose=True, allow_delegation=True, tools=[tool], llm = ollama_llm, system_template = )
identify_task = Task(
description=f"""
extract all information related to search_query : 2633 """,
expected_output="""concise summary.""",
agent=csv_agent,
)
Instantiate your crew with a sequential process
crew = Crew( agents=[ csv_agent ], tasks=[identify_task], verbose=True )
Get your crew to work!
result = crew.kickoff()
########## Output
ction: Search a CSV's content(search_query: '2633') Action Input: {'emp_id': 2633}
Action 'Search a CSV's content(search_query: '2633')' don't exist, these are the only available Actions: Search a CSV's content: Search a CSV's content(search_query: 'string') - A tool that can be used to semantic search a query the cpml_updated.csv CSV's content.
Please help me where i am doing wrong... thanks