Closed jakobe81 closed 1 week ago
Traceback (most recent call last):
File "c:\Users\jacob\AppData\Local\Programs\Python\Python312\Lib\runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\jacob\AppData\Local\Programs\Python\Python312\Lib\runpy.py", line 88, in _run_code
exec(code, run_globals)
File "c:\Users\jacob.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher/../..\debugpy__main__.py", line 39, in
gives me all that bs
its really simple how is it this difficult
You need more than one agent to delegate
As per crewAI docs:
Agents can delegate tasks or questions to one another, ensuring that each task is handled by the most suitable agent
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 langchain_community.llms import Ollama from crewai import Agent, Crew, Task, Process
model = Ollama(model = "ollama run llama3:8b")
Itinerary = "vacation through the colorado and the surrounding rocky mountains"
Travel_Agent = Agent( role = "create a list of key phrases and landmarks for non-english speakers to learn while on there vacation", goal = "help non english speakers learn how to navigate, ask for directions, order food, etc. based on their itinerary", backstory = "I am your guide to whatever country you desire to visit. I will help you learn about the culture, learn the language, and more.", verbose = True, allow_delegation = True, llm = model )
AnalyzeItinerary = Task( description = f"Analyze Vacation Itinerary", Agent = Travel_Agent, expected_output = "Some phrases they should learn are... and Some places they should go... and Fun Cultural Facts to keep in mind..." ) AnalyzeItineraryOutput = Task( description = f"Organize the information into a english language lesson", Agent = Travel_Agent, expected_output = "A lesson plan for learning the english they need to know to travel to where they are going" ) crew = Crew( agents= [Travel_Agent], tasks= [AnalyzeItinerary,AnalyzeItineraryOutput], verbose= 2, process= Process.sequential ) output= crew.kickoff() print(output)
I keep getting AttributeError: 'NoneType' object has no attribute 'allow_delegation'