admin管理员组文章数量:1402842
I am using CrewAI to create an agent. Doing everything as mentioned in documentation. See below for the CrewBase class:
@CrewBase
class EnergyAssitt():
"""EnergyAssitt crew"""
# Learn more about YAML configuration files here:
# Agents:
# Tasks:
agents_config = 'config/agents.yaml'
tasks_config = 'config/tasks.yaml'
def __init__(self):
logger.info(f"__init__")
# If you would like to add tools to your agents, you can learn more about it here:
#
@agent
def assistant(self) -> Agent:
logger.info(f"assistant")
return Agent(
config=self.agents_config['mechanical_assistant'],
memory=True,
memory_config=memory_config,
verbose=True
)
# To learn more about structured task outputs,
# task dependencies, and task callbacks, check out the documentation:
#
@task
def chat_task(self) -> Task:
logger.info(f"chat_task")
return Task(
config=self.tasks_config['chat_task'],
agent=self.assistant()
)
@crew
def crew(self) -> Crew:
"""Creates the Energy Assisstant crew"""
# To learn how to add knowledge sources to your crew, check out the documentation:
#
logger.info(f"crew")
return Crew(
agents=self.agents, # Automatically created by the @agent decorator
tasks=self.tasks, # Automatically created by the @task decorator
process=Process.sequential,
knowledge_sources=[pdf_source],
verbose=True,
# process=Process.hierarchical, # In case you wanna use that instead /
)
However, everytime I give a task request, I get following error:
2025-03-19 16:46:10,270 - app.services.services - INFO - Task 5a3a8b3a-573f-4b18-9a11-43d079df87fb failed with error: 'mechanical_assistant'
Any suggestions what is going wrong or how to troubleshoot.
本文标签: CrewAI agent not able to initialize and giving errorStack Overflow
版权声明:本文标题:CrewAI agent not able to initialize and giving error - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744371322a2603041.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论