Closed mustangs0786 closed 2 months ago
You need to attach the LLM to the Agent, not the Tool
Refer to crewAI docs to learn more
Thanks for replying but i am attaching LLM to agent only , can you please elaborate more thanks. hoping for faster reply. thanks
You only need csv
as input for this tool, as per crewAI-tools
config
is not necessary for crewAI tools
why i put config because it is require otherwise by defualt it will use gpt.
can you please provide a sample working example.. thanks
@mustangs0786 just use a modelfile following documentation and then reference the model, e.g.:
from langchain_openai import ChatOpenAI
import os
os.environ["OPENAI_API_KEY"] = ""
ollama_llm = ChatOpenAI(
model_name='crewai-llama2',
base_url = "http://localhost:11434/v1"
)
from langchain.llms import Ollama ollama_llm = Ollama(model="llama2",temperature=0)
from langchain.llms import Ollama ollama_llm = Ollama(model="llama2",temperature=0)
is above way of using ollama model and what you mentioned is different or same??
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.
This issue was closed because it has been stalled for 5 days with no activity.
from crewai_tools import CSVSearchTool tool = CSVSearchTool(csv='record.csv', config=dict( llm=dict( provider="ollama", config=dict( model="llama2",
temperature=0.5,
)
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(
extract all information related to search_query : 2633 """,
)
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